You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Failed to send message" error when doing any type of prompt #3142
Fix for windows rendering and scrolling #3141: Fix for windows rendering and scrolling - Specifically addresses Windows rendering issues which might be related to your display problems
Windows Support #631: Windows Support - General Windows compatibility tracking issue that covers various Windows-specific problems
Feel free to ignore if none of these address your specific case.
I am having the same issue. At the bottom is the output of opencode run hello --print-logs command. Downgrade to v0.14.7 fix the issue.
System Info
os: windows11 24H2
term: wezterm
shell: nushell
command output
╭ nu …\obsidian main ! 16s847ms win 21:09
╰─ opencode run hello --print-logs
INFO 2025-10-14T13:09:58 +137ms service=default version=0.15.2 args=["run","hello","--print-logs"] opencode
INFO 2025-10-14T13:09:58 +1ms service=project directory=C:\Users\noid\.local\share\obsidian fromDirectory
INFO 2025-10-14T13:09:59 +306ms service=config path=C:\Users\noid\.config\opencode\config.json loading
INFO 2025-10-14T13:09:59 +0ms service=config path=C:\Users\noid\.config\opencode\opencode.json loading
INFO 2025-10-14T13:09:59 +7ms service=config path=C:\Users\noid\.config\opencode\opencode.jsonc loading
INFO 2025-10-14T13:09:59 +7ms service=bun cmd=["C:\\Users\\noid\\scoop\\apps\\opencode\\0.15.2\\opencode.exe","add","@opencode-ai/plugin@0.15.2","--exact"] cwd=C:\Users\noid\.config\opencode running
INFO 2025-10-14T13:09:59 +20ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin
INFO 2025-10-14T13:09:59 +3ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
INFO 2025-10-14T13:09:59 +38ms service=bus type=* subscribing
INFO 2025-10-14T13:09:59 +0ms service=bus type=session.updated subscribing
INFO 2025-10-14T13:09:59 +1ms service=bus type=message.updated subscribing
INFO 2025-10-14T13:09:59 +0ms service=bus type=message.part.updated subscribing
INFO 2025-10-14T13:09:59 +0ms service=format init
INFO 2025-10-14T13:09:59 +0ms service=bus type=file.edited subscribing
INFO 2025-10-14T13:09:59 +4ms service=session id=ses_61d287accffeKBPUJDTSMQjWMq version=0.15.2 projectID=c3ef6915bb3696344facc96310652f1842c7a3cc directory=C:\Users\noid\.local\share\obsidian title=New session - 2025-10-14T13:09:59.219Z time={"created":1760447399219,"updated":1760447399219} created
INFO 2025-10-14T13:09:59 +1ms service=lsp serverIds=typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd, svelte, jdtls enabled LSP servers
ERROR 2025-10-14T13:09:59 +0ms service=default e=ENOTCONN: socket is not connected, open rejection
INFO 2025-10-14T13:09:59 +1ms service=bus type=session.updated publishing
INFO 2025-10-14T13:09:59 +3ms service=bus type=message.part.updated subscribing
INFO 2025-10-14T13:09:59 +0ms service=bus type=session.error subscribing
INFO 2025-10-14T13:09:59 +1ms service=session.prompt session=ses_61d287accffeKBPUJDTSMQjWMq prompt
INFO 2025-10-14T13:09:59 +8ms service=bus type=message.updated publishing
INFO 2025-10-14T13:09:59 +2ms service=bus type=message.part.updated publishing
INFO 2025-10-14T13:09:59 +1ms service=bus type=session.updated publishing
INFO 2025-10-14T13:09:59 +3ms service=models.dev file={} refreshing
INFO 2025-10-14T13:09:59 +3ms service=provider init
INFO 2025-10-14T13:09:59 +3ms service=provider providerID=anthropic found
INFO 2025-10-14T13:09:59 +0ms service=provider providerID=opencode found
INFO 2025-10-14T13:09:59 +0ms service=provider providerID=anthropic modelID=claude-sonnet-4-5-20250929 getModel
INFO 2025-10-14T13:09:59 +1ms service=provider status=started providerID=anthropic getSDK
INFO 2025-10-14T13:09:59 +160ms service=provider status=completed duration=160 providerID=anthropic getSDK
INFO 2025-10-14T13:09:59 +0ms service=provider providerID=anthropic modelID=claude-sonnet-4-5-20250929 found
INFO 2025-10-14T13:09:59 +1ms service=session.prompt session=ses_61d287accffeKBPUJDTSMQjWMq sessionID=ses_61d287accffeKBPUJDTSMQjWMq locking
INFO 2025-10-14T13:09:59 +1ms service=session.prompt session=ses_61d287accffeKBPUJDTSMQjWMq sessionID=ses_61d287accffeKBPUJDTSMQjWMq unlocking
ERROR 2025-10-14T13:09:59 +5ms service=default name=Error message=ENOTCONN: socket is not connected, open stack=Error: ENOTCONN: socket is not connected, open
at spawn (unknown)
at files (B:/~BUN/root/index.js:87510:27)
at processTicksAndRejections (native:7:39) fatal
Error: Unexpected error, check log file at for more details
INFO 2025-10-14T13:09:59 +13ms service=bus type=session.idle publishing
INFO 2025-10-14T13:10:03 +3844ms service=bun code=0 stdout=bun add v1.3.0 (b0a6feca)
installed @opencode-ai/plugin@0.15.2
2 packages installed [4.08s]
stderr=Resolving dependencies
Resolved, downloaded and extracted [8]
Saved lockfile
done
Besides, I am also experiencing the same issue with Issue #23530 · oven-sh/bun after upgrading to bun v1.3, and downgrade to previous version also fix the issue.
With .git dir removed, the same error is being thrown as part of the reply like this:
reply after removing .git dir
I'll examine the GitHub Actions workflow files to explain how they work in this repo.
Plan claude-sonnet-4-5-20250929 (04:10 PM)
┃ ┃
┃ List C:\Users\noid\hub\dev\scoop-action ┃
┃ ┃
┃ ┃
┃ ┃
┃ Error: ENOTCONN: socket is not connected, open ┃
┃ ┃
Apart from this error occasionally popping up, opencode runs normally.
command output of `opencode run hello --print-logs`
INFO 2025-10-16T08:28:55 +121ms service=default version=0.15.3 args=["run","hello","--print-logs"] opencode
INFO 2025-10-16T08:28:55 +1ms service=project directory=C:\Users\noid\hub\dev\scoop-action fromDirectory
INFO 2025-10-16T08:28:55 +13ms service=config path=C:\Users\noid\.config\opencode\config.json loading
INFO 2025-10-16T08:28:55 +0ms service=config path=C:\Users\noid\.config\opencode\opencode.json loading
INFO 2025-10-16T08:28:55 +8ms service=config path=C:\Users\noid\.config\opencode\opencode.jsonc loading
INFO 2025-10-16T08:28:55 +4ms service=bun cmd=["C:\\Users\\noid\\scoop\\apps\\opencode\\0.15.3\\opencode.exe","add","@opencode-ai/plugin@0.15.3","--exact"] cwd=C:\Users\noid\.config\opencode running
INFO 2025-10-16T08:28:55 +18ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin
INFO 2025-10-16T08:28:55 +3ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
INFO 2025-10-16T08:28:55 +39ms service=bus type=* subscribing
INFO 2025-10-16T08:28:55 +0ms service=bus type=session.updated subscribing
INFO 2025-10-16T08:28:55 +0ms service=bus type=message.updated subscribing
INFO 2025-10-16T08:28:55 +0ms service=bus type=message.part.updated subscribing
INFO 2025-10-16T08:28:55 +0ms service=format init
INFO 2025-10-16T08:28:55 +0ms service=bus type=file.edited subscribing
INFO 2025-10-16T08:28:55 +5ms service=session id=ses_613dd1343ffedm9ZKdNABsGg0O version=0.15.3 projectID=global directory=C:\Users\noid\hub\dev\scoop-action title=New session - 2025-10-16T08:28:55.868Z time={"created":1760603335868,"updated":1760603335868} created
INFO 2025-10-16T08:28:55 +1ms service=lsp serverIds=typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd, svelte, jdtls enabled LSP servers
ERROR 2025-10-16T08:28:55 +0ms service=default e=ENOTCONN: socket is not connected, open rejection
INFO 2025-10-16T08:28:55 +6ms service=bun code=0 stdout=bun add v1.3.0 (b0a6feca)
installed @opencode-ai/plugin@0.15.3
[14.00ms] done
stderr=Saved lockfile
done
INFO 2025-10-16T08:38:52 +1ms service=bus type=session.updated publishing
INFO 2025-10-16T08:38:52 +3ms service=bus type=message.part.updated subscribing
INFO 2025-10-16T08:38:52 +0ms service=bus type=session.error subscribing
INFO 2025-10-16T08:38:52 +1ms service=session.prompt session=ses_613d3f80effei4oV9WFQMgRhZM prompt
INFO 2025-10-16T08:38:52 +9ms service=bus type=message.updated publishing
INFO 2025-10-16T08:38:52 +2ms service=bus type=message.part.updated publishing
INFO 2025-10-16T08:38:52 +2ms service=bus type=session.updated publishing
# ...
Setting snapshot to false without removing .git dir didn't fix the issue
Opencode revert back to the previously behavior (hang with error message).
Besides, /sessions won't list the session I created when .git dir is removed after I restored the .git dir. However, I can view them again once I remove the .git dir.
Maybe not helpful but someone else in the discord is having this issue but exclusively if they run opencode in the vscode terminal, if they run it in basically any other environment it works fine
Has anyone tried other terminals I dont know why that'd work im just relaying what someone said worked for them
Has anyone tried other terminals I dont know why that'd work im just relaying what someone said worked for them
I'm facing the same issue, whether I'm running opencode from the VScode terminal (Powershell profile of cmd profile), or directly in a windows terminal. Even with the most basic Win + R and typing opencode pathtomyproject has the same result.
If it can help, here's my output with debug logs:
D:\path\to\project>opencode run ping --print-logs --log-level DEBUG
INFO 2025-10-24T13:29:40 +127ms service=default version=0.15.16 args=["run","ping","--print-logs","--log-level","DEBUG"] opencode
INFO 2025-10-24T13:29:40 +2ms service=project directory=D:\path\to\project fromDirectory
INFO 2025-10-24T13:29:40 +86ms service=config path=C:\Users\Steve\.config\opencode\config.json loading
INFO 2025-10-24T13:29:40 +0ms service=config path=C:\Users\Steve\.config\opencode\opencode.json loading
INFO 2025-10-24T13:29:40 +0ms service=config path=C:\Users\Steve\.config\opencode\opencode.jsonc loading
INFO 2025-10-24T13:29:40 +4ms service=bun cmd=["C:\\Users\\Steve\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@0.15.16","--exact"] cwd=C:\Users\Steve\.config\opencode running
INFO 2025-10-24T13:29:40 +15ms service=bun cmd=["C:\\Users\\Steve\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@0.15.16","--exact"] cwd=D:\path\to\project\.opencode running
INFO 2025-10-24T13:29:40 +7ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin
INFO 2025-10-24T13:29:40 +3ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
INFO 2025-10-24T13:29:40 +29ms service=bus type=* subscribing
INFO 2025-10-24T13:29:40 +0ms service=bus type=session.updated subscribing
INFO 2025-10-24T13:29:40 +0ms service=bus type=message.updated subscribing
INFO 2025-10-24T13:29:40 +0ms service=bus type=message.part.updated subscribing
INFO 2025-10-24T13:29:40 +0ms service=format init
INFO 2025-10-24T13:29:40 +0ms service=bus type=file.edited subscribing
INFO 2025-10-24T13:29:40 +3ms service=session id=ses_5e996db98ffelAyiPKsDBsJv6R version=0.15.16 projectID=a0fea2be4f5c2f8bae0ead99325c7240353368b7 directory=D:\path\to\project title=New session - 2025-10-24T13:29:40.711Z time={"created":1761312580711,"updated":1761312580711} created
INFO 2025-10-24T13:29:40 +0ms service=lsp serverIds=deno, typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd, svelte, astro, jdtls enabled LSP servers
ERROR 2025-10-24T13:29:40 +1ms service=default e=ENOTCONN: socket is not connected, open rejection
INFO 2025-10-24T13:29:40 +3ms service=bun code=0 stdout=bun add v1.3.0 (b0a6feca)
installed @opencode-ai/plugin@0.15.16
[13.00ms] done
stderr=Saved lockfile
done
INFO 2025-10-24T13:29:40 +0ms service=bun code=0 stdout=bun add v1.3.0 (b0a6feca)
installed @opencode-ai/plugin@0.15.16
[13.00ms] done
stderr=Saved lockfile
done
INFO 2025-10-24T13:29:40 +1ms service=bus type=session.updated publishing
INFO 2025-10-24T13:29:40 +2ms service=bus type=message.part.updated subscribing
INFO 2025-10-24T13:29:40 +0ms service=bus type=session.error subscribing
INFO 2025-10-24T13:29:40 +1ms service=session.prompt session=ses_5e996db98ffelAyiPKsDBsJv6R prompt
INFO 2025-10-24T13:29:40 +16ms service=bus type=message.updated publishing
INFO 2025-10-24T13:29:40 +2ms service=bus type=message.part.updated publishing
INFO 2025-10-24T13:29:40 +1ms service=bus type=session.updated publishing
INFO 2025-10-24T13:29:40 +2ms service=models.dev file={} refreshing
INFO 2025-10-24T13:29:40 +3ms service=provider init
INFO 2025-10-24T13:29:40 +2ms service=provider providerID=opencode found
INFO 2025-10-24T13:29:40 +1ms service=provider providerID=github-copilot found
INFO 2025-10-24T13:29:40 +0ms service=provider providerID=github-copilot modelID=claude-haiku-4.5 getModel
INFO 2025-10-24T13:29:40 +0ms service=provider status=started providerID=github-copilot getSDK
INFO 2025-10-24T13:29:40 +76ms service=provider status=completed duration=76 providerID=github-copilot getSDK
INFO 2025-10-24T13:29:40 +2ms service=provider providerID=github-copilot modelID=claude-haiku-4.5 found
INFO 2025-10-24T13:29:40 +0ms service=session.lock sessionID=ses_5e996db98ffelAyiPKsDBsJv6R locked
INFO 2025-10-24T13:29:40 +0ms service=session.prompt session=ses_5e996db98ffelAyiPKsDBsJv6R sessionID=ses_5e996db98ffelAyiPKsDBsJv6R locking
INFO 2025-10-24T13:29:40 +3ms service=session.lock sessionID=ses_5e996db98ffelAyiPKsDBsJv6R unlocked
INFO 2025-10-24T13:29:40 +0ms service=session.prompt session=ses_5e996db98ffelAyiPKsDBsJv6R sessionID=ses_5e996db98ffelAyiPKsDBsJv6R unlocking
ERROR 2025-10-24T13:29:40 +6ms service=default name=Error message=ENOTCONN: socket is not connected, open stack=Error: ENOTCONN: socket is not connected, open
at spawn (unknown)
at files (src/file/ripgrep.ts:217:27)
at processTicksAndRejections (native:7:39) fatal
Error: Unexpected error, check log file at for more details
ENOTCONN: socket is not connected, open
syscall: "open",
errno: -107,
code: "ENOTCONN"
at spawn (unknown:1:1)
at files (src/file/ripgrep.ts:217:27)
at processTicksAndRejections (native:7:39)
INFO 2025-10-24T13:29:40 +13ms service=bus type=session.idle publishing
The url in the error message that appears only using interactive mode can be opened in the browse without any issue
As other said, running the command in a non git project is OK, but fails in a git project
As a workaround I can wrap opencode in a wsl session.
Running wsl opencode run ping --print-logs --log-level DEBUG from my project works quite well. Even ran from my windows project directly (opencode see /mnt/d/path/to/my/project).
@stevebeauge thank you this is very helpful, im sorry to everyone that our windows support is so poor right now we really need to step it up in that department :/
@stevebeauge thank you this is very helpful, im sorry to everyone that our windows support is so poor right now we really need to step it up in that department :/
Don't worry. Opencode is still a child and will eventually grow up, like many open source software. It's ok to have to wait :)
Maybe not helpful but someone else in the discord is having this issue but exclusively if they run opencode in the vscode terminal, if they run it in basically any other environment it works fine
I'm running on nushell and wezterm, not windows terminal.
Activity
github-actions commentedon Oct 13, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
SunP04 commentedon Oct 13, 2025
Just tested on a previous version (pre 0.15), it worked normally
Was there any breaking changes on 0.15 that could potentially impact on this?
arsham commentedon Oct 13, 2025
Could be related to #3109 if you have custom tools or custom plugins. If that's the case, try installing your dependencies.
rekram1-node commentedon Oct 13, 2025
@SunP04 can you run:
opencode run hello --print-logsand show output?
SunP04 commentedon Oct 14, 2025
I have no extra plugins or configurations, I don't even have a api key setup
I don't know where the log file is bc it doesn't say, but here's the output
With the 0.14.* version it works properly, showing hello after a lot of stuff (not gonna show here bc it's a lot)
rekram1-node commentedon Oct 14, 2025
This is helpful thank you! hope to fix this for you
In the meantime you may want to edit your opencode.json and set:
That way you can stay downgraded and then upgrade manually using
opencode upgradenoidilin commentedon Oct 14, 2025
I am having the same issue. At the bottom is the output of
opencode run hello --print-logscommand. Downgrade to v0.14.7 fix the issue.System Info
command output
Besides, I am also experiencing the same issue with Issue #23530 · oven-sh/bun after upgrading to bun v1.3, and downgrade to previous version also fix the issue.
rekram1-node commentedon Oct 14, 2025
oo thanks, likely an issue with bun 1.3 as you pointed out, good to know
SunP04 commentedon Oct 15, 2025
That's not a problem, since I'm using scoop I can just downgrade as needed
TangTangH commentedon Oct 16, 2025
I found that as long as there is a .git folder in the current directory, this issue occurs. After deleting it, everything returns to normal.
rekram1-node commentedon Oct 16, 2025
Hm that's weird...
what if you set
"snapshot": falsein your opencode.json but still have .gitnoidilin commentedon Oct 16, 2025
Removing .git dir allows the session to proceed
With
.gitdir removed, the same error is being thrown as part of the reply like this:reply after removing .git dir
Apart from this error occasionally popping up, opencode runs normally.
command output of `opencode run hello --print-logs`
Setting snapshot to false without removing .git dir didn't fix the issue
Opencode revert back to the previously behavior (hang with error message).
Besides,
/sessionswon't list the session I created when .git dir is removed after I restored the .git dir. However, I can view them again once I remove the .git dir.rekram1-node commentedon Oct 17, 2025
Looking into this more, it does seem like this is due to the bun 1.3 upgrade
SunP04 commentedon Oct 17, 2025
Is it possible to revert to bun 1.2.* or is the project using any 1.3 APIs?
rekram1-node commentedon Oct 18, 2025
ill have to check and get back to you
rekram1-node commentedon Oct 22, 2025
Maybe not helpful but someone else in the discord is having this issue but exclusively if they run opencode in the vscode terminal, if they run it in basically any other environment it works fine
Has anyone tried other terminals I dont know why that'd work im just relaying what someone said worked for them
stevebeauge commentedon Oct 24, 2025
I'm facing the same issue, whether I'm running opencode from the VScode terminal (Powershell profile of cmd profile), or directly in a windows terminal. Even with the most basic Win + R and typing
opencode pathtomyprojecthas the same result.If it can help, here's my output with debug logs:
The url in the error message that appears only using interactive mode can be opened in the browse without any issue
As other said, running the command in a non git project is OK, but fails in a git project
stevebeauge commentedon Oct 24, 2025
As a workaround I can wrap opencode in a wsl session.
Running
wsl opencode run ping --print-logs --log-level DEBUGfrom my project works quite well. Even ran from my windows project directly (opencode see/mnt/d/path/to/my/project).rekram1-node commentedon Oct 24, 2025
@stevebeauge thank you this is very helpful, im sorry to everyone that our windows support is so poor right now we really need to step it up in that department :/
stevebeauge commentedon Oct 24, 2025
Don't worry. Opencode is still a child and will eventually grow up, like many open source software. It's ok to have to wait :)
SunP04 commentedon Oct 25, 2025
I'm running on nushell and wezterm, not windows terminal.
The same happens on winterm though
noidilin commentedon Nov 13, 2025
This issue seems to be fixed now. I have tested with these setup:
v1.0.62