Skip to content

fix(#990): add critical commit-before-exit rule to skill - #991

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/990-commit-before-exit-rule
Open

fix(#990): add critical commit-before-exit rule to skill#991
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/990-commit-before-exit-rule

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Adds two instruction-level guardrails to skills/code-implementation/SKILL.md to prevent the recurring "completed work, no commit" failure where the agent finishes implementation and verification but stops before executing git add / git commit, discarding all work when the sandbox exits.

Changes:

  • Top-level critical rule (new ## Critical rule — commit before exit section before the Process flow): States that git add and git commit must be the agent's final tool calls before any text response, and that a disclosed partial commit is always better than no commit.
  • Step transition guard (between step 9d and step 10): Instructs the agent to proceed IMMEDIATELY to commit after verification passes, without producing text summaries or status updates first.

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

  • Secret scan passed on changed files and staged content
  • Pre-commit hooks run directly (sandbox network blocked pre-commit run): trailing-whitespace, end-of-file-fixer, detect-private-key, check-merge-conflict, mixed-line-ending all passed
  • make test — all tests pass except pre-existing failures in post-retro-test.sh (unrelated to this change)
  • gitlint validation passed

Closes #990

Post-script verification

  • Branch is not main/master (agent/990-commit-before-exit-rule)
  • Secret scan passed (gitleaks — dc7c805632ebb6b79a4b0890ef6da17fe8fc539d..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

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
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner August 24, 2026 18:51
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 24, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:53 PM UTC · Completed 7:03 PM UTC

Commit: 7e50e32 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.20

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] skills/code-implementation/SKILL.md — This file is under the skills/ protected path. The PR links to issue Code-implementation skill should add a critical commit-before-exit rule #990 and the description explains the rationale (addressing the recurring "completed work, no commit" failure), providing sufficient context. Human approval is always required for protected-path changes, regardless of context.

Low

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.


If you added more than necessary, revert the extras before staging.

**After verification passes, proceed IMMEDIATELY to Step 10 (Commit).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code-implementation skill should add a critical commit-before-exit rule

0 participants