🤖 bug: a resume refused by the mutation gate can still accept a pending compaction replacement (#5400 follow-up)
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
- Domain
- distributed-systems
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
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/xum
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug investigation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
approved backlog
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
approved backlog
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
approved backlog
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
homarr-labs/dashboard-icons#2939 ·
Maintainers usually reply within 1 day
-
Agent/category reasoning variants are still checked against the stale model cache in chat.paramsOpenopencode
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
code-yeongyu/oh-my-openagent#10003 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Actions on ToastsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
Maintainers usually reply within 1 day