opencode icon indicating copy to clipboard operation
opencode copied to clipboard

opencode stopped responding with recent updates

Open ukalwa opened this issue 1 year ago • 11 comments

Hello,

I believe opencode was working till 0.2.28 for me and then stopped responding after I upgraded it. The session simply stalls. And now it doesn't seem to respond even if I downgrade it to 0.2.28. I also tried installing it with curl instead of homebrew but the result was the same.

Here are the logs with command opencode run "hi" --print-logs for reference.

INFO  2025-07-16T15:10:24 +41ms service=app cwd=/Users/testuser/Downloads creating
INFO  2025-07-16T15:10:24 +0ms service=default version=0.3.13 args=run,hi,--print-logs opencode
INFO  2025-07-16T15:10:24 +0ms service=app cwd=/Users/testuser/Downloads creating
INFO  2025-07-16T15:10:24 +2ms service=app git
INFO  2025-07-16T15:10:24 +0ms service=app git
INFO  2025-07-16T15:10:24 +2ms service=app name=config registering service
INFO  2025-07-16T15:10:24 +1ms service=bus type=storage.write subscribing
INFO  2025-07-16T15:10:24 +0ms service=app name=bus registering service
INFO  2025-07-16T15:10:24 +0ms service=format init
INFO  2025-07-16T15:10:24 +0ms service=bus type=file.edited subscribing
INFO  2025-07-16T15:10:24 +0ms service=config.hooks init
INFO  2025-07-16T15:10:24 +0ms service=bus type=file.edited subscribing
INFO  2025-07-16T15:10:24 +0ms service=bus type=session.idle subscribing
INFO  2025-07-16T15:10:24 +0ms service=app name=lsp registering service
INFO  2025-07-16T15:10:24 +1ms service=session id=ses_7ec369206ffekkmbnwpGu67eR0 version=0.3.13 title=New Session - 2025-07-16T15:10:24.761Z time=[object Object] created
INFO  2025-07-16T15:10:24 +0ms service=app name=session registering service
INFO  2025-07-16T15:10:24 +0ms service=app name=storage registering service
INFO  2025-07-16T15:10:24 +3ms service=config $schema=https://opencode.ai/config.json theme=opencode autoshare=false autoupdate=true model=openai_compatible_server/gpt-4o provider=[object Object] username=testuser loaded
INFO  2025-07-16T15:10:24 +0ms service=bus type=storage.write publishing
INFO  2025-07-16T15:10:24 +0ms service=app name=config registering service
INFO  2025-07-16T15:10:24 +0ms service=config $schema=https://opencode.ai/config.json theme=opencode autoshare=false autoupdate=true model=openai_compatible_server/gpt-4o provider=[object Object] username=testuser loaded
INFO  2025-07-16T15:10:24 +0ms service=bus type=session.updated publishing

█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀  ▀ ▀▀▀ ▀▀▀▀ ▀▀▀  ▀▀▀

@  openai_compatible_server/gpt-4o

INFO  2025-07-16T15:10:24 +1ms service=bus type=message.part.updated subscribing
INFO  2025-07-16T15:10:24 +0ms service=bus type=session.error subscribing
INFO  2025-07-16T15:10:24 +0ms service=app name=mode registering service
INFO  2025-07-16T15:10:24 +1ms service=session session=ses_7ec369206ffekkmbnwpGu67eR0 chatting
INFO  2025-07-16T15:10:24 +0ms service=app name=provider registering service
INFO  2025-07-16T15:10:24 +1ms service=models.dev refreshing
INFO  2025-07-16T15:10:24 +0ms service=provider init
INFO  2025-07-16T15:10:24 +7ms service=provider providerID=openai_compatible_server found
INFO  2025-07-16T15:10:24 +0ms service=provider providerID=openai_compatible_server modelID=gpt-4o getModel
INFO  2025-07-16T15:10:24 +0ms service=provider status=started providerID=openai_compatible_server getSDK
INFO  2025-07-16T15:10:24 +1ms service=bun cmd=/opt/homebrew/Cellar/opencode/0.3.13/bin/opencode,add,--force,--exact,--cwd,/Users/testuser/.cache/opencode,--registry=https://registry.npmjs.org,@ai-sdk/openai-compatible@beta cwd=/Users/testuser/.cache/opencode running

System details:

OS: macOS v15
opencode version: 0.3.13
package manager: homebrew

Token is not the issue because it worked before and I tested it with other tools after opencode stopped responding

ukalwa avatar Jul 16 '25 15:07 ukalwa

does clearing ~/.cache/opencode help?

thdxr avatar Jul 16 '25 19:07 thdxr

does clearing ~/.cache/opencode help?

That didn't seem to work

ukalwa avatar Jul 16 '25 20:07 ukalwa

I was experiencing this yesterday because I have a .npmrc setup for an internal registry that is behind a firewall and when that is not accessible it causes opencode to hang. The fix for me was creating a .bunfig.toml in my home directory that points the registry to a public one like https://registry.npmjs.org.

simonjm avatar Jul 17 '25 13:07 simonjm

Using the below until this is resolved as the upgrade command did not work in downgrading the version.

curl -fsSL https://opencode.ai/install | VERSION=0.2.28 bash

art3xias23 avatar Jul 17 '25 15:07 art3xias23

Verified that downgrading works on the latest macos beta

Itsnotaka avatar Jul 17 '25 21:07 Itsnotaka

In my case, it turned out to be a company proxy thing. Opencode worked after fixing the proxy!

ukalwa avatar Jul 23 '25 01:07 ukalwa

@ukalwa can you be more specific on any proxy settings that are needed? I have HTTP_PROXY and HTTPS_PROXY env vars set but is there something else that needs to be done? I also suspected it was a proxy issue but I couldn't figure out why it initially worked and then suddenly stopped.

sregister avatar Jul 23 '25 01:07 sregister

I disconnected from vpn and unset proxy vars, then it worked

@ukalwa can you be more specific on any proxy settings that are needed? I have HTTP_PROXY and HTTPS_PROXY env vars set but is there something else that needs to be done? I also suspected it was a proxy issue but I couldn't figure out why it initially worked and then suddenly stopped.

ukalwa avatar Jul 28 '25 14:07 ukalwa

had the same thing - always stuck at "working...", in my case I deleted the ~/.bun/install/cache/ folder and it started working again

duciito avatar Jul 31 '25 13:07 duciito

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

rekram1-node avatar Dec 28 '25 01:12 rekram1-node

rm ~/.bun/install/cache/ and ~/.cache/opencode works for me

fyeeme avatar Feb 02 '26 15:02 fyeeme