(remote): mirror subagent meta.json sidecars - #249
Merged
Conversation
readSubagentMeta() reads a sidecar next to the subagent transcript, but the remote inventory only ever listed *.jsonl, so mirrored subagents rendered SUB regardless of their real type (#244). Widen the inventory find and a dedicated isSafeMirrorRelPath gate (kept separate from isSafeRelPath so remote-watch's activity classification is untouched) to carry .meta.json alongside its transcript, with transcripts kept ahead of sidecars when a sync cycle is full.
Merged
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 #244.
Why
Remote subagents rendered
SUBinstead of their agent type. The type lives in a sidecaragent-<id>.meta.jsonnext to the transcript, read byreadSubagentMeta(); the remote inventory only listed*.jsonl, so the sidecar was never mirrored and the lookup returned null on the mirrored root.What
LIST_COMMANDlists*.meta.jsonalongside*.jsonl;parseInventory,fetchFilesand the mirror filter accept them through a separateisSafeMetaRelPathguard.isSafeRelPathstays.jsonl-only, so the watch channel keeps treating only transcript writes as activity.MAX_CYCLE_FILES/MAX_CYCLE_BYTES((remote): bound a sync cycle by file count and total bytes #238) never let sidecars starve them.SUBuntil the transcript itself changes..ai/contexts/session-cache.md.Measured on the host: 251 sidecars, ~140 bytes each, layout
<project>/<session>/subagents/agent-<id>.meta.json.Proof
Mutations on the shipped files, each red on its own test only:
.jsonl-only inventory guard → listing test;.jsonl-only mirror filter → mirror/readSubagentMeta, sidecar-mapping and priority tests; drop the fetch priority → priority test; drop the sidecar→transcript mapping → mapping test.task check: 1216 pass, 0 fail, 8 pre-existing skips.