mac中opencode版本为1.1.56也不行;报错UnknownError",aas % opencode;x-opencode-directory' #9051

Open
opened 2026-02-16 18:11:31 -05:00 by yindo · 2 comments
Owner

Originally created by @tom-hanks on GitHub (Feb 11, 2026).

Originally assigned to: @thdxr on GitHub.

Description

{Users/laryers/Documents/allcode/sdAllcode/中后台重构/phoenix-saas
"name": "UnknownError",aas % opencode
"data": {
"message": "TypeError: Header 'x-opencode-directory' has invalid value: '/Users/laryers/Documents/allcode/sdAllcode/中后台重构/phoenix-saas'\n at set (unknown)\n at mergeHeaders (../sdk/js/src/gen/client/utils.gen.ts:184:23)\n at mergeConfigs (../sdk/js/src/gen/client/utils.gen.ts:161:20)\n at createClient (../sdk/js/src/gen/client/client.gen.ts:21:17)\n at createOpencodeClient (../sdk/js/src/client.ts:28:18)\n at (src/plugin/index.ts:25:20)\n at (src/project/state.ts:22:21)\n at init2 (src/plugin/index.ts:123:25)\n at InstanceBootstrap (src/project/bootstrap.ts:19:16)\n at (src/project/instance.ts:34:23)\n at async provide (src/project/instance.ts:40:23)"
}
}
laryers@laryers phoenix-saas %

Plugins

No response

OpenCode version

1.1.56

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

mac

Terminal

No response

Originally created by @tom-hanks on GitHub (Feb 11, 2026). Originally assigned to: @thdxr on GitHub. ### Description {Users/laryers/Documents/allcode/sdAllcode/中后台重构/phoenix-saas "name": "UnknownError",aas % opencode "data": { "message": "TypeError: Header 'x-opencode-directory' has invalid value: '/Users/laryers/Documents/allcode/sdAllcode/中后台重构/phoenix-saas'\n at set (unknown)\n at mergeHeaders (../sdk/js/src/gen/client/utils.gen.ts:184:23)\n at mergeConfigs (../sdk/js/src/gen/client/utils.gen.ts:161:20)\n at createClient (../sdk/js/src/gen/client/client.gen.ts:21:17)\n at createOpencodeClient (../sdk/js/src/client.ts:28:18)\n at <anonymous> (src/plugin/index.ts:25:20)\n at <anonymous> (src/project/state.ts:22:21)\n at init2 (src/plugin/index.ts:123:25)\n at InstanceBootstrap (src/project/bootstrap.ts:19:16)\n at <anonymous> (src/project/instance.ts:34:23)\n at async provide (src/project/instance.ts:40:23)" } } laryers@laryers phoenix-saas % ### Plugins _No response_ ### OpenCode version 1.1.56 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System mac ### Terminal _No response_
yindo added the bug label 2026-02-16 18:11:31 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 11, 2026):

This issue appears to be a duplicate of #13023: "Windows: opencode fails in non-ASCII (Chinese) directory with invalid x-opencode-directory header"

Both issues report the same error:

  • Error: TypeError: Header 'x-opencode-directory' has invalid value
  • Root cause: Path handling with non-ASCII (Chinese) characters
  • Affected SDK file: ../sdk/js/src/gen/client/utils.gen.ts:184

Issue #13023 includes a documented workaround: using ASCII-only paths instead of paths containing Chinese characters.

If your path doesn't contain non-ASCII characters, please provide additional reproduction steps in #13023. Otherwise, please track this issue there.

@github-actions[bot] commented on GitHub (Feb 11, 2026): This issue appears to be a duplicate of #13023: "Windows: opencode fails in non-ASCII (Chinese) directory with invalid x-opencode-directory header" Both issues report the same error: - **Error**: `TypeError: Header 'x-opencode-directory' has invalid value` - **Root cause**: Path handling with non-ASCII (Chinese) characters - **Affected SDK file**: `../sdk/js/src/gen/client/utils.gen.ts:184` Issue #13023 includes a documented workaround: using ASCII-only paths instead of paths containing Chinese characters. If your path doesn't contain non-ASCII characters, please provide additional reproduction steps in #13023. Otherwise, please track this issue there.
Author
Owner

@FurryWolfX commented on GitHub (Feb 11, 2026):

不支持中文目录名

@FurryWolfX commented on GitHub (Feb 11, 2026): 不支持中文目录名
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9051