Design session-sharing system for agent-manager (Claude Code, Codex, opencode)
Session from am-session-sharing-design-noimg on Hugging Face by thomwolf · Apache-2.0 · condensed by Coders Talk
44msession
0interventions
GOAL
Explore how each supported harness (Claude Code, Codex, OpenClaw, opencode, Gemini) stores sessions, then design a system to share, view, and fork agent sessions between teammates using Hugging Face Hub's trace viewer.
- +0Prompt · +0Work on the agent-manager github repo, clone it into this folder
- +0mAgent did · +0mResolved GitHub auth (gh CLI login needed), located huggingface/agent-manager as a private repo, cloned it, and explored the Node/Express + React/xterm.js codebase (~8.2k lines) that manages tmux-backed AI CLI sessions
- +25mPrompt · +25mBrainstorm a system to share agent sessions with someone else: explore how each harness (JSON/SQLite) stores sessions, freeze and share via a bucket, view in the native or a standard interface, and support forking/continuing across harnesses (e.g. share a Claude Code session, continue it in Codex)
- +25mAgent did · +25mInvestigated on-disk session formats for Claude Code, Codex, OpenClaw and opencode (JSONL vs SQLite), found existing harness parsers in traces.js, researched HF Hub's Agent Traces feature and Session Traces Format spec, and checked each CLI's native resume/fork flags
- Break · 38m away, not counted
- +29mPrompt · +29mScope decisions: share unit = one dataset repo per session (public/private), lean on HF's native viewer, skip workspace/context for phase 1, cross-harness via a briefing handoff, recipient = teammate with their own agent-manager space. Write a design doc.
- +30mAgent did · +30mVerified private-dataset access control constraints and, using a scripted headless Chromium test (playwright-core), confirmed the HF dataset embed/viewer route renders the full trace viewer (turns, tokens, collapsible thinking) inside an iframe rather than just a tabular grid
- +36mAgent did · +36mWrote docs/session-sharing.md (+330 lines) covering the design, then verified all cited code line references against the actual traces.js source
- +44mOutcome · +44mDesign doc for cross-harness session sharing delivered (330-line docs/session-sharing.md); session ends with a follow-up request to build example public and gated trace datasets from the current session
VERDICT
Next time I'd give the exact repo URL and confirm gh auth up front — that cost us several minutes of dead-end guessing at the start. The real payoff came from insisting the agent verify things empirically (checking actual on-disk formats, testing the HF embed viewer with a headless browser) rather than just summarizing docs, which is what turned the brainstorm into a concrete, buildable design doc.