So far in this course, you’ve been there for every step. Issue #4 is different. Volunteers keep logging fiddles and guitar cases under “other”, and the fix is a new “instruments” category, which touches one source file and its test. A job that small and well fenced can run with nobody watching.
In this lesson, you’ll build the command that runs issue #4 without you. You’ll decide what that run may do, what it can reach, and when it stops, and then you’ll try it once. You’ll also set up the GitHub side that the next lesson needs. Start with what changes when nobody is there to answer the agent’s requests.
Decide Everything Before the Run Starts
An interactive session can stop and ask you. An unattended one can’t, so every decision you’d normally make along the way has to be made before it starts.
A headless run starts an agent with one prompt, no conversation, and no person. It works on the task, prints a result, and exits. A shell script can start it, and so can a scheduled job or a CI step. CI, short for continuous integration, covers the checks a code host runs on every push.
Your agent’s permissions still decide each tool call, but with nobody there, a call that would wait for your answer is refused or blocked instead. Your judgment moves to four questions you answer before the run:
- What may it do? Allow the tools and commands the task needs, with writes kept inside the project’s folder, its checkout.
- What does it load? The run reads the repository’s instruction file, skills, and agent settings without asking, and those settings can start tools of their own.
- What can it reach? Every command the run executes, the project’s tests included, inherits the environment variables of the shell that started it. A token in that environment is a token the run holds, and so is the API key that pays for the run.
- When does it stop? A run that goes in circles at 3 a.m. keeps using your plan or your credit until something stops it, so it needs caps on turns, time, or spending.
Claude Code and Codex each have a flag that skips every approval, and it looks like the answer to “nobody is there to approve.” But that flag lets every command run with whatever the machine and its environment can reach. Allow in advance exactly what the task needs instead.
Build the Command for Issue #4
A headless run gets one message from you, so the task carries everything a session would have picked up from your replies. Here’s an example task for issue #4, with the goal, the limits, and the done-when:
Issue #4: add an "instruments" category to the categories
volunteers can pick in src/categories.js, with a test for
it in the existing category test file in test/.
Change only src/categories.js and that test file.
Don't edit CHANGELOG.md or docs/map.md.
Done when npm test passes.
End with a short report: the files you changed and the
npm test result.
Save it with your editor as issue-4-task.txt in your home folder, outside the repository, so the run’s changes are the only changes in the checkout. You wrote the issue into the task yourself, so the agent needs no GitHub access, and issue text that other people write never reaches it.
The commands from here on are for a Unix-style shell, as on macOS and Linux. On Windows, run them in WSL 2, a Linux environment for Windows, whichever agent you use. If your agent isn’t installed in WSL yet, run wsl --install in PowerShell as administrator. Then, inside WSL, install Claude Code or Codex and Node 26, and sign in to your agent there.
Copy the festival repository into your WSL home folder with cp -r /mnt/c/Users/YOUR-NAME/lost-property ~, using its path on Windows, and open the copy in your editor under \\wsl$\. Your user settings and MCP servers from earlier lessons stay in the Windows install, and this run doesn’t need them.