Repository navigation
Can't create an agent with opencode agent create command #4916
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
I want to create an agent with the opencode command, but it fails.
opencode agent create --log-level DEBUG --print-logs
INFO 2025-11-30T07:38:34 +323ms service=default version=1.0.122 args=["agent","create","--log-level","DEBUG","--print-logs"] opencode
INFO 2025-11-30T07:38:34 +1ms service=default directory=/Users/piotrp/.config/opencode creating instance
INFO 2025-11-30T07:38:34 +0ms service=project directory=/Users/piotrp/.config/opencode fromDirectory
┌ Create agent
│
◇ Description
│ Flutter/Dart coding expert. Writes idiomatic, pragmagic, and modern Dart code
│
INFO 2025-11-30T07:38:38 +4701ms service=config path=/Users/piotrp/.config/opencode/config.json loading
INFO 2025-11-30T07:38:38 +1ms service=config path=/Users/piotrp/.config/opencode/opencode.json loading
INFO 2025-11-30T07:38:38 +0ms service=config path=/Users/piotrp/.config/opencode/opencode.jsonc loading
INFO 2025-11-30T07:38:38 +3ms service=bun cmd=["/Users/piotrp/.nvm/versions/node/v23.7.0/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode","add","@opencode-ai/plugin@1.0.122","--exact"] cwd=/Users/piotrp/.config/opencode running
INFO 2025-11-30T07:38:38 +28ms service=bun code=0 stdout=bun add v1.3.3 (274e01c7)
installed @opencode-ai/plugin@1.0.122
[15.00ms] done
stderr=Saved lockfile
done
INFO 2025-11-30T07:38:38 +4ms service=provider status=started state
INFO 2025-11-30T07:38:38 +2ms service=models.dev file={} refreshing
INFO 2025-11-30T07:38:38 +4ms service=provider init
INFO 2025-11-30T07:38:38 +1ms service=plugin path=opencode-copilot-auth@0.0.7 loading plugin
INFO 2025-11-30T07:38:38 +11ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
◒ Generating agent configurationINFO 2025-11-30T07:38:39 +28ms service=provider providerID=github-copilot npm=@ai-sdk/openai-compatible found
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=deepseek npm=@ai-sdk/openai-compatible found
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=github-models npm=@ai-sdk/openai-compatible found
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=openrouter npm=@ai-sdk/openai-compatible found
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=anthropic npm=@ai-sdk/anthropic found
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=github-copilot-enterprise npm=@ai-sdk/openai-compatible found
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=opencode npm=@ai-sdk/openai-compatible found
INFO 2025-11-30T07:38:39 +0ms service=provider status=completed duration=46 state
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=github-copilot modelID=gemini-3-pro-preview getModel
INFO 2025-11-30T07:38:39 +1ms service=provider status=started providerID=github-copilot getSDK
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=github-copilot pkg=@ai-sdk/openai-compatible using bundled provider
INFO 2025-11-30T07:38:39 +0ms service=provider status=completed duration=0 providerID=github-copilot getSDK
INFO 2025-11-30T07:38:39 +0ms service=provider providerID=github-copilot modelID=gemini-3-pro-preview found
■ LLM failed to generate agent: Bad Request
ERROR 2025-11-30T07:38:39 +394ms service=default name=UICancelledError message=UICancelledError stack=UICancelledError: UICancelledError
at <anonymous> (src/cli/cmd/agent.ts:55:17)
at processTicksAndRejections (native:7:39) fatal
I have opencode provider configured.
OpenCode version
1.0.122
Steps to reproduce
- call opencode agent create
- Specifiy description
- Attempt to go further fails
Screenshot and/or share link
No response
Operating System
MacOs
Terminal
Ghostty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Activity
github-actions commentedon Nov 30, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if this doesn't address your specific case.
github-actions commentedon Nov 30, 2025
DISREGARD - Removing incorrect duplicate suggestion
rwese commentedon Nov 30, 2025
i fail to reproduce the issue, with a new opencode installation.
Maybe check if you have a project or global configuration which has the wrong default model set.
You also can specify the model to use with the command.
ppasieka commentedon Nov 30, 2025
Thank you @rwese I didn't have the default model set in the config. This ticket can be closed.
Maybe only the error message could be improved :)
dipping5115 commentedon Nov 30, 2025
Hello, I want to confirm if my understanding is correct, that is, after I execute
then the model I just selected will be applied to
opencode agent createto generate prompts?