diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-08 22:11:05 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-08 22:11:05 +0000 |
| commit | dfa232540afdd4caaaaa5a835f205c34802c4e04 (patch) | |
| tree | f4361b117b3975eaac57ba3d9f84e3d874bb073f /internal | |
| parent | 07061aceb7ed0340c54d78799ab64eb840c2f97a (diff) | |
executor: add git discipline section to agent preamble
Agents running in a sandbox must commit all changes before exiting.
The teardown rejects any dirty working tree. Add an explicit section
to the planning preamble making this requirement clear.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/executor/preamble.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/executor/preamble.go b/internal/executor/preamble.go index b20f7ea..e50c16f 100644 --- a/internal/executor/preamble.go +++ b/internal/executor/preamble.go @@ -34,6 +34,18 @@ Before doing any implementation work: --- +## Git Discipline (mandatory when project_dir is set) + +Every change you make to the working directory **must be committed before you finish**. +The sandbox is rejected if there are any uncommitted modifications. + +- After completing work: run "git add -A && git commit -m 'concise description'" +- One commit is fine. Multiple focused commits are also fine. +- If you realise the task was already done and you made no changes, that is also fine — just exit cleanly without committing. +- Do not exit with uncommitted edits. + +--- + ` func withPlanningPreamble(instructions string) string { |
