Symptom: c2c invocations from codex visibly take ~10s. Reproduced independently: a repo .mcp.json c2c MCP server missed its 30s client startup timeout at ~02:40 AEST while the same handshake later completed in 0.95s.
Root cause: bursty host-wide IO saturation. Measured in one window: PSI io some 18-21% sustained, full 6-9%; nvme0n1p5 at ~1.0s average latency per I/O (only ~3MB/s throughput — latency-bound, not bandwidth-bound); btrfs flush kworkers in D-state; find ~/.c2c/repos 4.9s. Codex runs c2c hook codex on UserPromptSubmit + PostToolUse + SessionStart + SessionEnd with timeout = 10, and the hook path does several atomic (fsync) writes + registry reads + cross-broker alias scan — so a wave multiplies into the full 10s budget per prompt and per tool call.
c2c itself is fast when the disk is calm (all measured this session): whoami ~25ms, hook codex 172-572ms real broker / 97ms hermetic, MCP handshake 0.95s.
Contributors measured during waves
kitty scrollback writes ~2.2MB/s (TUI output churn from many agent panes — hermes ×3, codex ×2, claude, pi, chromium)
- pi-c2c idle snapshot churn: idle Pi session in
~/src/amaroo (c2c oc-plugin stream-write-statefiles, v0.14.4) writes ~37KB every ~5s ≈ 26MB/h of fsync fan-out, 63MB in its first 16 min, with zero activity
- connector-state sweep: 161/229
~/.c2c/repos/*/broker/connector-state.json written within 30 min (writer unidentified — long-lived c2c daemons had near-zero cumulative writes)
c2c-side aggravators / housekeeping debt
- stale untracked repo
.mcp.json ("tmp-restore-hook", Jul 19) pointed every MCP client at a dead /tmp broker → 30s timeouts + ghost alias; moved aside this session (.mcp.json.stale-tmp-restore-hook.bak)
- 229 dirs in
~/.c2c/repos/ walked by the B188/B191 cross-broker scan on every auto-register
~/.c2c/locks/ ≈ 20k+ session-reg-*.lock files (1.1MB dirents) since July, never pruned
- stale kimi notifier daemon (3.5d old, cwd = deleted worktree); prior notifier log hit 52MB
Proposed follow-ups
- Prune
~/.c2c/repos test/worktree debris + stale session-reg-*.lock files (add a c2c dev housekeeping command or extend c2c dev instances clean-stale scope).
- pi-c2c: gate/throttle
stream-write-statefiles fan-out when the session is idle (skip no-change snapshots); rebuild the pi extension against current c2c (it runs 0.14.4).
- Hook fast-path: when the session is already registered locally, skip the cross-broker alias scan; consider PSI-aware backoff so a wave does not burn the whole 10s hook budget on registry writes.
- Identify the connector-state sweep writer; make it incremental (skip unchanged brokers).
c2c doctor: add an IO-pressure check (PSI) so "slow c2c" triage starts with the host, not the binary.
Full evidence + timings: .collab/findings/2026-09-02T16-55-00Z-grok-c2c-10s-stalls-host-io-waves.md
Symptom: c2c invocations from codex visibly take ~10s. Reproduced independently: a repo
.mcp.jsonc2c MCP server missed its 30s client startup timeout at ~02:40 AEST while the same handshake later completed in 0.95s.Root cause: bursty host-wide IO saturation. Measured in one window: PSI io
some18-21% sustained,full6-9%; nvme0n1p5 at ~1.0s average latency per I/O (only ~3MB/s throughput — latency-bound, not bandwidth-bound); btrfs flush kworkers in D-state;find ~/.c2c/repos4.9s. Codex runsc2c hook codexon UserPromptSubmit + PostToolUse + SessionStart + SessionEnd withtimeout = 10, and the hook path does several atomic (fsync) writes + registry reads + cross-broker alias scan — so a wave multiplies into the full 10s budget per prompt and per tool call.c2c itself is fast when the disk is calm (all measured this session):
whoami~25ms,hook codex172-572ms real broker / 97ms hermetic, MCP handshake 0.95s.Contributors measured during waves
kittyscrollback writes ~2.2MB/s (TUI output churn from many agent panes — hermes ×3, codex ×2, claude, pi, chromium)~/src/amaroo(c2c oc-plugin stream-write-statefiles, v0.14.4) writes ~37KB every ~5s ≈ 26MB/h of fsync fan-out, 63MB in its first 16 min, with zero activity~/.c2c/repos/*/broker/connector-state.jsonwritten within 30 min (writer unidentified — long-lived c2c daemons had near-zero cumulative writes)c2c-side aggravators / housekeeping debt
.mcp.json("tmp-restore-hook", Jul 19) pointed every MCP client at a dead/tmpbroker → 30s timeouts + ghost alias; moved aside this session (.mcp.json.stale-tmp-restore-hook.bak)~/.c2c/repos/walked by the B188/B191 cross-broker scan on every auto-register~/.c2c/locks/≈ 20k+session-reg-*.lockfiles (1.1MB dirents) since July, never prunedProposed follow-ups
~/.c2c/repostest/worktree debris + stalesession-reg-*.lockfiles (add ac2c devhousekeeping command or extendc2c dev instances clean-stalescope).stream-write-statefilesfan-out when the session is idle (skip no-change snapshots); rebuild the pi extension against current c2c (it runs 0.14.4).c2c doctor: add an IO-pressure check (PSI) so "slow c2c" triage starts with the host, not the binary.Full evidence + timings:
.collab/findings/2026-09-02T16-55-00Z-grok-c2c-10s-stalls-host-io-waves.md