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