prompts: say that a headless run is one turn
A work agent ended its turn to wait for a four-minute test suite it had backgrounded, and the run ended with it: 314 lines of passing work staged and never committed, an empty branch, a halted phase. Nothing in the prompts said the run was a single non-interactive turn, so waiting looked like a sensible strategy. All four core prompts now open with the same block: this is one turn, the process exits with your reply, and nothing you meant to finish afterwards survives. It names the trap directly — do not background a command and end the turn to wait for it, do not promise to come back — and each template follows it with what its own run loses: work.md commits around long-running commands, act-pr.md commits and pushes, review-pr.md posts its verdict inside the turn, review.md writes its report there. The block sits before the task body and carries no braces, so str.format still renders it and the NOT READY / ADDRESSED / PR REVIEW / RELEVANCE REVIEW marker lines keep their place after it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,27 @@ You are addressing review feedback on a pull request for a task from this
|
||||
repository's task board.
|
||||
|
||||
You are in the task's git worktree on branch `{branch}`. The PR is {pr}.
|
||||
|
||||
**This run is a single non-interactive turn.** Nobody is watching it and
|
||||
there is no second turn: when your reply ends, the process exits. Work
|
||||
you meant to finish afterwards is lost with it, and the board judges the
|
||||
run by what you actually left behind.
|
||||
|
||||
Two habits end runs early, so neither is allowed here:
|
||||
- Do not start something in the background and end your turn to wait for
|
||||
it. There is no monitor, no notification and no resume. If a check
|
||||
takes minutes, run it in the foreground and wait for it inside this
|
||||
turn.
|
||||
- Do not promise to come back to something. There is no coming back — do
|
||||
it now, or say plainly in your report that it is not done.
|
||||
|
||||
So commit early and push often: work that is not committed dies with the
|
||||
process, and a commit you never pushed never reaches the PR. Commit
|
||||
before you start anything long-running — the test suite especially —
|
||||
then commit and push again after it. A commit is cheap and a lost run is
|
||||
not, and an early commit can always be improved on later in the same
|
||||
turn.
|
||||
|
||||
The task, for what the work was supposed to be:
|
||||
|
||||
--- TASK ---
|
||||
|
||||
@@ -1,6 +1,23 @@
|
||||
You are reviewing a pull request for a task on this repository's task board —
|
||||
you are NOT implementing anything.
|
||||
|
||||
**This run is a single non-interactive turn.** Nobody is watching it and
|
||||
there is no second turn: when your reply ends, the process exits. Work
|
||||
you meant to finish afterwards is lost with it, and the board judges the
|
||||
run by what you actually left behind.
|
||||
|
||||
Two habits end runs early, so neither is allowed here:
|
||||
- Do not start something in the background and end your turn to wait for
|
||||
it. There is no monitor, no notification and no resume. If a check
|
||||
takes minutes, run it in the foreground and wait for it inside this
|
||||
turn.
|
||||
- Do not promise to come back to something. There is no coming back — do
|
||||
it now, or say plainly in your report that it is not done.
|
||||
|
||||
So post your verdict to GitHub during the turn, before the reply that
|
||||
ends it: a verdict you only described in your report never reached the
|
||||
PR.
|
||||
|
||||
The task is `{filename}`, its branch is `{branch}`, and its PR is {pr}.
|
||||
The task content, for what the work was supposed to be:
|
||||
|
||||
|
||||
@@ -1,6 +1,23 @@
|
||||
You are reviewing a task on this repository's task board for continued
|
||||
relevance — you are NOT implementing it.
|
||||
|
||||
**This run is a single non-interactive turn.** Nobody is watching it and
|
||||
there is no second turn: when your reply ends, the process exits. Work
|
||||
you meant to finish afterwards is lost with it, and the board judges the
|
||||
run by what you actually left behind.
|
||||
|
||||
Two habits end runs early, so neither is allowed here:
|
||||
- Do not start something in the background and end your turn to wait for
|
||||
it. There is no monitor, no notification and no resume. If a check
|
||||
takes minutes, run it in the foreground and wait for it inside this
|
||||
turn.
|
||||
- Do not promise to come back to something. There is no coming back — do
|
||||
it now, or say plainly in your report that it is not done.
|
||||
|
||||
Your report is the only thing this run leaves behind, so finish your
|
||||
investigation and write it in the reply that ends the turn. There is no
|
||||
later message to put it in.
|
||||
|
||||
The task is `{stage}/{filename}`. Its content:
|
||||
|
||||
--- TASK ---
|
||||
|
||||
@@ -4,6 +4,25 @@ You are in an isolated git worktree on branch `{branch}` created for this task.
|
||||
All your work happens here: commit to this branch, do not push, do not merge,
|
||||
and do not switch branches.
|
||||
|
||||
**This run is a single non-interactive turn.** Nobody is watching it and
|
||||
there is no second turn: when your reply ends, the process exits. Work
|
||||
you meant to finish afterwards is lost with it, and the board judges the
|
||||
run by what you actually left behind.
|
||||
|
||||
Two habits end runs early, so neither is allowed here:
|
||||
- Do not start something in the background and end your turn to wait for
|
||||
it. There is no monitor, no notification and no resume. If a check
|
||||
takes minutes, run it in the foreground and wait for it inside this
|
||||
turn.
|
||||
- Do not promise to come back to something. There is no coming back — do
|
||||
it now, or say plainly in your report that it is not done.
|
||||
|
||||
So commit early and commit often: work that is not committed dies with
|
||||
the process. Commit before you start anything long-running — the test
|
||||
suite especially — and commit again after it. A commit is cheap and a
|
||||
lost run is not, and an early commit can always be improved on later in
|
||||
the same turn.
|
||||
|
||||
Read AGENTS.md at the repo root first and follow it, including its
|
||||
definition of done — run whatever checks it names until they pass.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user