Repository navigation
Description
Summary
When using OpenCode v1.3.0 with an OpenAI-compatible provider, the agent frequently enters a state where it runs tool calls (file reads, rg searches) in the background but the UI shows absolutely nothing — no spinner, no tool output, no stage report, no progress indicator. The session appears completely frozen.
The root cause appears to be uncontrolled exploration: the agent expands its search scope without converging, never reports intermediate progress, and never sends results back to the LLM. It's a workflow/exploration control problem, not a network or model issue.
Core Problem: Exploration Runs Unchecked
The agent's open-ended exploration mode has three compounding failures:
- Over-expansion: When given a task requiring multi-file research, the agent keeps broadening its search (read file A → grep for references → read file B → grep again...) without any convergence mechanism
- No stage reporting: During this exploration, the UI renders nothing. The user has zero visibility into what the agent is doing or how far it has progressed
- No convergence/timeout: The exploration loop has no circuit breaker — it will run indefinitely until the user kills it with
Ctrl+C
Environment
- OpenCode: v1.3.0 (macOS arm64)
- Provider: OpenAI-compatible API via local gateway (
http://127.0.0.1:18081/v1) - Model:
gpt-5.4withreasoning: true, effortxhigh - OS: macOS 15.4 (Darwin 25.3.0, arm64)
Evidence
While the UI shows nothing, background processes are clearly active:
$ ps aux | grep opencode
zengzheqing 47704 13.6 1.1 ... opencode -s ses_...
zengzheqing 53854 0.0 0.0 ... rg -nH --hidden --regexp "gatewayctl|..." --glob *.{sh,zsh,py,md,json,toml} ...
The gateway shows zero active connections — OpenCode is not calling the LLM:
$ lsof -i :18081
COMMAND PID FD TYPE NODE NAME
codex-gat 56142 11u IPv6 TCP *:18081 (LISTEN)
# No ESTABLISHED connections
This confirms the agent is stuck in a local tool-call loop: executing rg / file reads but never returning to the LLM and never rendering anything to the user.
Key Comparison: Codex CLI Does NOT Have This Issue
Same model (gpt-5.4), same reasoning effort (xhigh), same gateway, same project — Codex CLI completes identical tasks without freezing. Every tool call is displayed, progress is streamed, exploration converges. This rules out model behavior and network issues entirely.
Reproduction
- Configure OpenCode with an OpenAI-compatible provider
- Open a project with large files (400+ line scripts, multiple interconnected source files)
- Give an open-ended task (e.g., "audit the lifecycle management scripts and fix credential loading")
- Wait — UI will freeze after the first model response triggers tool calls
- Observed: session frozen for 30+ minutes with zero UI output
ps auxshowsrgprocesses spawned by OpenCode actively running
Workaround
Ctrl+C → restart session → type continue → session resumes until it freezes again.
Expected Behavior
- Tool calls rendered in real-time — show what file is being read, what grep is running
- Stage/progress reporting — periodic summaries of what the agent has found so far
- Exploration convergence — after N tool calls or M seconds without LLM interaction, the agent should consolidate findings and return to the LLM
- Visible activity indicator — at minimum a spinner showing the agent is working
Actual Behavior
- UI is completely blank — no spinner, no tool output, nothing
- Background tool processes (
rg, file reads) are running - No LLM API calls are being made
- Agent never converges — will loop indefinitely
- Only recovery is
Ctrl+C+ manual restart
Activity
github-actions commentedon Mar 23, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
zengzheqing commentedon Mar 23, 2026
Follow-up: local isolation pass confirms this is NOT a gateway/wrapper issue
I did a deep local isolation pass and fixed multiple gateway-side integration issues, but they do not explain the "gpt-5.4 xhigh feels frozen / no progress for a very long time" incidents described above.
Locally validated
request → fulfill → restarton the local gateway succeeds end-to-end./scripts/opencodegw.sh run 'Reply with exactly OK.'returnsOK/readyzOK, new PID, pending request cleared)So the earlier symptom is different from wrapper/restart failure
Current suspicion: runtime/UX progress-reporting gap under xhigh + multi-tool exploration
Potential maintainer directions:
xhigh+ multi-tool exploration — are they too weak or missing during long search phases?xhighmaterially changes tool orchestration cadence without enough UI heartbeat to matchzengzheqing commentedon Mar 23, 2026
More local isolation results:
defaultVariant = xhighalso works for one-shot runsBut:
This makes the issue look more like:
zengzheqing commentedon Mar 23, 2026
I ran a more controlled comparison on the same small open-ended repo-search task:
Task:
Results:
defaultVariant = xhighpath: also timed outThis makes the issue look less like “xhigh-specific freeze” and more like:
zengzheqing commentedon Mar 23, 2026
Additional isolation result:
I split the behavior into two cases under explicit
xhigh:So this looks less like “xhigh reasoning itself is broken” and more like:
xhighmay amplify it, but the underlying issue seems more related to tool-heavy exploration / progress heartbeat / search orchestration than to pure reasoning aloneI also observed a live long-running session that:
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.