fix(#990): add critical commit-before-exit rule to skill - #991
fix(#990): add critical commit-before-exit rule to skill#991fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The code-implementation skill places commit at step 10 of 11. The model can end its response after verification passes without reaching the commit step, discarding all work when the sandbox exits. This has been observed in multiple runs where the agent completed implementation and verification with ample time remaining but simply stopped before committing. Two additions to skills/code-implementation/SKILL.md: 1. A top-level "Critical rule" section before the Process flow, stating that git add and git commit must be the final tool calls before any text response. 2. An emphatic step transition between step 9d (self-review) and step 10 (commit), instructing the agent to proceed immediately to commit without producing intermediate text output. These complement existing defense-in-depth proposals: #976 (harness-level detection), #773 (time-budget checkpoint), #584 (post-commit staging verification), and #821 (commit-existence gate). Note: pre-commit could not run in-sandbox (network blocked git fetch). Hooks were run directly: trailing-whitespace, end-of-file-fixer, detect-private-key, check-merge-conflict, mixed-line-ending all passed. Test suite has pre-existing failures in post-retro-test.sh unrelated to this change. Closes #990
|
🤖 Finished Review · ✅ Success · Started 6:53 PM UTC · Completed 7:03 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.20 |
ReviewFindingsMedium
Low
|
|
|
||
| If you added more than necessary, revert the extras before staging. | ||
|
|
||
| **After verification passes, proceed IMMEDIATELY to Step 10 (Commit). |
There was a problem hiding this comment.
[low] scope-overlap-coordination
The triage note on issue #990 warned that the step-transition guard (change #2) overlaps with #821 proposed change #3. The PR author acknowledged this in the body and states the change was scoped to avoid duplication. The two changes address different failure triggers (#821: pre-commit failure causing step-skipping; this PR: model voluntarily stopping after verification), making them complementary. A future merge conflict is possible when #821 lands.
Suggested fix: When #821 is implemented, the implementer should check this section for potential duplication or consolidation. No blocking action needed before merging this PR.
Summary
Adds two instruction-level guardrails to
skills/code-implementation/SKILL.mdto prevent the recurring "completed work, no commit" failure where the agent finishes implementation and verification but stops before executinggit add/git commit, discarding all work when the sandbox exits.Changes:
## Critical rule — commit before exitsection before the Process flow): States thatgit addandgit commitmust be the agent's final tool calls before any text response, and that a disclosed partial commit is always better than no commit.Context
This addresses the specific failure variant observed in agents#318 (run 32757440821) where the agent completed all work with 31 minutes remaining and simply ended the session before committing. It complements existing defense-in-depth proposals:
The step-transition language (change #2) is scoped to avoid duplicating #821's proposed change #3 per the triage agent's coordination note.
Testing
pre-commit run): trailing-whitespace, end-of-file-fixer, detect-private-key, check-merge-conflict, mixed-line-ending all passedmake test— all tests pass except pre-existing failures inpost-retro-test.sh(unrelated to this change)Closes #990
Post-script verification
agent/990-commit-before-exit-rule)dc7c805632ebb6b79a4b0890ef6da17fe8fc539d..HEAD)