fix(kap-server): deliver nested subagent lifecycle events - #3008
fix(kap-server): deliver nested subagent lifecycle events#3008ForeverMJ wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 843f2d72c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (spec === undefined) return false; | ||
| if (isGlobalEvent(envelope.type)) return false; | ||
| if (isAgentLifecycleEvent(envelope.type)) return false; | ||
| if (isControlPlaneLifecycleEvent(envelope.type)) return false; |
There was a problem hiding this comment.
Preserve transcript suppression for subagent lifecycle events
When a connection has a non-off transcript grade for the requesting agent, subagent.* events are already projected into transcript.ops because they remain in TRANSCRIPT_PROJECTED_EVENT_TYPES; this early return now also delivers the raw session_event, so live fan-out and cursor replay both duplicate each lifecycle transition for transcript clients. Keep the new agent-filter bypass if nested lifecycle events must reach main-only legacy subscribers, but do not bypass suppressedByTranscript when the emitting agent has an enabled grade.
AGENTS.md reference: packages/kap-server/AGENTS.md:L18-L22
Useful? React with 👍 / 👎.
Related Issue
Resolve #2992
#2992
Problem
Nested requester-owned terminal lifecycle events were cropped by the main-only
agent_filter, leaving snapshot-seeded cards running.What changed
Introduced one shared session control-plane lifecycle predicate for live filtering, replay, and transcript suppression.
Guardrails:
Verification:
git diff --checkpassed.Browser limitation:
/opt/google/chrome/chrome.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.