feat(subagents): expose frozen final metadata on ended hook#75973
feat(subagents): expose frozen final metadata on ended hook#75973anyech wants to merge 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: not applicable. as a bug reproduction. The feature is source-verifiable by comparing current main, where the ended hook lacks Next step before merge Security Review detailsBest possible solution: Land the narrow public hook metadata change after normal maintainer review and CI, preserving the no-raw-final-text boundary. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction. The feature is source-verifiable by comparing current main, where the ended hook lacks Is this the best way to solve the issue? Yes. Reusing the existing frozen-result capture and adding a privacy-minimal object to the existing ended-hook event is narrower than adding a new delivery path, exposing raw text, or inferring state from channel routing. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against f4f98f45c72f. |
4641832 to
a79903d
Compare
Add privacy-minimal metadata to subagent_ended hook events when a frozen child final result is available. Include only availability, hash, byte length, and capture timestamp so hook consumers can correlate final-ready completion without receiving raw final text. Document and test that the digest covers the exact UTF-8 bytes of frozenResultText for non-blank values.
a79903d to
4f3665d
Compare
|
Closing this PR to reduce my active authored PR queue after a newer PR was auto-closed for exceeding the repo's active-PR limit. Preserved rationale for this closure: This is not intended to discard the idea permanently. I will reopen or resubmit a smaller focused PR if maintainers want this direction after the current queue is reduced. |
Summary
subagent_endedhook eventsMotivation
Hook consumers sometimes need to correlate a subagent lifecycle completion with the frozen child final result without receiving raw conversation content or inferring delivery/routing from channel state. This adds a narrow, generic signal on the existing
subagent_endedhook while preserving privacy and avoiding any send/delivery behavior.Non-goals
Tests
corepack pnpm exec vitest run src/agents/subagent-registry-completion.test.ts src/plugins/wired-hooks-subagent.test.tsNotes
corepack pnpm tsgo:corewas also run before the panel-requested amendment. It still reports unrelated existingrecordToolPrepStagetyping errors insrc/agents/pi-*; this patch does not introduce errors in the touched files.