Skip to content

Windows smoke pass C: Claude fake exits 0, runner records Run error (exit 0) #480

Closed

Description

@currentbits

Windows electron/smoke.js dies on pass C (Claude adapter + fake stream-json binary). Pass A (simulate) and pass B (generic node -e agent) are green. macOS smoke is green on the same commits. This is the first real signal from the job added in #449 — it has never been green on windows-latest.

Symptom

{"step":"passB","ok":true}
{"step":"passC.threads.create","ok":true,"provider":"claude"}
{"step":"passC.runs.start","ok":true}
{"step":"smoke","ok":false,"error":"passC thread failed: [...,{\"role\":\"event\",\"text\":\"Run error (exit 0)\"}]"}

The thread goes failed ~450ms after runs.start. Transcript is only the user prompt plus that event. No assistant text, no tool card, no sessionId, no usage — the adapter never parsed a result line (gotResult stayed false). runner.js then takes the "exit without result" path and writes Run error (exit ${code}).

Pass D (codex fake) never runs; the script fail-fasts at C.

Evidence

Reproduced on every windows-latest smoke job since the job landed:

run branch smoke macos smoke windows
32117186703 Windows hardening pass pass C fail
32121422998 #473 drag-and-drop pass pass C fail
32121797100 main after #473 pass pass C fail

Same error string and same shape both times I pulled logs. Windows doctor on the smoke project reports wslBoundary ok (repo is on D:\), so this is not the WSL wrap.

Why this is a real dispatch hole, not just a bad fake

Pass B already proves Electron can spawn node on that runner and capture stdout (SMOKE_AGENT_OK). Pass C is the first path that uses claude.js:

  • cross-spawn of a .cmd wrapper (writeFakeBin in electron/smoke.js)
  • detached: true
  • stdio: ['pipe','pipe','pipe'] (interactive / keepAlive)
  • fake emits NDJSON then process.exit(0)

macOS uses the same fake JS (shebang file, no .cmd) and passes. The Windows-only miss is "child exited 0, zero parsed events."

Likely causes (in order I would poke)

  1. .cmd + cross-spawn + detached: true. Parent may be waiting on cmd.exe (exit 0, empty pipes) while the node fake is a grandchild whose stdout never arrives. Pass B spawns node directly and works.
  2. process.exit(0) dropping an unflushed pipe buffer on Windows. The fake writes several JSON lines then exits without waiting for drain. Less likely to be the whole story — pass B also process.exit(0) after one stdout.write and is captured — but the last result line is exactly what gotResult needs.
  3. Interactive sendUser() into a fake that never reads stdin. Unlikely on its own: the fake ignores argv/stdin and still emits on macOS.

Fix bar

  • npm run test:smoke green on windows-latest through pass C and pass D (codex uses the same .cmd helper and is currently untested).
  • A mutation: if the fake's result line is removed, pass C must still fail. If the .cmd wrapper is skipped and CODER_CLAUDE_BIN points at a missing file, the error must not be a silent exit 0.
  • Do not "fix" this by skipping pass C on win32. Windows: prove the app boots — electron/smoke.js on windows-latest CI #449 exists specifically so a dead Windows dispatch path cannot go silent.

Follow-up to #442 / #449. Related leftover from #17 is the same event text on a reused CLI; this one is a first turn with a brand-new fake, so it is not the linger-then-exit race.

Activity

  1. added
    bug
    plan:todo
    on Aug 18, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Same Windows dispatch hole is also hanging npm test — see #481. Smoke at least fails in 50s; the unit job has no timeout and sits until Actions kills it.

  3. added
    plan:doing
    and removed
    plan:todo
    on Aug 18, 2026
  4. added
    plan:done
    and removed
    plan:doing
    on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions