AI
Fix a bug: reproduce → approve → fix → tests → PR
Runs on the assignee's computer with their coding agent. The agent reproduces the bug with a failing test and finds the cause, a person approves the fix, the agent fixes it, failing tests go back to it, and it opens a pull request.
- Runs inAssignee's computer
- ReadsTask + its context
- Verified by1 automatic check · 1 approval
- Limits60 min a run · 10 min a step · may ask people
- DeliversComment on the task
Start
The assignee presses Run on their task. Their connected computer picks the run up and does each step there, with their coding agent.
Advanced: what an instruction can point at
- {{task}}
- the task: code · title · description (up to 4,000 characters), then its context: the project and its week, parent task, subtasks, recent comments, files, documents it names, similar tasks (up to 6,000 characters).
- {{previous}}
- the last result before the step (an AI step's or a command's), with any notes approvers gave since; up to 8,000 characters.
- {{steps.key}}
- an earlier step's result, by its key.
- {{input.key}}
- what the person filled in at Run for that field.
- {{resources}}
- the playbook, pages, text files and the list of other files and links (up to 20,000 characters); added before the instruction when not placed.
- {{answers}}
- the answers people gave to the run's questions so far; added at the end when the instruction doesn't place them.
1Reproduce and find the causeAsk the AIopus1 done · 0 failed · 3m 40s
- Model
opuspassed to the agent (--model)- Role
A debugger: proves the cause before proposing a fix.
- Gets
- Task + context
- Result goes to
- read by Step 3 · Fix · shown to the approver at Step 2 · Approve the fix
- Tools
- The agent's own: its MCP servers, skills and the files in the working folder.
- Questions
- May ask the people on the task before it works, and again after their answers (up to 3 rounds).
Instruction
Read the bug report in the task below and the code in this folder. On a new branch named after the task code, write a test that fails because of this bug and commit it; do not fix the bug yet. Then report: ## How to reproduce, ## Cause (file and function), ## Proposed fix, ## What else it could affect. Ask only if the report does not say how to trigger the bug. {{task}}
Show what the model receivesHide what the model receives
A coding agent gets no system prompt from the workspace: the role goes at the top of its input.
user
Your role for this step: A debugger: proves the cause before proposing a fix. Read the bug report in the task below and the code in this folder. On a new branch named after the task code, write a test that fails because of this bug and commit it; do not fix the bug yet. Then report: ## How to reproduce, ## Cause (file and function), ## Proposed fix, ## What else it could affect. Ask only if the report does not say how to trigger the bug. task + context (the answers to the run's questions, when there are any) If something essential to this step is unclear and you cannot make a reasonable assumption, do not guess. Instead reply with only this block and stop: ```workspace-ask {"questions": [{"text": "<your question>", "options": ["<answer A>", "<answer B>"], "default": "<answer A>"}, {"text": "<another question>", "default": "<your best guess>"}]} ``` At most 5 short questions, in the language of the task, all at once. Ask again after the answers only about something new they raise. First use the context above and the answers so far; never ask what they already say. Give "options" when the possible answers are known, and "default" with your best guess from the context, so people only correct it. The people on the task answer, then this step runs again with their answers. Ask only when it matters; otherwise do the step. (when an approver sent the result back: their request and the previous result)
2Approve the fixWait for approvalAnyone who may edit the task · Step 1 · Reproduce and find the cause1 done · 0 failed · 7m 20s
- Who
- Anyone who may edit the task
- Can
- Approve: the run goes on; a note is passed to the next step.
- Ask for changes: Step 1 · Reproduce and find the cause runs again with the request, then every step after it.
- Stop the run.
3FixAsk the AIsonnet1 done · 0 failed · 3m 40s
- Model
sonnetpassed to the agent (--model)- Gets
- Task + contextResult of step 1Approver notes (step 2)
- Result goes to
- checked at Step 4 · Tests pass
- Tools
- The agent's own: its MCP servers, skills and the files in the working folder.
- Questions
- Doesn't ask: where something is unclear it decides and says what it assumed.
Instruction
Fix the bug as proposed below; a note from the approver, if any, is at the end and comes first. Make the failing test pass with the smallest change that removes the cause, not the symptom. Commit when done: the first line of the message says what was wrong, the body how it was fixed. Then summarize the fix in three lines. Diagnosis: {{previous}} {{task}}
Show what the model receivesHide what the model receives
A coding agent gets no system prompt from the workspace: the role goes at the top of its input.
user
Fix the bug as proposed below; a note from the approver, if any, is at the end and comes first. Make the failing test pass with the smallest change that removes the cause, not the symptom. Commit when done: the first line of the message says what was wrong, the body how it was fixed. Then summarize the fix in three lines. Diagnosis: result of step 1 task + context (the answers to the run's questions, when there are any) Do not ask any more questions: where something is still unclear, make a reasonable assumption, say which, and do the step. (when an approver sent the result back: their request and the previous result)
4Tests passCheck automatically
$ npm test1 done · 0 failed · 3m 40s- Judge
- Exit code 0 passes; anything else fails and its output is the issue list.
- If it still fails
- Sends the work back to Step 3 · Fix up to 3 times. The run fails and says why.
5Open a pull requestRun a command
$ git push -u origin HEAD && gh pr create --fill1 done · 0 failed · 3m 40sRuns in the working folder on the assignee's computer. Its output is the step's result; a non-zero exit stops the run as failed.
6Move to In reviewMove the taskIn review1 done · 0 failed · 1s
Moves the task to In review, as the person who pressed Run.
End
The result of step 5 · Open a pull request is delivered: Comment on the task.