Skip to content

Stuck on working forever #851

Closed
Closed

Description

@thesobercoder

Just updated to v0.2.24, and I don't know what happened, but it is stuck at working... forever. Also not sure why it is picking up an Open AI key from the environment, I don't even have one configured.

  • Yes I cleared ~/.cache/opencode
Image Image

Activity

  1. thdxr commented on Jul 10, 2025

    @thdxr
    Member

    can you do opencode run hey --print-logs

  2. thesobercoder commented on Jul 10, 2025

    @thesobercoder
    Author

    can you do opencode run hey --print-logs

    Here you go Dax, I'm not sure where it is getting the OpenAI key from.

    INFO  2025-07-10T20:04:41 +35ms service=app cwd=<home>/Documents/GitHub/effect-app creating
    INFO  2025-07-10T20:04:41 +0ms service=default version=0.2.24 args=run,hey,--print-logs opencode
    INFO  2025-07-10T20:04:41 +0ms service=app cwd=<home>/Documents/GitHub/effect-app creating
    INFO  2025-07-10T20:04:41 +2ms service=app git=<home>/Documents/GitHub/effect-app git
    INFO  2025-07-10T20:04:41 +1ms service=app git=<home>/Documents/GitHub/effect-app git
    INFO  2025-07-10T20:04:41 +1ms service=app name=config registering service
    INFO  2025-07-10T20:04:41 +0ms service=bus type=storage.write subscribing
    INFO  2025-07-10T20:04:41 +0ms service=app name=bus registering service
    INFO  2025-07-10T20:04:41 +0ms service=format init
    INFO  2025-07-10T20:04:41 +0ms service=bus type=file.edited subscribing
    INFO  2025-07-10T20:04:41 +0ms service=config.hooks init
    INFO  2025-07-10T20:04:41 +0ms service=bus type=file.edited subscribing
    INFO  2025-07-10T20:04:41 +0ms service=bus type=session.idle subscribing
    INFO  2025-07-10T20:04:41 +0ms service=app name=lsp registering service
    INFO  2025-07-10T20:04:41 +1ms service=session id=ses_80a0f4ef8ffeD3bMCIQkrEgB7J version=0.2.24 title=New Session - 2025-07-10T20:04:41.351Z time=[object Object] created
    INFO  2025-07-10T20:04:41 +0ms service=app name=session registering service
    INFO  2025-07-10T20:04:41 +0ms service=app name=storage registering service
    INFO  2025-07-10T20:04:41 +2ms service=config $schema=https://opencode.ai/config.json theme=system log_level=DEBUG mcp=[object Object] loaded
    INFO  2025-07-10T20:04:41 +1ms service=bus type=storage.write publishing
    INFO  2025-07-10T20:04:41 +0ms service=app name=config registering service
    INFO  2025-07-10T20:04:41 +0ms service=config $schema=https://opencode.ai/config.json theme=system log_level=DEBUG mcp=[object Object] loaded
    INFO  2025-07-10T20:04:41 +0ms service=bus type=session.updated publishing
    
    █▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
    █░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
    ▀▀▀▀ █▀▀▀ ▀▀▀ ▀  ▀ ▀▀▀ ▀▀▀▀ ▀▀▀  ▀▀▀
    
    >  hey
    
    INFO  2025-07-10T20:04:41 +0ms service=app name=provider registering service
    INFO  2025-07-10T20:04:41 +2ms service=models.dev refreshing
    INFO  2025-07-10T20:04:41 +0ms service=provider init
    INFO  2025-07-10T20:04:41 +3ms service=provider providerID=openai found
    INFO  2025-07-10T20:04:41 +0ms service=provider providerID=github-copilot found
    @  openai/codex-mini-latest
    
    INFO  2025-07-10T20:04:41 +1ms service=bus type=message.part.updated subscribing
    INFO  2025-07-10T20:04:41 +0ms service=bus type=session.error subscribing
    INFO  2025-07-10T20:04:41 +0ms service=app name=mode registering service
    INFO  2025-07-10T20:04:41 +1ms service=session session=ses_80a0f4ef8ffeD3bMCIQkrEgB7J chatting
    INFO  2025-07-10T20:04:41 +0ms service=provider providerID=openai modelID=codex-mini-latest getModel
    INFO  2025-07-10T20:04:41 +0ms service=provider status=started providerID=openai getSDK
    INFO  2025-07-10T20:04:41 +1ms service=bun cmd=/opt/homebrew/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode,install,--cwd,<home>/.cache/opencode,--registry=https://registry.npmjs.org cwd=<home>/.cache/opencode running
    INFO  2025-07-10T20:04:45 +3800ms service=bun code=0 stdout=bun install v1.2.17 (282dda62)
    
    + @ai-sdk/openai@2.0.0-beta.6
    
    8 packages installed [3.79s]
     stderr=Resolving dependencies
    Resolved, downloaded and extracted [7]
    Saved lockfile
     done
    INFO  2025-07-10T20:04:45 +53ms service=provider status=completed duration=3854 providerID=openai getSDK
    INFO  2025-07-10T20:04:45 +0ms service=provider providerID=openai modelID=codex-mini-latest found
    INFO  2025-07-10T20:04:45 +2ms service=session session=ses_80a0f4ef8ffeD3bMCIQkrEgB7J sessionID=ses_80a0f4ef8ffeD3bMCIQkrEgB7J locking
    INFO  2025-07-10T20:04:45 +6ms service=bus type=storage.write publishing
    INFO  2025-07-10T20:04:45 +0ms service=bus type=message.updated publishing
    INFO  2025-07-10T20:04:45 +11ms service=bus type=storage.write publishing
    INFO  2025-07-10T20:04:45 +0ms service=bus type=message.updated publishing
    INFO  2025-07-10T20:04:45 +0ms service=app name=mcp registering service
    INFO  2025-07-10T20:04:45 +0ms service=mcp key=RepoPrompt type=local found
    INFO  2025-07-10T20:05:11 +25987ms service=mcp key=Memory type=local found
    INFO  2025-07-10T20:05:25 +14576ms service=mcp key=Search type=local found
    INFO  2025-07-10T20:05:34 +8643ms service=session session=ses_80a0f4ef8ffeD3bMCIQkrEgB7J type=start part
    INFO  2025-07-10T20:05:34 +3ms service=bus type=storage.write publishing
    INFO  2025-07-10T20:05:34 +0ms service=bus type=message.updated publishing
    INFO  2025-07-10T20:05:34 +358ms service=session session=ses_80a0f4ef8ffeD3bMCIQkrEgB7J type=error part
    ERROR 2025-07-10T20:05:34 +2ms service=session session=ses_80a0f4ef8ffeD3bMCIQkrEgB7J error=AI_APICallError: Incorrect API key provided: sk-or-v1*************************************************************f2a0. You can find your API key at https://platform.openai.com/account/api-keys.
    INFO  2025-07-10T20:05:34 +0ms service=bus type=session.error publishing
    Error: AI_APICallError: Incorrect API key provided: sk-or-v1*************************************************************f2a0. You can find your API key at https://platform.openai.com/account/api-keys.
    INFO  2025-07-10T20:05:34 +2ms service=bus type=storage.write publishing
    INFO  2025-07-10T20:05:34 +0ms service=bus type=message.updated publishing
    INFO  2025-07-10T20:05:34 +1ms service=session session=ses_80a0f4ef8ffeD3bMCIQkrEgB7J sessionID=ses_80a0f4ef8ffeD3bMCIQkrEgB7J unlocking
    INFO  2025-07-10T20:05:34 +0ms service=bus type=session.idle publishing
    
    INFO  2025-07-10T20:05:34 +0ms service=app name=lsp shutdown
    INFO  2025-07-10T20:05:34 +0ms service=app name=session shutdown
    INFO  2025-07-10T20:05:34 +0ms service=app name=mcp shutdown
    
  3. thesobercoder commented on Jul 10, 2025

    @thesobercoder
    Author

    LOL, found the issue, I have a .env file in my project which contains these vars, but these point to OpenRouter and opencode just read the file and assumed this is an OpenAI key. I'm not sure if the behavior should be like this, because I thought opencode only reads auth config from ~/.local/share/opencode/auth.json.

    Image
  4. self-assigned this
    on Jul 12, 2025
  5. thdxr commented on Jul 12, 2025

    @thdxr
    Member

    it's weird - i recreated the same situation and i see a proper error. going to close for now

  6. thesobercoder commented on Jul 12, 2025

    @thesobercoder
    Author

    I'm still facing the same issue. Will wait for a fix, as a workaround will disable OpenAI provider for now.

  7. Nsomnia commented on Jul 13, 2025

    @Nsomnia

    Sometimes it works sometimes it doesnt. Seems to be a quirk about how you auth with APIs and whether through the tui or conf manually and debugging with moonshot chat showed how the smallest formatting error will throw things off.

    Fairly sure just operator error with config files.

    I'll let it sit for a few minutes but since I first tried OC same thing, whether with an empty or working opencode.json in cwd or $HOME./.config/opencode

    I cant get it to work with a manually configured moonshot conf, but dont have subscription to them, and gemini was workingfor a brief time as was openrouter, something to do with config quirks.

    nsomnia@archbtw ~/D/suno-ai-song-to-music-video-creator > opencode run hey --print-logs
    INFO  2025-07-13T22:26:51 +61ms service=app cwd=/home/nsomnia/Documents/suno-ai-song-to-music-video-creator creating
    INFO  2025-07-13T22:26:51 +0ms service=default version=0.2.33 args=run,hey,--print-logs opencode
    INFO  2025-07-13T22:26:51 +0ms service=app cwd=/home/nsomnia/Documents/suno-ai-song-to-music-video-creator creating
    INFO  2025-07-13T22:26:51 +1ms service=app git=/home/nsomnia/Documents/suno-ai-song-to-music-video-creator git
    INFO  2025-07-13T22:26:51 +1ms service=app git=/home/nsomnia/Documents/suno-ai-song-to-music-video-creator git
    INFO  2025-07-13T22:26:51 +2ms service=app name=config registering service
    INFO  2025-07-13T22:26:51 +0ms service=bus type=storage.write subscribing
    INFO  2025-07-13T22:26:51 +0ms service=app name=bus registering service
    INFO  2025-07-13T22:26:51 +0ms service=format init
    INFO  2025-07-13T22:26:51 +0ms service=bus type=file.edited subscribing
    INFO  2025-07-13T22:26:51 +0ms service=config.hooks init
    INFO  2025-07-13T22:26:51 +0ms service=bus type=file.edited subscribing
    INFO  2025-07-13T22:26:51 +0ms service=bus type=session.idle subscribing
    INFO  2025-07-13T22:26:51 +0ms service=app name=lsp registering service
    INFO  2025-07-13T22:26:51 +1ms service=session id=ses_7fa1a11dafferT4ZERen3zzH4L version=0.2.33 title=New Session - 2025-07-13T22:26:51.557Z time=[object Object] created
    INFO  2025-07-13T22:26:51 +0ms service=app name=session registering service
    INFO  2025-07-13T22:26:51 +0ms service=app name=storage registering service
    INFO  2025-07-13T22:26:51 +1ms service=config loaded
    INFO  2025-07-13T22:26:51 +0ms service=bus type=storage.write publishing
    INFO  2025-07-13T22:26:51 +0ms service=app name=config registering service
    INFO  2025-07-13T22:26:51 +1ms service=config loaded
    INFO  2025-07-13T22:26:51 +0ms service=bus type=session.updated publishing
    
    █▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
    █░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
    ▀▀▀▀ █▀▀▀ ▀▀▀ ▀  ▀ ▀▀▀ ▀▀▀▀ ▀▀▀  ▀▀▀
    
    >  hey
    
    INFO  2025-07-13T22:26:51 +0ms service=app name=provider registering service
    INFO  2025-07-13T22:26:51 +2ms service=models.dev refreshing
    INFO  2025-07-13T22:26:51 +0ms service=provider init
    INFO  2025-07-13T22:26:51 +5ms service=provider providerID=google found
    @  google/gemini-2.5-pro-preview-06-05
    
    INFO  2025-07-13T22:26:51 +0ms service=bus type=message.part.updated subscribing
    INFO  2025-07-13T22:26:51 +0ms service=bus type=session.error subscribing
    INFO  2025-07-13T22:26:51 +0ms service=app name=mode registering service
    INFO  2025-07-13T22:26:51 +2ms service=session session=ses_7fa1a11dafferT4ZERen3zzH4L chatting
    INFO  2025-07-13T22:26:51 +0ms service=provider providerID=google modelID=gemini-2.5-pro-preview-06-05 getModel
    INFO  2025-07-13T22:26:51 +0ms service=provider status=started providerID=google getSDK
    INFO  2025-07-13T22:26:51 +0ms service=bun cmd=/usr/bin/opencode,add,--exact,--cwd,/home/nsomnia/.cache/opencode,--registry=https://registry.npmjs.org,@ai-sdk/google@beta cwd=/home/nsomnia/.cache/opencode running
    INFO  2025-07-13T22:26:51 +5ms service=bun code=0 stdout=bun add v1.2.17 (282dda62)
    
    installed @ai-sdk/google@2.0.0-beta.8
    
    [3.00ms] done
     stderr=Saved lockfile
     done
    INFO  2025-07-13T22:26:51 +68ms service=provider status=completed duration=73 providerID=google getSDK
    INFO  2025-07-13T22:26:51 +0ms service=provider providerID=google modelID=gemini-2.5-pro-preview-06-05 found
    INFO  2025-07-13T22:26:51 +1ms service=session session=ses_7fa1a11dafferT4ZERen3zzH4L sessionID=ses_7fa1a11dafferT4ZERen3zzH4L locking
    INFO  2025-07-13T22:26:51 +7ms service=bus type=storage.write publishing
    INFO  2025-07-13T22:26:51 +1ms service=bus type=message.updated publishing
    INFO  2025-07-13T22:26:51 +9ms service=bus type=storage.write publishing
    INFO  2025-07-13T22:26:51 +0ms service=bus type=message.updated publishing
    INFO  2025-07-13T22:26:51 +0ms service=app name=mcp registering service
    INFO  2025-07-13T22:26:51 +4ms service=session session=ses_7fa1a11dafferT4ZERen3zzH4L type=start part
    INFO  2025-07-13T22:26:51 +5ms service=bus type=storage.write publishing
    INFO  2025-07-13T22:26:51 +0ms service=bus type=message.updated publishing
    free text input field in zsh
    

    Have tried with any combination of any or non from gemini, claude, openrouter, and moonshot.

    nsomnia@archbtw ~/D/suno-ai-song-to-music-video-creator > opencode auth list
    
    ┌  Credentials ~/.local/share/opencode/auth.json
    │
    ●  Google api
    │
    └  1 credentials
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions