
Claude Code subagent prompts: rules after 5 cut-off agents
Five of our subagents hit usage limits, and the reports they had created first were almost empty. The agents that took over started from the logs and edited files the first ones had left on disk.
Many agents, one repository 2/6
A Claude Code subagent that hits a session or weekly usage limit stops mid-task. Between September 7 and 10, 2026, five subagents preparing a Flutter peer-to-peer chat app for release stopped this way. Their brief (the written instructions each subagent gets) said to create the report first and fill it in as they worked, yet the cut-off reports were mostly empty sections. What made the handovers work was the files that piled up as a side effect of the work: logs, screenshots and edited files.
Contents (10)
- Five agents cut off, September 7 to 10
- A 33-line shared brief: six bans and a report format
- Why the early reports were empty
- The agents taking over read git diff and the raw folder first
- The "how to verify" column corrected a prediction
- What if subagents committed their own work?
- Read-only work leaves nothing behind
- A brief template and the commands for a handover
- One line per verdict is still untested
- FAQ
Five agents cut off, September 7 to 10
Three hit the session limit, one the weekly limit, and one has no recorded reason. In all five cases the agent that took over finished the job.
| Task | Why it stopped | Report when cut off | After the handover |
|---|---|---|---|
| Emulator lab analysis | Not recorded | 19 lines, every section "in progress" | 71 lines, 47 minutes later. Started from a device script and two screenshots |
| Docs merge | Session limit | 19-line skeleton; four edited docs left uncommitted | 192 lines. Done parts were not rewritten |
| Post-fix E2E | Session limit | 41 lines, only the environment table | 338 lines in 50 minutes, reusing the raw logs |
| Device recheck | Weekly limit | Evidence nearly all collected | Main session judged it from 85 screenshots and 8 log types |
| String audit | Session limit | 8-line skeleton, no files left | 1,046 lines, measured again from scratch |

A 33-line shared brief: six bans and a report format
The brief had a one-line goal, verified facts about the environment, six hard rules and a report format; each agent got its topic separately. The environment facts listed the Flutter version, two emulators, and "no physical device, no macOS." The rules, in short:
- Do not install system packages or add dependencies. If one is needed, write "approval needed" in the report.
- Do not upload anything. Outputs stay as files in the repository.
- In the analysis phase, do not touch app code. Write scripts and docs only.
- No blanket search-and-replace. Move files to a temp folder instead of
rm -rf. - Cite outside policies with a URL and a check date; label guesses as guesses.
- Create the report early at a fixed path and update it as you go, "so partial results survive if the session ends."
The findings table had six columns: ID, severity (Blocker/High/Medium/Low), description, evidence (file and line or URL), proposed fix, and how to verify. All 17 reports kept that format; the 16 with content held 233 findings, 15 of them Blockers, and the fix stage took its work by those IDs.
The bans were used. Thirteen analysis reports say "approval needed," and a proposal to add an icon-generation package became a script using a Python imaging library that was already installed. Keeping the ban list in one file that every run reads is the same idea as our permission table for a scheduled AI agent. The allowed severity values did not hold, though: reports invented "Info" and "Low to Medium."
Why the early reports were empty
Rule 6 asked agents to create and update the report but never said when to update it. Judging by the records, the verdicts lived only in each agent's conversation, not in a file, and no agent tidied its report before it was cut off.
The post-fix E2E report came closest to the rule. Its header said "if the session ends, treat empty cells as not measured," yet its results table was completely empty. The same folder held two logcats (about 100,000 and 90,000 lines), a server log, 43 screenshots and raw round-trip timings for 11 messages. The calculation script used the wrong log anchor, matched only one of them, and reported n=1, 11 ms.
The agents taking over read git diff and the raw folder first
The docs-merge agent stopped with its edits still in the working tree. Only the main session was allowed to commit, so it committed that state as partial work. The next agent began with git diff to see what had already changed: every item in the agent instruction file and 7 of 8 in the security doc were done, and the other nine docs were untouched. It finished 19 files without rewriting the done parts.
The agent that took over post-fix E2E kept the raw output for build, install, connection and message sending, and ran only the remaining tests. It did not re-measure latency either: it fixed the log anchor and recomputed the ten messages already sent, getting p50 61 ms and p95 74 ms.
The string audit was reading code and judging it, so it left no files. The next agent re-parsed 2,864 string literals in 93 files from scratch and judged the 464 that can reach the screen. What happened to the contrast checker the same day is in our contrast checker skipped 40% of the text.
In a subagent brief, say where and when to write raw evidence before you say "create the report first."
The "how to verify" column corrected a prediction
The security analysis read the code and predicted that an app restored from Android auto-backup would lose its encryption key and become permanently unusable. A lab agent followed that row's "how to verify" cell, running backup, uninstall, reinstall and restore for real, and the app did not lock up. After a key error it went back to setup and created a new profile; the old key and chat history quietly disappeared. The conclusion changed, but the proposed fix (turn off backup) was still needed.
Instructions were wrong at times too. The UI-fix agent reported that 3 of the 8 proposed patches from analysis were wrong or incomplete and fixed them before applying. The post-fix E2E instructions mapped ports in the wrong direction, so the app would have connected to itself; the agent reversed the mapping and noted it in the environment table.
What if subagents committed their own work?
Letting subagents commit would protect against cut-offs. This round forbade it: several agents edited files in the same working tree at once, and a single git stash or git checkout could wipe out someone else's changes. The price was uncommitted work after each cut-off, which the main session committed instead. How sessions collided in one working tree is in Multiple Claude Code sessions: one owner per file.
Nobody wrote a separate brief per agent either. The three later briefs (fixes, review fixes, full audit) said to "apply the shared brief as is" and added only what changed at that stage: edit only files you own, do not commit, write tests that fail when the guard is removed.
Read-only work leaves nothing behind
Taking over from files on disk only worked for tasks that create files as they go. Work that only reads code and judges it, like the string audit or a code review, leaves nothing. The environment section differs per machine, so reuse the template but check that section on your own setup. Whether these rules reduced defects cannot be said; there was no round to compare against.
A brief template and the commands for a handover
This template merges the rules of the shared brief and the fix-stage brief, and adds a path for raw output and a unit of update.
# <round> shared brief (<date>)
Goal: <one line>
## Environment (verified only)
- Tool paths and versions: <...>
- Devices available: <...> / not available: <...>
## Do not
1. Install or add packages. If one is needed, write "approval needed"
2. Upload anything. Outputs are files in the repository only
3. Edit files you do not own. Put requests in "requests to other owners"
4. commit, stash or checkout (the main session commits)
5. Guess without saying so. Outside docs get a URL and a check date
## Output paths
- Report: <dir>/<NN>_<topic>.md
Create it first; the first line is exactly "Status: in progress"
- Raw: <dir>/raw/<NN>_*
Save command output, logs and screenshots as soon as you get them
- Add a table row each time one finding or one measurement is done
## Report format
Summary / What was checked / Findings / Remaining unknowns
| ID | Severity | Description | Evidence (file:line / URL) | Proposed fix | How to verify |
Severity is exactly one of Blocker, High, Medium, Low
When taking over, read git and the raw folder before the report.
- Find unfinished reports by the status line or by the placeholder line that opens an empty section.
git grep -lE "^(Status: in progress|\(in progress\))" <commit> -- <report dirs> - See what the previous session changed.
git diff --stat <start commit>..<partial commit> -- <owned files> - List the raw folder. If a measurement has a suspiciously small n, check the calculation script before measuring again.
- Set the report's status to done and add one line on who took over what.
One line per verdict is still untested
For work with no side files, like the string audit, the next round will count how many lines survive a cut-off when the agent writes one line per verdict.
FAQ
When a subagent hits its session limit, is its work kept?
Only what it wrote to disk. The five cut-off reports were mostly empty sections; the handovers started from logs, screenshots and edited files produced along the way.
What should go first in a subagent prompt?
What not to do, where outputs and raw evidence go, and the report format. This round's shared brief covered those plus environment facts in 33 lines; each agent got its topic separately.
Does letting subagents commit solve the cut-off problem?
This round did not try it. Several agents shared one working tree, so only the main session committed; it committed cut-off work as partial and said in the message what was left.
Sources: the chat app repository's git history, the shared brief and three later briefs, 17 analysis reports and the fix reports. Times are Korea time; report lengths were recounted from git on November 13, 2026.
This note is written from values SugarMount measured itself; an AI coding agent was used to draft it.