feat: run catalog — registry tombstones, cross-project view picker, agent pids#42
Merged
Conversation
…gent pids Ideas 7+8 first cut, taking the tombstone road (option b): traces stay in-project, the registry remembers where they are. Capture runs no longer delete their instance entry on exit — they tombstone it (endedAt stamped, heartbeat stopped), leaving a catalog entry: client, project path, ABSOLUTE trace file, session id, time range. view runs still unregister (a view is not a run). Tombstones prune after 30 days, are never listed live, and are exempt from live GC. cctrace view's no-target picker now lists 'recent runs elsewhere' from the catalog after the local traces — cross-project, re-stat'd before offering (a path from another container that doesn't resolve here just doesn't list, never errors), selectable by number. User-facing listings (ps, the header switcher, /api/instances) sort project-first then newest — registry scan order is arbitrary and reads as noise once several containers run concurrently. Registry entries also carry the traced client child's agentPid next to cctrace's own pid: a new AGENT column in ps and both pids in the switcher tooltip. Informational only — pids stay namespace-local and never feed liveness (that stays heartbeat+probe). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lroolle
added a commit
that referenced
this pull request
Jul 17, 2026
Release housekeeping for the #37-#42 feature train: CHANGELOG entries for all six, landing-page drift fixes (tunnel-by-default scope replaced the stale "intercepts ALL hosts" claim; exit snapshots are gone, view --html is the story now, Codex/Grok join the title), and the npm description aligned with the multi-client reality. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
First cut of ideas 7+8, on the design's preferred road: tombstones, not trace relocation — traces stay in-project, the registry remembers where they are.
Tombstones (the run catalog)
<data-dir>/instances/<run-id>.jsonon exit:tombstone()stampsendedAt, stops the heartbeat, and leaves the entry as a catalog record (client, project path, absolute trace file, session id, time range).viewruns still unregister — a view is not a run.Cross-project view picker
cctrace viewwith no target now appends recent runs elsewhere after the local trace list — project + client + trace + age, selectable by number. Every offer is re-stat'd first: a tombstone written in another container may name a path that doesn't resolve here; such runs simply don't list (never an error).Listing order + pids
ps, the header switcher, and/api/instancessort project-first, newest within — registry scan order stops reading once several containers run concurrently.agentPid(the spawned claude/codex/grok child) beside cctrace's own pid: new AGENT column inps, both pids in the switcher tooltip. Informational only — pids are namespace-local and never feed liveness (heartbeat+probe unchanged).Not in this cut
The in-page trace library (browse/open traces inside the web UI) and the always-on hub port are follow-up — they need the serve-shaped server design settled first; the tombstone catalog this PR adds is the data layer both will read.
Smoke-tested: a tombstoned run in project A lists (and opens) from an empty project B's picker. 408 tests pass (4 new tombstone tests).
🤖 Generated with Claude Code