You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(prompt): inject RuntimeStatusSuffix into first-turn agent prompt
Adds a RuntimeStatusSuffix constant to the prompt package and appends
it to the composed prompt on the first turn of each worker run. The
suffix instructs the agent how to signal blocked or needs-human-review
status via the .sortie/status file, per the A2O protocol.
- Add exported RuntimeStatusSuffix constant in internal/prompt/turn.go
- Restructure first-turn guard in RunWorkerAttempt to nest the tool
advertisement check inside an outer turnNumber==1 block, then
unconditionally append the status suffix (ordering: template output
→ tool advertisement → status suffix)
- Fix orchestrator_test.go first-turn prompt assertion to use
strings.HasPrefix instead of exact equality, since the suffix is
now appended after the template output
- Add TestRuntimeStatusSuffixInjection with four subtests covering
first-turn inclusion, ordering after tool advertisement, omission on
continuation turns, and injection when the template renders empty
Closes#231
Copy file name to clipboardExpand all lines: internal/prompt/turn.go
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,22 @@ import (
13
13
// such branching.
14
14
constDefaultContinuationPrompt="Continue working on this task. Review the current state of your work, check what remains to be done, and proceed with the next step. If you believe the task is complete, verify your changes and confirm completion."
15
15
16
+
// RuntimeStatusSuffix is a fixed instruction string appended to the agent
17
+
// prompt on the first turn of each worker run. It informs the agent of
18
+
// the A2O status-signaling protocol for reporting blocked or
19
+
// review-needed status via the .sortie/status file.
20
+
//
21
+
// Continuation turns omit this suffix because the instruction persists
22
+
// in the agent's conversation history from turn 1.
23
+
constRuntimeStatusSuffix=`If you determine that you cannot make further progress on this task without human
24
+
intervention, or if your work is complete and requires human review, signal the
0 commit comments