(trace): subagent activity is traced from its single write path, with its source - #292
Merged
Merged
Conversation
… its source recv.subagent-spawned was emitted only by the local IPC handler, so remote and local-transcript subagents never appeared in the trace even while their running dot was painted. noteSubagentActivity now emits it with the source (local-ipc, remote-watch, local-transcript); recv.subagent-completed carries via ipc / ttl / parent-cleared. Closes #291.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #291.
Found while reading the overnight trace on v0.0.79 (
.work-files/switchboard/trace-2026-09-13-nuit.md, measure 3): one remote parent produced 2 277class.subagent running:trueand zerorecv.subagent-spawned, because the trace call lived in the local IPC handler while #288 made the remote and local-transcript sources callnoteSubagentActivity()directly.noteSubagentActivity(parent, agentId, source, extra)is now the sole emitter ofrecv.subagent-spawned;sourceislocal-ipc(default),remote-watchorlocal-transcript; the local handler passes itsbootstrap/heartbeatfields throughextra, so the payload shape is unchanged for the local case and emitted once.recv.subagent-completedcarriesvia:ipc(local completion event),ttl(the 60 s prune — the only completion the remote and local-transcript sources ever get),parent-cleared(parent PTY exit or remote stop).docs/activity-trace.mdupdated.test/dom-sidebar-subagent-running-parity.test.js: one spawned event per source, exactly one for the local path, the threeviavalues.