Context compaction must never interrupt a commit sequence
Resolved 💬 6 comments Opened Apr 5, 2026 by BSKapps Closed Apr 14, 2026
When context compacts or exhausts mid-session, any pending git commit is lost. The model frequently defers commits to the end of long tasks, and when context runs out before that step, all work is orphaned as uncommitted changes with no record.
The commit is the most critical step. Context should never compact or run out in the middle of one.
What happens
- Long session (audit, refactor, multi-file edit) uses most of the context
- Model reaches commit step at the end
- Context compacts or exhausts mid-commit
- User finds uncommitted changes, no context, broken state
- Next session starts from a lossy summary and can't reconstruct what happened
Expected behavior
- Never compact during a commit sequence (stage → commit → verify)
- Warn with enough headroom to complete a commit before compaction
- Or treat commit as an atomic protected operation that always completes
Impact
Recurring problem across multiple projects. The work is done — files are edited correctly — but without the commit it's as if nothing happened.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗