Skip to content

opencode在带有中文路径的文件下无法打开 #13063

Closed

Description

@changzhengithub

Description

opencode自动更新后,在windows 11系统里,在带有中文路径的文件夹下,运行打开opencode会报错:
{
"name": "UnknownError",
"data": {
"message": "TypeError: Header 'x-opencode-directory' has invalid value: 'D:\项目\AI\template\xxx'\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)"
}
}

Plugins

No response

OpenCode version

1.1.56

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Feb 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Consider consolidating with #13023, which appears to be nearly identical and was created on the same day.

  2. YooPh commented on Feb 11, 2026

    @YooPh

    I also encountered the same problem

  3. changzhengithub commented on Feb 11, 2026

    @changzhengithub
    Author

    I hope to solve this problem.

  4. pythonmumude commented on Feb 11, 2026

    @pythonmumude

    mac中文路径 也打不开。

  5. mml1988 commented on Feb 11, 2026

    @mml1988

    When is it expected to be resolved?

  6. github-actions commented on Apr 13, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions