Skip to content

fix: 修复 Windows 终端兼容性#556

Open
yg2224 wants to merge 2 commits intoOpenDCAI:mainfrom
yg2224:fix/windows-terminal-runtime
Open

fix: 修复 Windows 终端兼容性#556
yg2224 wants to merge 2 commits intoOpenDCAI:mainfrom
yg2224:fix/windows-terminal-runtime

Conversation

@yg2224
Copy link
Copy Markdown
Contributor

@yg2224 yg2224 commented Apr 15, 2026

Summary

  • 修复 Windows 本地 runtime 的命令包装,按 PowerShell 处理 cwd 和 env
  • 修正 PowerShell non-terminating error 的退出码判定,避免失败被误报为成功
  • 按 provider 回退 terminal 默认 cwd,避免远端 sandbox 落回宿主机路径

Test Plan

  • uv run pytest tests/test_capability_async.py tests/test_chat_session.py tests/test_runtime.py tests/test_terminal.py tests/test_terminal_persistence.py -q

@shuxueshuxue
Copy link
Copy Markdown
Collaborator

I reviewed this patch against current dev. Two issues look real before merge:

  1. core/tools/command/bash/executor.py and core/tools/command/zsh/executor.py

    • the new Windows guard makes execute() return ExecuteResult(exit_code=127, ...), but execute_async() raises RuntimeError for the same unsupported condition.
    • that splits one platform constraint into two different contracts depending on call path.
  2. sandbox/terminal.py + storage/providers/{sqlite,supabase}/terminal_repo.py

    • the new default cwd fallback now depends on the host process cwd when initial_cwd is absent or provider lookup fails.
    • that means terminal truth can drift with the backend's launch directory instead of a stable terminal/workspace invariant.

I would not merge this as-is. The Windows compatibility direction is fine, but these two contract changes need tightening first.

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.

2 participants