Skip to content

[bugfix] agent: detach stdin for OpenCode git init on Windows - #603

Open
Hniii98 wants to merge 1 commit into
ThinkFlowLab:mainfrom
Hniii98:fix/windows-opencode-git-init
Open

Hniii98 wants to merge 1 commit into
ThinkFlowLab:mainfrom
Hniii98:fix/windows-opencode-git-init

Conversation

@Hniii98

@Hniii98 Hniii98 commented Nov 30, 2026

Copy link
Copy Markdown

Summary

  • Detach stdin (stdin=asyncio.subprocess.DEVNULL) when running git init --quiet --template= for the bundled OpenCode worktree in NativeRuntime.stream().
  • Prevents Git for Windows from inheriting and blocking on the Electron desktop host's stdin control pipe, which caused turns (e.g. DeepSeek under Default · OpenCode bundled) to stall indefinitely on "Thinking...".
  • Add a Windows control-pipe regression test verifying git init completes while the host control reader is blocked on stdin.

Linked issue

Labels

  • Labels applied (type: bugfix, area: agent, area: desktop)

Test plan

  • Local: pytest tests/<your_test_file>.py -v (passed on Windows)
  • Left to CI: full Windows & Linux test suites

Evidence that it works

  • N/A because: backend subprocess stdin fix verified via the Windows control-pipe regression test (or attach desktop DeepSeek reply screenshot if tested in UI).

Provider verification

  • Real-provider calls are described honestly, or none were made (regression test stops at prepare_skills before any model call; desktop verification used DeepSeek API).

Bilingual UI

  • Both locales are updated, or no user-facing copy changed

## summary

- Detach stdin (`stdin=asyncio.subprocess.DEVNULL`) when running
  `git init --quiet --template=` for bundled OpenCode worktrees.
- Add a Windows desktop control-pipe regression test verifying that
  `git init` completes while the host control reader blocks on stdin.

Signed-off-by: Hniii98 <752608928@qq.com>
@github-actions github-actions Bot added area:agent Agent runtime, assistant chat and tools area:desktop Desktop integration / 桌面集成 type:bug Something is broken labels Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent runtime, assistant chat and tools area:desktop Desktop integration / 桌面集成 type:bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Windows desktop bundled OpenCode stalls on "Thinking..." with DeepSeek due to git init inheriting control pipe stdin

1 participant