Skip to content

TUI unresponsive #35474

Description

@mdavis-xyz

Description

I'm trying to use OpenCode for the first time. I can type prompts in, but I never get any response. I don't see anything to suggest that there's an error. There was a little animation for 1 second to show something was happening. Then that disappeared, but nothing else appeared.

I'm trying to connect to GreenPT with these instructions from the provider.

I have not configured anything except the provider. I tried doing so both via editing the JSON config file, and by typing /connect inside the TUI.

The user interface is not blocked. I can keep submitting more prompts. The issue is just that I never see any answer from the LLM.

Duplicates

There are other issues raised like this. They were closed due to staleness. I couldn't see any solution.

#2940
#2819
#2817

Plugins

None

OpenCode version

1.17.3

Steps to reproduce

~/.config/opencode/opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "greenpt": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "GreenPT API",
      "options": {
        "baseURL": "https://api.greenpt.ai/v1",
        "apiKey": "{file:~/.ssh/greenpt.key}"
      },
      "models": {
        "devstral-2-123b-instruct-2512": {
          "name": "Mistral Devstral 2 123B"
        },
        "qwen3-coder-30b-a3b-instruct": {
          "name": "Qwen3 Coder 30B"
        }
      }
    }
  },
  "model": "greenpt/devstral-2-123b-instruct-2512"
}

Then run opencode.
Then type "test. Just say hi back" and hit enter.

Screenshot and/or share link

Expected Output

Image

Actual Output

Image

Operating System

Ubuntu 24.04.4 LTS

Terminal

Gnome Terminal 3.52.0

Debug Info

Logs from normal TUI:

Details
$ cat opencode.log 
timestamp=2026-07-05T20:40:26.890Z level=INFO run=e81651c6 message="creating instance" directory=/home/matthew/.local/share/opencode/log
timestamp=2026-07-05T20:40:26.891Z level=INFO run=e81651c6 message=fromDirectory directory=/home/matthew/.local/share/opencode/log
timestamp=2026-07-05T20:40:26.917Z level=INFO run=e81651c6 message=bootstrapping directory=/home/matthew/.local/share/opencode/log
timestamp=2026-07-05T20:40:26.927Z level=INFO run=e81651c6 message=loading path=/home/matthew/.config/opencode/config.json
timestamp=2026-07-05T20:40:26.927Z level=INFO run=e81651c6 message=loading path=/home/matthew/.config/opencode/opencode.json
timestamp=2026-07-05T20:40:26.928Z level=INFO run=e81651c6 message=loading path=/home/matthew/.config/opencode/opencode.jsonc
timestamp=2026-07-05T20:40:26.953Z level=INFO run=e81651c6 message="all LSPs are disabled"
timestamp=2026-07-05T20:40:26.954Z level=INFO run=e81651c6 message="all formatters are disabled"
timestamp=2026-07-05T20:40:26.954Z level=INFO run=e81651c6 message=init
timestamp=2026-07-05T20:40:27.504Z level=INFO run=e81651c6 message=init count=1
timestamp=2026-07-05T20:40:27.561Z level=INFO run=e81651c6 message="watcher backend" directory=/home/matthew/.local/share/opencode/log platform=linux backend=inotify
timestamp=2026-07-05T20:40:27.564Z level=INFO run=e81651c6 message="project copy refresh started" projectID=global
timestamp=2026-07-05T20:40:27.566Z level=INFO run=e81651c6 message="project copy refresh done" projectID=global updated=[] removed=[]
timestamp=2026-07-05T20:40:27.610Z level=INFO run=e81651c6 message="booting location services" directory=/home/matthew/.local/share/opencode/log workspaceID=undefined
timestamp=2026-07-05T20:40:30.431Z level=INFO run=e81651c6 message=created id=ses_0cbfd2420ffe15QsCWxYonHT4F slug=neon-circuit version=1.17.13 projectID=global directory=/home/matthew/.local/share/opencode/log path=home/matthew/.local/share/opencode/log workspaceID=undefined parentID=undefined title="New session - 2026-07-05T20:40:30.431Z" agent=build model.id=devstral-2-123b-instruct-2512 model.providerID=greenpt metadata=undefined permission=undefined cost=0 tokens.input=0 tokens.output=0 tokens.reasoning=0 tokens.cache.read=0 tokens.cache.write=0 time.created=1783284030431 time.updated=1783284030431
timestamp=2026-07-05T20:40:30.467Z level=INFO run=e81651c6 message=loop session.id=ses_0cbfd2420ffe15QsCWxYonHT4F step=0
timestamp=2026-07-05T20:40:30.479Z level=INFO run=e81651c6 message="shell tool using shell" shell=/bin/bash
timestamp=2026-07-05T20:40:30.511Z level=INFO run=e81651c6 message=stream providerID=greenpt modelID=devstral-2-123b-instruct-2512 session.id=ses_0cbfd2420ffe15QsCWxYonHT4F small=true agent=title mode=primary
timestamp=2026-07-05T20:40:30.529Z level=INFO run=e81651c6 message="llm runtime selected" llm.runtime=ai-sdk llm.provider=greenpt llm.model=devstral-2-123b-instruct-2512
timestamp=2026-07-05T20:40:30.583Z level=INFO run=e81651c6 message="watcher backend" directory=/home/matthew/.local/share/opencode/log platform=linux backend=inotify
timestamp=2026-07-05T20:40:30.588Z level=INFO run=e81651c6 message="project copy refresh started" projectID=global
timestamp=2026-07-05T20:40:30.588Z level=INFO run=e81651c6 message="project copy refresh done" projectID=global updated=[] removed=[]
timestamp=2026-07-05T20:40:30.602Z level=INFO run=e81651c6 message="booting location services" directory=/home/matthew/.local/share/opencode/log workspaceID=undefined
timestamp=2026-07-05T20:40:31.101Z level=INFO run=e81651c6 message=process session.id=ses_0cbfd2420ffe15QsCWxYonHT4F messageID=msg_f3402dc060015T34VBn6B7VvG0
timestamp=2026-07-05T20:40:31.102Z level=INFO run=e81651c6 message=stream providerID=greenpt modelID=devstral-2-123b-instruct-2512 session.id=ses_0cbfd2420ffe15QsCWxYonHT4F small=false agent=build mode=primary
timestamp=2026-07-05T20:40:31.104Z level=INFO run=e81651c6 message="llm runtime selected" llm.runtime=ai-sdk llm.provider=greenpt llm.model=devstral-2-123b-instruct-2512
timestamp=2026-07-05T20:40:31.230Z level=INFO run=e81651c6 message=loop session.id=ses_0cbfd2420ffe15QsCWxYonHT4F step=1
timestamp=2026-07-05T20:40:31.231Z level=INFO run=e81651c6 message="exiting loop" session.id=ses_0cbfd2420ffe15QsCWxYonHT4F

Stdout from running opencode run hello --print-logs

Details
timestamp=2026-07-05T20:48:34.091Z level=INFO run=d78b5c90 message="creating instance" directory=/home/matthew/.local/share/opencode/log
timestamp=2026-07-05T20:48:34.093Z level=INFO run=d78b5c90 message=fromDirectory directory=/home/matthew/.local/share/opencode/log
timestamp=2026-07-05T20:48:34.133Z level=INFO run=d78b5c90 message=bootstrapping directory=/home/matthew/.local/share/opencode/log
timestamp=2026-07-05T20:48:34.142Z level=INFO run=d78b5c90 message=loading path=/home/matthew/.config/opencode/config.json
timestamp=2026-07-05T20:48:34.143Z level=INFO run=d78b5c90 message=loading path=/home/matthew/.config/opencode/opencode.json
timestamp=2026-07-05T20:48:34.143Z level=INFO run=d78b5c90 message=loading path=/home/matthew/.config/opencode/opencode.jsonc
timestamp=2026-07-05T20:48:34.212Z level=INFO run=d78b5c90 message="all LSPs are disabled"
timestamp=2026-07-05T20:48:34.213Z level=INFO run=d78b5c90 message="all formatters are disabled"
timestamp=2026-07-05T20:48:34.213Z level=INFO run=d78b5c90 message=init
timestamp=2026-07-05T20:48:34.324Z level=INFO run=d78b5c90 message=created id=ses_0cbf5c1ebffe0Xnn65pxWx833f slug=hidden-eagle version=1.17.13 projectID=global directory=/home/matthew/.local/share/opencode/log path=home/matthew/.local/share/opencode/log workspaceID=undefined parentID=undefined title="New session - 2026-07-05T20:48:34.324Z" agent=undefined model=undefined metadata=undefined permission="[{\"permission\":\"question\",\"pattern\":\"*\",\"action\":\"deny\"},{\"permission\":\"plan_enter\",\"pattern\":\"*\",\"action\":\"deny\"},{\"permission\":\"plan_exit\",\"pattern\":\"*\",\"action\":\"deny\"}]" cost=0 tokens.input=0 tokens.output=0 tokens.reasoning=0 tokens.cache.read=0 tokens.cache.write=0 time.created=1783284514324 time.updated=1783284514324
timestamp=2026-07-05T20:48:34.337Z level=INFO run=d78b5c90 message="event connected"
timestamp=2026-07-05T20:48:34.511Z level=INFO run=d78b5c90 message=loop session.id=ses_0cbf5c1ebffe0Xnn65pxWx833f step=0
timestamp=2026-07-05T20:48:34.524Z level=INFO run=d78b5c90 message="shell tool using shell" shell=/bin/bash
timestamp=2026-07-05T20:48:34.529Z level=INFO run=d78b5c90 message=init count=1

> build · devstral-2-123b-instruct-2512

timestamp=2026-07-05T20:48:34.553Z level=INFO run=d78b5c90 message=stream providerID=greenpt modelID=devstral-2-123b-instruct-2512 session.id=ses_0cbf5c1ebffe0Xnn65pxWx833f small=true agent=title mode=primary
timestamp=2026-07-05T20:48:34.568Z level=INFO run=d78b5c90 message="llm runtime selected" llm.runtime=ai-sdk llm.provider=greenpt llm.model=devstral-2-123b-instruct-2512
timestamp=2026-07-05T20:48:34.627Z level=INFO run=d78b5c90 message="watcher backend" directory=/home/matthew/.local/share/opencode/log platform=linux backend=inotify
timestamp=2026-07-05T20:48:34.635Z level=INFO run=d78b5c90 message="project copy refresh started" projectID=global
timestamp=2026-07-05T20:48:34.637Z level=INFO run=d78b5c90 message="project copy refresh done" projectID=global updated=[] removed=[]
timestamp=2026-07-05T20:48:34.669Z level=INFO run=d78b5c90 message="booting location services" directory=/home/matthew/.local/share/opencode/log workspaceID=undefined
timestamp=2026-07-05T20:48:34.893Z level=INFO run=d78b5c90 message=process session.id=ses_0cbf5c1ebffe0Xnn65pxWx833f messageID=msg_f340a3ed2001InUqvStn8jbnI4
timestamp=2026-07-05T20:48:34.895Z level=INFO run=d78b5c90 message=stream providerID=greenpt modelID=devstral-2-123b-instruct-2512 session.id=ses_0cbf5c1ebffe0Xnn65pxWx833f small=false agent=build mode=primary
timestamp=2026-07-05T20:48:34.896Z level=INFO run=d78b5c90 message="llm runtime selected" llm.runtime=ai-sdk llm.provider=greenpt llm.model=devstral-2-123b-instruct-2512
timestamp=2026-07-05T20:48:35.064Z level=INFO run=d78b5c90 message=loop session.id=ses_0cbf5c1ebffe0Xnn65pxWx833f step=1
timestamp=2026-07-05T20:48:35.065Z level=INFO run=d78b5c90 message="exiting loop" session.id=ses_0cbf5c1ebffe0Xnn65pxWx833f
timestamp=2026-07-05T20:48:35.070Z level=INFO run=d78b5c90 message="disposing instance" directory=/home/matthew/.local/share/opencode/log

Is this line the culprit? Is it a permission issue?

workspaceID=undefined parentID=undefined title="New session - 2026-07-05T20:48:34.324Z" agent=undefined model=undefined metadata=undefined permission="[{\"permission\":\"question\",\"pattern\":\"*\",\"action\":\"deny\"},{\"permission\":\"plan_enter\",\"pattern\":\"*\",\"action\":\"deny\"},{\"permission\":\"plan_exit\",\"pattern\":\"*\",\"action\":\"deny\"}]" cost=0 tokens.input=0 tokens.output=0 tokens.reasoning=0 tokens.cache.read=0 tokens.cache.write=0 time.created=1783284514324 time.updated=1783284514324

The provider's docs say to configure opencode.json. I saw that opencode.jsonc was already there, so I used that instead. I have tried renaming that file from .jsonc to .json, but I get the same result.

~/.local/share/opencode/auth.json had the API key I used with /connect. It was different to the key I used in ~/.ssh/greenpt.key. I deleted ~/.local/share/opencode/auth.json and got the same result.

$ opencode debug paths
home       /home/matthew
data       /home/matthew/.local/share/opencode
bin        /home/matthew/.cache/opencode/bin
log        /home/matthew/.local/share/opencode/log
repos      /home/matthew/.local/share/opencode/repos
cache      /home/matthew/.cache/opencode
config     /home/matthew/.config/opencode
state      /home/matthew/.local/state/opencode
tmp        /tmp/opencode

~/.ssh/greenpt.key: sk-... (I've tried both with and without a trailing newline)
I've tried the API with this key directly with curl, and it works.

$ curl -X POST https://api.greenpt.ai/v1/chat/completions   -H "Authorization: Bearer $GREENPT_KEY"   -H "Content-Type: application/json"   -d '{"model": "qwen3-coder-30b-a3b-instruct", "messages": [{"role": "user", "content": "test"}]}'
{"choices":[{"index":0,"message":{"role":"assistant","content":"Hello! This is a test response to your message. How can I help you today? If you have any questions or need assistance with anything, please let me know! \n\nIs there something specific you'd like to discuss or work on?","refusal":null,"annotations":null,"audio":null,"function_call":null,"tool_calls":[],"reasoning":null},"logprobs":null,"finish_reason":"stop","stop_reason":null,"token_ids":null}],"created":1783283698,"id":"chatcmpl-2e071516-28ed-464c-a408-6d08d0fb5ae9","model":"qwen3-coder-30b-a3b-instruct","object":"chat.completion","service_tier":null,"system_fingerprint":null,"usage":{"prompt_tokens":9,"total_tokens":58,"completion_tokens":49,"prompt_tokens_details":null,"inferenceTiming":{"inferenceTimeMs":679.4794179797173}},"impact":{"version":"20250922","inferenceTime":{"total":679,"unit":"ms"},"energy":{"total":158937,"unit":"Wms"},"emissions":{"total":638,"unit":"ugCO2e"}}}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions