Suppress cmux notifications for Codex subagents - #5
lawrencecchen wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe change adds shared subagent-origin helpers, propagates origin markers to spawned Codex processes, annotates subagent completion events, and routes completion notifications only for parent activity. Tests cover classification, routing, and Fast-mode service-tier propagation. ChangesSubagent origin handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: 🟡 Moderate · up to The change may still emit desktop completion notifications for subagents because the new routing decision is not connected to the cmux session hook; merge should wait for that integration or explicit owner acceptance. Sequence Diagram(s)sequenceDiagram
participant SpawnedCodex
participant PiCodex
participant Cmux
SpawnedCodex->>PiCodex: agent_end event
PiCodex->>PiCodex: Classify subagent origin
PiCodex->>Cmux: Annotated event and messages
Cmux->>Cmux: Retain child telemetry
Cmux->>Cmux: Suppress desktop completion notification
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
244fa5e to
9b652ad
Compare
Summary
Verification
npm testnpm run checkNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Suppresses desktop completion notifications for Codex subagents while retaining feed/stop telemetry and display behavior. Previously subagents disabled cmux hooks globally; now the session classifies subagent work and only skips completion notifications, and it avoids mutating parent completion events.
src/subagent-origin.tswith a shared origin contract (PI_CODEX_SUBAGENT="pi-codex-subagent-v1") and helpers to classify events and route notifications; attaches typed subagent details onagent_endonly for subagent events.subagentEnvironment(); suppression is independent of Pi custom-messagedisplaystate.Migration
PI_CODEX_SUBAGENT="pi-codex-subagent-v1"or includecmux_activity_origin: "subagent"in custom-message details to suppress completion notifications.CMUX_PI_HOOKS_DISABLEDandCMUX_SUPPRESS_SUBAGENT_NOTIFICATIONS.Written for commit be184c6. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation
Tests