Repository navigation
fix(server): stop Codex turns stuck in a compaction loop (release line) - #126
Merged
Merged
Conversation
Track Codex compactions per thread. Three within five minutes appends a visible error activity and interrupts the active turn without resuming. (cherry picked from commit 1fd3fae) Ported-to: release/native-0.1.10 (CLO-941) Model: claude-opus-5-5 Task: coding Task: CLO-941 port CLO-921 Agent: T3 Claude Code (CLO-921 lane) Agent: magpie-port Lane: magpie Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A manual /compact tags only the first of Codex's two compaction signals, so the untagged pair was still counting. Three manual compacts, or one manual plus two automatic ones, could stop the turn. That pair is now ignored. A loop that trips while no turn is active keeps its history, so the next compaction on a live turn still stops. (cherry picked from commit 551fab3) Ported-to: release/native-0.1.10 (CLO-941) Model: grok/grok-4.7 Model: claude-opus-5-5 Task: coding Task: CLO-941 port CLO-921 Agent: T3 Codex (CLO-921 lane) Agent: magpie-port Lane: magpie Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…guard Codex subagents carry their parent's run, so three subagents that each compacted once within five minutes interrupted a healthy parent turn. The guard now keeps history per provider thread, reuses the shared compaction command check, and lets interrupts through instead of logging them. Review finding from the CLO-941 port review of the compaction-loop guard (CLO-921). Model: claude-opus-5-5 Task: CLO-941 port the Codex compaction-loop guard (CLO-921) to the release line Agent: magpie Lane: magpie Harness: t3/claude-code Model-family: Claude Model-generation: 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Codex compaction-loop guard (Linear CLO-921) was opened against the stale
mainin #119, where it gets no CI and does not ship. This PR ports its two commits ontorelease/native-0.1.10(Linear CLO-941).CompactionLoopGuard.tsand its counting tests apply unchanged underorchestration-v2/.mainhooked the guard intoProviderRuntimeIngestion, which does not exist on the release line. Here the hook is a small worker built the same way asIdleCompactionService. It watches committed events for finished Codex compactions, and when the loop trips on an active run it sends the existingrun.interruptwith the loop message. Manual/compactruns are ignored.Differences from #119: the stop shows as one interrupt row with the loop message rather than a separate error row, and in-memory history is not cleared when a session exits.
Tests:
CompactionLoopGuard.test.tspasses (10). Typecheck fort3passes.check:changedshows the same knip andAgentContextBudgetfailures that are already on the base.Review round (claude-fable-5-2), fixed: compaction history is now kept per provider thread, so Codex subagents that each compact once no longer interrupt their parent turn. The new test fails before the fix and passes after (11 tests). The guard also reuses
isCompactionCommandMessageand lets interrupts through.Deploy: fleet
Model: claude-opus-5-5
Task: CLO-941 port the Codex compaction-loop guard (CLO-921) to the release line
🤖 Generated with Claude Code