You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix cross-subtree trace leak and add an aggregate output cap
Review on #599 found two real issues:
- findAgentTraceDir walked the whole (flat, shared) subagents/ tree
from the root workdirBase, so a Tier-2 nested orchestrator could
read any worker's trace, not just its own descendants. Wired
assertCanTargetAgent (authority.ts's first live call site) using the
worker's own SubAgentSessionStore id and the store's existing
parentSessionId chain, rather than reshaping the on-disk layout —
the disk tree is deliberately flat across the whole fleet (shared by
worktrees and intervention logs too), so a structural per-subtree
root would be a much larger change. To make that id available,
run.ts now names a worker's trace directory after its session-store
id when one is supplied (task-tool.ts passes it), instead of always
minting a fresh disk-only id.
- The per-entry, entry-count, and turn-window caps multiply (500 *
4,000 = 2,000,000 chars). Added a total-output character cap that
stops filling entries once reached and reports the remainder via the
existing `omitted` block.
Noted but not changed: readAllTurns loads each full segment before
bounds apply. Segments are already bounded to ~256KB by the writer, so
this isn't unbounded, but avoiding the read entirely needs a line-count
index or a streaming reader — left as a follow-up rather than
expanding this fix.
0 commit comments