Repository navigation
Keep a finished agent turn idle when a late tool result arrives - #15173
Conversation
#14522 made the reconciler adopt any phase declared on a resolution. Feed declares every tool result `.running`, so a tool result after a completed turn now projects Running. AgentSemanticNotificationDeliveryTests' feedToolResultDoesNotReopenSettledCompletion fails the same way in app-host shard 6/7 on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#14522 let a resolution's declared phase replace the session phase so a dismissed Pi idle dialog projects Idle. Feed and the CLI also declare `.running` on every ordinary resolution, which that rule now adopted, so a tool result arriving after a completed turn reopened it as Running. Honor only a declared `.idle`; other declarations fall back to the pre-#14522 rules, which keep a stopped root idle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 8 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Merge receipt for |
528c5a8 Keep a finished agent turn idle when a late tool result arrives (manaflow-ai#15173) b76db12 ci: clone owned build state in one clonefile call and start the seed download earlier (manaflow-ai#15175) ec90c2a ci: post a one-click dogfood link on app pull requests (manaflow-ai#15130) 05e0598 Keep tmux reattach bindings through update relaunch saves (manaflow-ai#15187) 5bf1b45 perf(claude-wrapper): skip redundant settings validation and overlap it with the ping (manaflow-ai#14872) a49afca read_text: explain why a terminal is not running and how to wake it (manaflow-ai#15159) # Conflicts: # .github/workflows/ci-macos.yml # .github/workflows/ci.yml # .github/workflows/test-e2e.yml
Summary
Since #14522, when Feed records a tool result after a Claude or Codex turn has completed, the session flips back to Running. Feed declares every tool result
.running(Sources/AgentFeedSemanticInput.swift). #14522 made the reconciler adopt any phase declared on a resolution, so that a dismissed Pi idle dialog could project Idle, and that rule now adopts the.runningtoo. The reconciler now honors only a declared.idle. Any other declaration goes through the rules from before #14522, which keep a stopped turn idle. A Pi idle-dialog resolution still settles to Idle.This regression is also what fails app-host shard 6/7 on
mainand on every PR that includes #14522. The "Run agent notification semantics" step failsAgentSemanticNotificationDeliveryTests/feedToolResultDoesNotReopenSettledCompletion(source:)at line 232 with.runninginstead of.idle. It failed this way onmain's run 36373808820 (job 108778128771) and on #12809's run 36373401453, attempt 2 (job 108790447141).Testing
swift test --package-path Packages/macOS/CmuxAgentJournal --filter runningToolResultDoesNotReopenSettledTurnfails for bothclaudeandcodexonc366c49af8, the new test on top ofmain(.running == .idle). It passes on0394e53094.CmuxAgentJournalpackage passes, 76 tests in 10 suites. That includes fix: bring Pi agent integration to parity #14522'sidleAttentionResolutionProjectsIdleandAgentLifecycleReducerTests/idleAttentionResolutionUsesDeclaredPhase.python3 scripts/verify-local.py: 3/3 selected checks passed (swift-syntax, package-groups, feature-flags).feedToolResultDoesNotReopenSettledCompletionor the other agent-notification suites locally, because they need an app-host build. App-host shard 6/7 runs them in CI.Changelog
none
Checklist
🤖 Generated with Claude Code
Summary by cubic
Fixes a regression where a tool result arriving after a Claude or Codex turn completed flipped the session back to Running, reopening a settled turn.
While #14522 let a resolution's declared phase replace the session phase (so a dismissed Pi idle dialog projects Idle), Feed declares every tool result
.running, so that rule was also adopting Running. The reconciler now honors only a declared.idle; any other declaration falls back to the prior rules, which keep a stopped root idle.Written for commit 0394e53. Summary will update on new commits.