Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Error: agent coder not found when running opencode CLI #298

Description

@PradheepTech

Steps to Reproduce:

Installed using the following command:

curl -fsSL https://raw.githubusercontent.com/opencode-ai/opencode/refs/heads/main/install | bash
Tried to run:

opencode
Expected Behavior:
opencode should launch in interactive mode.

Actual Behavior:

CLI returns:
Error: agent coder not found

Activity

  1. Normzy1 commented on Jul 6, 2025

    @Normzy1

    Same issue - even after adding API keys.

  2. braden-w commented on Jul 7, 2025

    @braden-w

    I had this issue after installing via Homebrew. I uninstalled with brew uninstall opencode, then reinstalled with bun and had no problems running opencode auth login. Then I uninstalled and reinstalled with Homebrew again, and no issues! Not sure what the issue is.

  3. norandom commented on Jul 7, 2025

    @norandom

    Same issue.

  4. xubiaolin commented on Jul 9, 2025

    @xubiaolin

    same too

  5. torvicv commented on Jul 9, 2025

    @torvicv

    same

  6. thesrs02 commented on Jul 9, 2025

    @thesrs02

    same on mac m4 air - opencode installed via brew

  7. thesrs02 commented on Jul 12, 2025

    @thesrs02

    this works

    local dir

    .opencode.json

    {
      "providers": {
        "openrouter": {
          "apiKey": "",
          "disabled": false
        }
      },
      "agents": {
        "coder": {
          "model": "openrouter.o3-mini",
          "maxTokens": 5000
        },
        "task": {
          "model": "openrouter.o3-mini",
          "maxTokens": 5000
        },
        "title": {
          "model": "openrouter.o3-mini",
          "maxTokens": 80
        }
      },
    
      "lsp": {
        "go": {
          "disabled": true,
          "command": "...."
        }
      },
      "debug": true,
      "debugLSP": false,
      "autoCompact": true
    }
    
    
  8. zangjiucheng commented on Jul 13, 2025

    @zangjiucheng

    Got the same issue on NixOS

  9. shubhankiit commented on Jul 15, 2025

    @shubhankiit

    try running this command: npm install -g opencode-ai

  10. gointern commented on Jul 16, 2025

    @gointern

    Same for me. I am running on Debian 12, xfce, bash, node 18.19.0

  11. lulzhipsters commented on Jul 17, 2025

    @lulzhipsters

    Me too

  12. ocontant commented on Jul 19, 2025

    @ocontant

    Any fix on this, or root cause identification (if config based)

  13. thecoldstone commented on Jul 23, 2025

    @thecoldstone

    Got the same issue on Mac M4 after running
    brew install opencode-ai/tap/opencode

    However it did work after installing via npm
    npm install -g opencode-ai

  14. ImPedro29 commented on Jul 24, 2025

    @ImPedro29

    doesn't even work with npm :(

  15. PanchoBubble commented on Jul 24, 2025

    @PanchoBubble

    Uninstall open code if you did with brew
    run curl -fsSL https://opencode.ai/install | bash (from the install docs)

    (source ~/.zshrc or where ever you have your $PATH)
    (you get a message like Successfully added opencode to $PATH in /Users/<myuser>/.zshrc you can check from there what to source)

    then run opencode auth login

  16. added a commit that references this issue on Mar 29, 2026
    87ceb33
  17. added a commit that references this issue on Aug 14, 2026
    4502ad9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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