Repository navigation
Description
Summary
The same project should work across both desktop app and TUI mode. In desktop mode, browser.* tools function correctly via the built-in Chromium engine. In TUI mode, these tools are non-functional (no browser engine), yet they remain in the tool catalog — causing the LLM to attempt calls that fail silently or waste tokens.
Environment
- opencode version: 2.0.3
- OS: Windows_NT 10.0.26200 (MINGW64_NT-10.0-26200)
- Terminal: xterm-256color (TUI mode, Git Bash)
- Shell: sh (MINGW64)
- Install/channel: latest
- Active plugins: None
Reproduction
- Open a project in the desktop app →
browser.*tools are available and work (screenshot, navigate, etc.) - Open the same project in TUI mode (
opencodein terminal) - The same 44
browser.*tools appear in the tool catalog - The LLM agent sees them and attempts to use them (e.g.,
browser.screenshot,browser.navigate) - Calls fail or produce useless results because TUI mode has no browser engine
Expected Behavior
Same project, mode-aware tool availability:
- Desktop app:
browser.*tools are available and fully functional ✅ - TUI mode:
browser.*tools should be automatically excluded from the tool catalog, or at minimum denied by default so the LLM does not attempt to call them
The user should not need to maintain separate configs or add AGENTS.md workarounds to get correct behavior in each mode. OpenCode already knows whether it is running as a desktop app or TUI — the tool catalog should reflect that.
Actual Behavior
Both modes present the identical set of 44 browser.* tools. In TUI, the LLM:
- Attempts
browser.screenshot"to check the visual effect" - Attempts
browser.tabs.open/browser.navigatefor web tasks - Wastes tokens on failed calls and produces confusing output
There is no browser action in the permissions system, so users cannot deny these tools via config either.
Additional Context
- The MCP
playwrightserver inopencode.jsoncis already"enabled": false, but that only disables the MCP-provided tools — not the 44 built-inbrowser.*tools which are part of OpenCode core. - Workaround tried: Adding "do not use browser tools" instructions to
AGENTS.md. This is unreliable because LLMs do not always follow text-level tool restrictions, especially when the tools are presented as available in the catalog. - A clean fix would be: if the runtime has no browser engine, remove
browser.*from the tool catalog before sending it to the model.
Activity
github-actions commentedon Sep 14, 2026
This issue might be a duplicate of an existing issue. Please check:
browser.disconnectederrors. The fix likely needs to gate the browser tool catalog on runtime browser availability regardless of session type.If your issue has meaningful differences from #48224 (e.g., TUI-specific behavior vs. web-session-specific behavior), feel free to clarify so maintainers can decide whether to track them separately.
XXLxhPLMM commentedon Sep 14, 2026
This is the same root cause as #48224, but in TUI mode rather than web sessions.
Key difference from #48224:
browser.disconnectederrors in web sessionsbrowser.*tools in the catalog and attempts to call them (e.g.,browser.screenshot,browser.navigate), wasting tokens and producing no useful result — since TUI has no browser engine at allSame project, different modes:
The fundamental fix is the same: gate the browser tool catalog on actual runtime browser availability. In TUI (and web sessions where no desktop browser is connected), these tools should be excluded from the catalog presented to the model.
Closing in favor of #48224.
XXLxhPLMM commentedon Sep 14, 2026
Duplicate of #48224 — same root cause (browser tools exposed without browser engine), different context (TUI mode). Consolidating there.