Skip to content

fix(kap-server): deliver nested subagent lifecycle events - #3008

Open
ForeverMJ wants to merge 1 commit into
MoonshotAI:mainfrom
ForeverMJ:fix/issue-2992-subagent-running-status
Open

fix(kap-server): deliver nested subagent lifecycle events#3008
ForeverMJ wants to merge 1 commit into
MoonshotAI:mainfrom
ForeverMJ:fix/issue-2992-subagent-running-status

Conversation

@ForeverMJ

Copy link
Copy Markdown

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:

  • Ordinary child content remains filtered.
  • No payload/schema/REST/config/docs/Web bundle changes.

Verification:

  • RED live/replay failures reproduced before the fix.
  • Focused GREEN live/replay checks passed after the fix.
  • Broadcaster 83/83 passed.
  • Adjacent 110/110 passed.
  • kap-server typecheck/build passed.
  • Five-lane review pass completed.
  • git diff --check passed.
  • No changeset/docs updates required by the already-recorded gen-changesets/gen-docs decisions.

Browser limitation:

  • Deterministic merge gate passed, but browser QA is not claimed because Chrome is missing at /opt/google/chrome/chrome.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 843f2d7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The running seed is still displayed after the sub-agent task is completed.

1 participant