Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

🤖 bug: a resume refused by the mutation gate can still accept a pending compaction replacement (#5400 follow-up)

Closed
#5,434 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start at AgentSession.streamWithHistory and trace acceptCompactionReplacement, the turn use lease confirmation, and the current refusal point. Check the formal/compaction model plus the retirement and witness handling that follows acceptance; done means a refused lease causes no replacement acceptance while preserving retry correlation and valid history.

Written by the indexing model from the issue text.

Description

backlog

Problem

Follow-up from #5400 / #5419. In AgentSession.streamWithHistory, a resume that carries a pending compaction replacement (preparation.resumeReplacement) accepts that replacement (acceptCompactionReplacement, a history rewrite) before the turn use lease is confirmed. If another backend's structural mutation gate refuses the lease, the resume fails afterwards, but the compaction replacement has already been committed to history.

The impact is history-only: no checkout work runs and no turn starts. The accepted replacement is the compaction protocol's own outcome, so the history stays valid. It is still a history write made by a resume that was then refused, which is the class #5400 closed for the [CONTINUE] sentinel.

Possible fix

Confirm the turn lease before the replacement acceptance, and keep the refusal at its current failure point so retry correlation does not change. Check this against the compaction model (formal/compaction) and the retirement/witness handling that follows acceptance.

Refs #5400, #5381


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $10.87

Dominant language
TypeScript
Stars
2k
Forks
140
Avg merge
2h 30m
Merged PRs (30d)
874

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coder/xum

All issues in coder/xum

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.