Reverse detail from Kakelbont MS 1, a fifteenth-century French Psalter. This image is in the public domain. Daniel Paul O'Donnell

Forward to Navigation

< !-- Debug #2 -- >

Setting up Claude Code so it is safe for your research and doesn't hassle you too much

Posted: Aug 24, 2026 13:08;
Last Modified: Aug 24, 2026 13:08
Keywords:

---

In our lab, we are using AI (and nowadays specifically Claude and Claude Code) more and more for research support tasks. This ranges from note-taking and navigation to bibliographic work, to OCR, to app development and research software. Most of our work is not coding, however. We are a humanities lab and we do a lot of humanities work with the software.

Using a coding agent like Claude Code (or Codex, or any of the other AI surfaces that can write to your disk) for humanities work is very powerful. I use it, for example, to keep quite detailed notes about what I do through the day: research notes, teaching notes, supervisory work, editing notes, and so on. It writes to my Zotero, and creates links between notes that I keep as I read and entries in my bibliographic database.

But while they are more powerful than browser-based chatbots, coding agents are also much more dangerous. They can delete files. Entire directories. In my use, I’ve had them wipe out the content of dozens of notes in a single command; hundreds of lines of code.

You can harness the power and mitigate the danger by taking some basic precautions. Since these are not always second nature to humanities students, I’ve written a primer that is published to GitHub and you can find here (archived in Zenodo, bien sûr), DOI: 10.5281/zenodo.22086186.

The basic rules though, are pretty simple:

1. Start by ensuring mistakes can be recovered from: for every project, create a local git repository (explained in the primer or ask your AI how to do it). This means when something erases everything, you can recover. The instructions in the primer also explain how to ensure that you don’t accidentally broadcast passwords and so on to the world.
2. Make a blacklist (never run) and greylist (ask before running) of dangerous commands
3. Make a whitelist (run without asking) of commands that can’t easily do harm
4. Instruct the agent to run commands in a form that can be checked (some shorthand it will use otherwise makes things difficult to check properly)
5. Run a diagnostic to catch whatever is left, and clear out the accumulated one-off approvals that rules 1 through 4 have made redundant.

This is the basic gist. More detailed instructions can be found in GitHub or Zenodo.

----  

Comment

:
:

:

Textile help

Back to content

Search my site

Sections

Current teaching

Recent changes to this site

Follow me on Twitter