You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xai/grok-4.6 subagent reviews (architect / critic) repeatedly die with:
OpenAI completions stream stalled while waiting for the next event
The reviewer has already finished the review in thinking. The official assistant text never arrives, so the parent session receives only failed and cannot apply the review.
This is the xAI / openai-completions counterpart of #4096 (Anthropic max-reasoning vs the shared 120s idle watchdog). #4096 is closed and Anthropic-specific. The same watchdog still kills Grok xhigh after first-token / first-thinking progress.
Workflow: superpowers-brainstorming independent spec review, then superpowers-writing-plans critic
Repo: private product session, not a GJC source checkout
PI_STREAM_IDLE_TIMEOUT_MS, PI_OPENAI_STREAM_IDLE_TIMEOUT_MS, and GJC_OPENAI_STREAM_IDLE_TIMEOUT_MS unset
Reproduction
Run superpowers-brainstorming on a non-trivial spec with default grok-4.6 / xhigh.
Dispatch read-only task(agent="architect") for the spec review.
The reviewer reads files and starts writing ## Spec Review in thinking.
After ~120s of no further SSE events, the turn ends as stopReason: error.
Retrying the same review dies the same way. A later critic plan review dies the same way.
Evidence
Three consecutive reviewer turns in one session:
Subagent
Role
TTFT
Duration
Result
0-GrokSpecReview
architect
1683ms
141813ms
error, usage all zeros
1-GrokSpecReview2
architect
1173ms
132381ms
error, usage all zeros
2-GrokPlanReview
critic
1435ms
121933ms
error, usage all zeros
Canonical error on all three:
stopReason: error
errorMessage: OpenAI completions stream stalled while waiting for the next event
api: openai-completions
provider: xai
model: grok-4.6
usage: input=0 output=0 cacheRead=0 cacheWrite=0 totalTokens=0
The first two turns already contained a completed review in thinking, including ## Spec Review, Status: Issues Found, and a concrete finding about --model default vs test_main_cli_knobs.py. There was no official text part, so the parent inspect/await path reported:
The parent then cancelled the still-running second reviewer and proceeded without an independent review. The review content was recoverable only by manually reading the child jsonl after the user asked why it failed.
GPT-family reviewers on openai-codex-responses do not reproduce this in the same workflow, because they keep emitting reasoning/stream events during thinking. Grok xhigh goes silent after a fast TTFT.
If a subagent turn still stalls after thinking already contains a structured review (## Spec Review, status, findings), promote that thinking to the parent as a successful/partial result instead of failed with no payload.
Parent subagent inspect/await should include errorMessage and the recovered thinking excerpt, not just failed.
Workaround
Send only the reviewer (architect / critic) to a GPT-family model.
Or lower Grok reasoning below xhigh.
Or set PI_STREAM_IDLE_TIMEOUT_MS=300000 / GJC_OPENAI_STREAM_IDLE_TIMEOUT_MS=300000 if those still apply to openai-completions.
The first workaround is what we will use locally. The second/third do not fix the lost-review promotion bug.
Summary
xai/grok-4.6subagent reviews (architect/critic) repeatedly die with:The reviewer has already finished the review in
thinking. The official assistanttextnever arrives, so the parent session receives onlyfailedand cannot apply the review.This is the xAI /
openai-completionscounterpart of #4096 (Anthropic max-reasoning vs the shared 120s idle watchdog). #4096 is closed and Anthropic-specific. The same watchdog still kills Grok xhigh after first-token / first-thinking progress.Environment
/opt/homebrew/bin/gjc(local build dated 2026-08-20)xai/grok-4.6,api: openai-completions, thinkingxhighsuperpowers-brainstormingindependent spec review, thensuperpowers-writing-planscriticPI_STREAM_IDLE_TIMEOUT_MS,PI_OPENAI_STREAM_IDLE_TIMEOUT_MS, andGJC_OPENAI_STREAM_IDLE_TIMEOUT_MSunsetReproduction
superpowers-brainstormingon a non-trivial spec with defaultgrok-4.6/xhigh.task(agent="architect")for the spec review.## Spec Reviewin thinking.stopReason: error.criticplan review dies the same way.Evidence
Three consecutive reviewer turns in one session:
0-GrokSpecReviewerror,usageall zeros1-GrokSpecReview2error,usageall zeros2-GrokPlanReviewerror,usageall zerosCanonical error on all three:
The first two turns already contained a completed review in
thinking, including## Spec Review,Status: Issues Found, and a concrete finding about--modeldefault vstest_main_cli_knobs.py. There was no officialtextpart, so the parent inspect/await path reported:The parent then cancelled the still-running second reviewer and proceeded without an independent review. The review content was recoverable only by manually reading the child jsonl after the user asked why it failed.
GPT-family reviewers on
openai-codex-responsesdo not reproduce this in the same workflow, because they keep emitting reasoning/stream events during thinking. Grok xhigh goes silent after a fast TTFT.Why this is not just #4096
#4096 already established:
DEFAULT_STREAM_IDLE_TIMEOUT_MS = 120_000export PI_STREAM_IDLE_TIMEOUT_MS=300000This report adds a still-open provider path:
openai-completions+xai+grok-4.6xhighfirstTokenTimeis set (team: worker turns die on non-retryable mid-stream idle stall and are never auto-continued #2580)failedSo even if the user knows the env workaround, a stalled reviewer still wastes the completed review.
Expected behavior
openai-completions/ xAI should not use the 120s Anthropic-era default for xhigh reasoning gaps. A provider-specific default (300s, matching Anthropic max-reasoning streams repeatedly abort at the 120s idle watchdog #4096) or a documentedGJC_OPENAI_STREAM_IDLE_TIMEOUT_MSdefault would avoid the false stall.## Spec Review, status, findings), promote that thinking to the parent as a successful/partial result instead offailedwith no payload.subagent inspect/awaitshould includeerrorMessageand the recovered thinking excerpt, not justfailed.Workaround
architect/critic) to a GPT-family model.xhigh.PI_STREAM_IDLE_TIMEOUT_MS=300000/GJC_OPENAI_STREAM_IDLE_TIMEOUT_MS=300000if those still apply toopenai-completions.The first workaround is what we will use locally. The second/third do not fix the lost-review promotion bug.