Skip to content

fix: bump claude-code-headless for stale-flow watchdog - #38

Merged
Juliusolsson05 merged 1 commit into
mainfrom
fix/proxy-stale-flow-watchdog
May 1, 2026
Merged

Juliusolsson05 merged 1 commit into
mainfrom
fix/proxy-stale-flow-watchdog

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

Submodule pointer bump that pulls in Juliusolsson05/claude-code-headless#5 — the 30s watchdog on `ClaudeProxyAdapter.activeStreamingFlowId`.

Why

`activeStreamingFlowId` is the proxy's active-flow lock. It's set on first SSE chunk and was only released by an explicit `response-end` transport event. If the SSE stream is severed mid-response (network blip, proxy disconnect), no `response-end` arrives, the lock stays held forever, every later flow gets `flow_ignored`, and the renderer's live "Sending…" indicator pins on a ghost turn that never finalizes.

Captured in debug bundle `~/.config/cc-shell/debug-bundles/2026-05-01T10-07-21-3357bfc7`:

  • Active flow `4527847056` held the lock for 14+ hours.
  • Two later submits emitted as `flow_ignored 'concurrent with active flow 4527847056'`.
  • The visible "Sending · 27s" indicator was structurally tied to a ghost turn ending mid-text at `Worktrees cleared. 12`.

JSONL fallback kept the feed itself working (new turns rendered), but every semantic phase event was being silently dropped.

What this PR contains

Just the submodule bump. Zero cc-shell source changes.

The actual code fix is in the headless PR.

Merge order

Merge headless#5 first. This PR points at a commit on a fix branch in the headless repo; merging this before #5 lands would point cc-shell at a non-main commit.

Test plan

  • Submodule `npm run build` clean
  • After both PRs land, simulate a severed flow (kill the proxy mid-turn) → confirm next submit recovers within 30s with a `flow X reaped (no chunk for Ns)` diagnostic in the next debug bundle, and the live "Sending…" indicator clears.

🤖 Generated with Claude Code

Picks up Juliusolsson05/claude-code-headless#5, which adds a 30s
watchdog to ClaudeProxyAdapter.activeStreamingFlowId. Without that fix,
a single severed SSE stream pins the active-flow lock forever and
every subsequent flow gets emitted as flow_ignored — the renderer's
semantic phase never transitions out of `submitting` so the live
"Sending..." indicator pins on a ghost turn.

Captured in debug bundle 2026-05-01T10-07-21-3357bfc7: a stuck flow
held the lock for 14+ hours before being noticed. JSONL fallback kept
the feed working (new turns rendered) but the live indicator was
permanently stuck on a mid-response cutoff.

Submodule-only bump — no cc-shell code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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