Skip to content

control plane: inspect / tail / open - #4

Merged
zdql merged 1 commit into
mainfrom
feature/control-plane
May 26, 2026
Merged

zdql merged 1 commit into
mainfrom
feature/control-plane

Conversation

@zdql

@zdql zdql commented May 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

A running gamechat --realtime process now binds a tiny Unix domain socket and exposes JSON-over-newline RPCs so a second gamechat invocation can query active sub-agents and stream their progress without disturbing the live voice loop.

Subcommands

gamechat inspect              # table of slug, provider, status, last msg
gamechat tail <slug>          # cursor-based 750ms polling stream
gamechat open <slug>          # print `claude --resume <session_id>`
gamechat open <slug> --launch # macOS: open Terminal via osascript

open is claude-only — codex has no documented resume flag, so we error with a clear pointer to tail for codex slugs. Multiple gamechat processes? Pass --pid <PID> or --socket <PATH>.

What changed

The new src/control/ module is fully isolated: it depends only on a read-only handle to ProgressStore and never touches the voice loop or the orchestrator. Plumbing changes:

  • ProgressStore gained session_id per slug, a sequence counter on buffered entries, snapshot_all() (non-rate-limited), and entries_after(slug, cursor) for cursor-based tail.
  • ProgressReporter::set_session_id(); ClaudeClient calls it once it parses the session id from claude -p stream-json.
  • OrchestratorJobManager::progress_store() accessor + register slugs with the real provider name instead of the hardcoded "orchestrator".
  • voice_loop spawns the control server best-effort at startup (read-only headless envs just log and continue).

Note: Includes commits from #1 + #2 + #3. Mergeable independently — if those land first this PR's diff shrinks automatically.

Test plan

  • cargo test — 36 passing total, 5 new in control::server (one end-to-end socket roundtrip) and 4 in control::client::resume_command.
  • In one terminal: gamechat --realtime. In another: gamechat inspect after a delegation, gamechat tail <slug> to follow it, gamechat open <slug> --launch to pop a new Terminal into Claude Code.
  • Confirm gamechat open <codex-slug> errors cleanly.
  • Confirm stale-socket cleanup on next inspect after a crashed gamechat.

🤖 Generated with Claude Code

@zdql
zdql changed the base branch from feature/zany-personas to main May 26, 2026 18:01
A running `gamechat --realtime` process now binds a tiny Unix domain
socket and exposes JSON-over-newline RPCs so a second `gamechat`
invocation can query active sub-agents and stream their progress.

Subcommands:
  gamechat inspect              # table of slug, provider, status, last msg
  gamechat tail <slug>          # cursor-based 750ms polling stream
  gamechat open <slug>          # print `claude --resume <session_id>`
  gamechat open <slug> --launch # macOS: open Terminal via osascript

`open` is claude-only — codex has no documented resume flag, so we error
with a clear pointer to `tail` for codex slugs. Multiple gamechat
processes? Pass `--pid <PID>` or `--socket <PATH>`.

The new `src/control/` module is fully isolated: it depends only on a
read-only handle to `ProgressStore` and never touches the voice loop or
the orchestrator. Plumbing changes to make this possible:

  - `ProgressStore` gained `session_id` per slug, a sequence counter on
    buffered entries, `snapshot_all()` (non-rate-limited), and
    `entries_after(slug, cursor)` for cursor-based tail
  - `ProgressReporter::set_session_id()`; `ClaudeClient` calls it once
    it parses the session id from `claude -p` stream-json
  - `OrchestratorJobManager::progress_store()` accessor + register slugs
    with the real provider name instead of the hardcoded "orchestrator"
  - `voice_loop` spawns the control server best-effort at startup

41 tests pass, including 5 new in `control::server` (one end-to-end
socket roundtrip) and 4 in `control::client::resume_command`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zdql
zdql force-pushed the feature/control-plane branch from db7d09e to 7a4d74a Compare May 26, 2026 18:07
@zdql
zdql merged commit 92c318d into main May 26, 2026
@zdql
zdql deleted the feature/control-plane branch May 26, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant