Repository navigation
fix(opencode): point agents at T3's browser instead of OpenCode's - #50
Merged
Merged
Conversation
OpenCode denies its own browser tool until its desktop app attaches, but T3's full-access `*` allow re-enabled it. Agents reached for a browser that can never connect under T3 and never found `preview_*`. Re-deny the browser tool and skill in full-access sessions, and give OpenCode the T3 browser instructions Codex and ACP already get when browser access is enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Scope native browser denies to T3-managed OpenCode 2 servers and retain external desktop browser access. Add the existing T3 browser instructions to OpenCode 1 turns only when its MCP connection and browser capability are available. Cover managed/external resume and disconnected/disabled browser states. Validated with 170 OpenCode tests and direct provider/server typechecks. Reviewed and repaired with GPT-6 Astra Pro through ChatGPT coding tools.
A child that inherits only a `*` allow kept OpenCode's browser, because stripping explicit browser allows does nothing to that rule. A desktop permission event during session.update could also leave the stale allow list on the server while the local cache moved on. Co-Authored-By: Grok 4.7 <noreply@x.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenCode agents running under T3 couldn't use a browser. OpenCode 2.x ships its own
browser.*tools, which only work when OpenCode's desktop app attaches, so OpenCode denies them by default. T3's full-access*allow rule switched them back on. In a DeepSeek research thread, the agent calledbrowser.tabs.open, got[browser.disconnected] No desktop browser is connected, and never found T3'spreview_*tools. OpenCode's system prompt never mentionedpreview_*, though Codex and ACP prompts do.Fix
browserToolsAvailableis enabled.*allow, which last-match-wins back onto the browser, gets an explicit browser and skill deny on both managed and external servers. A child with no browser rule and no*allow is left as OpenCode reported it.Validation
vp test run apps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts: 105 passed.vp test run apps/server/src/orchestration-v2/OpenCode2OrchestratorV2.integration.test.ts: 9 passed.vp test run packages/provider-opencode: 157 passed across 15 files.opencode2_nested_background) passes with the child*deny appended.vp run check:changed origin/mainpassed format, lint, both knip passes, GraphQL, typecheck of 10 packages, and 166 tests across 4 files.*deny failed first as a replay timeout: the adapter never sentsession.update. The mid-update rewrite failed first asOpenCodeReplayMismatchError(the next call wassession.instructions.entry.put, not the corrective update).Native permission snapshots are the authority available to T3. Replacing the whole native permission array is not atomic against another client, and a preserved allow on an existing session does not independently establish browser liveness.
The instruction text itself is unchanged; it's existing text now also sent to OpenCode. I didn't run the paid
mcp-tool-useeval.Related, not in this PR: OpenCode 2.x asks once which third-party search provider (Exa, Firecrawl, Parallel, …) to use before its
websearchtool works. In the reported thread, an answer arrived 16 ms after the prompt appeared, and OpenCode then stored web search as disabled. It is unclear how; the user did not choose to disable it. Fixed locally by pinning"websearch": { "provider": "exa" }in the OpenCode config, which skips the prompt and needs no API key.Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code
Follow-up review and repairs: GPT-6 Astra Pro through ChatGPT coding tools.
Child full-access deny and mid-update rewrite: Grok 4.7 via Cursor.