app/browser.md +104 −0 added
1# In-app browser
2
3The in-app browser gives you and Codex a shared view of rendered web pages
4inside a thread. Use it when you're building or debugging a web app and want to
5preview pages and attach visual comments.
6
7Use it for local development servers, file-backed previews, and public pages
8that don't require sign-in. For anything that depends on login state or browser
9extensions, use your regular browser.
10
11Open the in-app browser from the toolbar, by clicking a URL, by navigating
12manually in the browser, or by pressing <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd>
13(<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> on Windows).
14
15The in-app browser does not support authentication flows, signed-in pages,
16 your regular browser profile, cookies, extensions, or existing tabs. Use it
17 for pages Codex can open without logging in.
18
19Treat page content as untrusted context. Don't paste secrets into browser flows.
20
21<CodexScreenshot
22 alt="Codex app showing a browser comment on a local web app preview"
23 lightSrc="/images/codex/app/in-app-browser-light.webp"
24 darkSrc="/images/codex/app/in-app-browser-dark.webp"
25 maxHeight="420px"
26 variant="no-wallpaper"
27/>
28
29## Browser use
30
31Browser use lets Codex operate the in-app browser directly. Use it for local
32development servers and file-backed previews when Codex needs to click, type,
33inspect rendered state, take screenshots, or verify a fix in the page.
34
35To use it, install and enable the Browser plugin. Then ask Codex to use the
36browser in your task, or reference it directly with `@Browser`. The app keeps
37browser use inside the in-app browser and lets you manage allowed and blocked
38websites from settings.
39
40Example:
41
42```text
43Use the browser to open http://localhost:3000/settings, reproduce the layout
44bug, and fix only the overflowing controls.
45```
46
47Codex asks before using a website unless you've allowed it. Removing a site from
48the allowed list means Codex asks again before using it; removing a site from the
49blocked list means Codex can ask again instead of treating it as blocked.
50
51## Preview a page
52
531. Start your app's development server in the [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal) or with a [local environment action](https://developers.openai.com/codex/app/local-environments#actions).
542. Open an unauthenticated local route, file-backed page, or public page by
55 clicking a URL or navigating manually in the browser.
563. Review the rendered state alongside the code diff.
574. Leave browser comments on the elements or areas that need changes.
585. Ask Codex to address the comments and keep the scope narrow.
59
60Example feedback:
61
62```text
63I left comments on the pricing page in the in-app browser. Address the mobile
64layout issues and keep the card structure unchanged.
65```
66
67## Comment on the page
68
69When a bug is visible only in the rendered page, use browser comments to give
70Codex precise feedback on the page.
71
72- Turn on comment mode, select an element or area, and submit a comment.
73- In comment mode, hold <kbd>Shift</kbd> and click to select an area.
74- Hold <kbd>Cmd</kbd> while clicking to send a comment immediately.
75
76After you leave comments, send a message in the thread asking Codex to address
77them. Comments are most useful when Codex needs to make a precise visual change.
78
79Good feedback is specific:
80
81```text
82This button overflows on mobile. Keep the label on one line if it fits,
83otherwise wrap it without changing the card height.
84```
85
86```text
87This tooltip covers the data point under the cursor. Reposition the tooltip so
88it stays inside the chart bounds.
89```
90
91## Keep browser tasks scoped
92
93The in-app browser is for review and iteration. Keep each browser task small
94enough to review in one pass.
95
96- Name the page, route, or local URL.
97- Name the visual state you care about, such as loading, empty, error, or
98 success.
99- Leave comments on the exact elements or areas that need changes.
100- Review the updated route after Codex changes the code.
101- Ask Codex to start or check the dev server before it uses the browser.
102
103For repository changes, use the [review pane](https://developers.openai.com/codex/app/review) to inspect the
104changes and leave comments.