This guide is for AI agents running in the Codex desktop app that work on
thunks through the Thunk.AI Builder MCP. It covers how to open a thunk in
the app's in-app browser and keep that tab on what you are working on. Why you
show the thunk, and which view to show for each change, are in
Building thunks with the Builder MCP
(Open the thunk in the browser pane). For the Claude desktop app, read
Showing a thunk in the Claude desktop app
instead.
Open the thunk once, then move that tab
Every open_in_codex call opens a new tab. It takes no tab to reuse and
returns none, so calling it for each view fills the panel with tabs. Call it
once per session to open the thunk, then move that same tab:
Open the thunk once. Call
mcp__codex_app__open_in_codexwith
target: { type: "browser", url: "<the thunk's url>" }and
placement: "right", as soon as the thunk's URL is available, for every
thunk task (not only builds). The panel opens asynchronously; carry on with
the work. If the call fails or no browser panel is available, say so in one
line and give the clickable link anyway.Change the view by moving that tab, when Computer Use is available. If
the session has Computer Use (cua_repl), navigate the existing in-app
browser tab instead of opening another one. Call
cua.listTabs({ browser: "iab" }), pick the tab whoseurlis on the
thunk URL's site, bind it withcua.getTab(tab.id, { browser: tab.browserId }),
and callgoto("<the new url>")on it. Only change its URL; don't click or
type there. Use the tabidandbrowserIdthatlistTabsreturns, not a
URL: binding a tab by URL can fail with "Tab not found".Without Computer Use, don't call
open_in_codexagain for each view.
Give the link to the new view in your message instead, and let the user
open it. Callopen_in_codexagain only when the user asks to see it in
the panel, or says they closed the tab. With Computer Use, also call it
again whenlistTabsshows no tab on the thunk URL's site.
