In-app browser screenshot capture times out when Codex app is minimized
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.61825
What subscription do you have?
Plus
What platform is your computer?
MacOS 26.5.1
What issue are you seeing?
In-app browser screenshot capture fails when Codex app is minimized, while page control/inspection still works
Summary
When using the Codex in-app browser from an automation, the browser can successfully open and inspect a webpage while the Codex desktop app is minimized or hidden, but screenshot capture fails. This suggests that page loading/control and screenshot capture have different visibility requirements.
Environment
- App: Codex desktop app
- Browser surface: Codex in-app browser
- Automation type: recurring scheduled automation
- OS: macOS
- Target site tested: MarineTraffic
- Control site tested: https://example.com/
Expected behavior
The in-app browser screenshot API should be able to capture the current tab even when the Codex desktop app is minimized or hidden, as long as the page has loaded successfully.
Actual behavior
When Codex is minimized/hidden, the automation can still:
- Open or reuse an in-app browser tab
- Navigate to pages
- Confirm the final URL and page title
- Inspect DOM/page state
- Verify that the target site rendered meaningful content
However, screenshot capture fails with a timeout. In my case, the failure was:
Timed out running CDP command "Page.captureScreenshot" for tab 1
This happened even on https://example.com/, so it does not appear to be specific to the target website.
Reproduction steps
- Create or run a Codex automation that uses only the Codex in-app browser.
- In the automation, open
https://example.com/. - Verify the page loaded by checking URL/title/DOM.
- Attempt to capture a screenshot from the in-app browser tab.
- Run once with the Codex app visible.
- Run again with the Codex app minimized or hidden.
Observed result
- With Codex visible/active, screenshot capture can work.
- With Codex minimized/hidden, page navigation and inspection still work, but screenshot capture times out.
Why this matters
Scheduled automations often run while the app is backgrounded or minimized. If screenshot capture requires the Codex app to remain visibly open, browser screenshot automations become unreliable unless the user keeps the app open in the foreground. If the in-app browser can load the page in both states it should also be able to screenshot in both states.
Requested fix
Please make in-app browser screenshot capture work independently of whether the Codex desktop app window is visible/minimized, or document the visibility requirement clearly and expose a way for automations to make the capture surface available before calling screenshot APIs.
Possible implementation clue
This looks like the rendered page state remains available to the automation, but the bitmap capture path depends on the app/window/compositor visibility state. The issue appears isolated to screenshot capture rather than navigation, DOM inspection, or page rendering.
Specific example
The page is not blank or blocked. The automation can verify that the site has loaded and can read page state while Codex is minimized. Only the screenshot capture layer appears impaired.
For example, with MarineTraffic loaded, Codex could verify:
- Correct MarineTraffic URL
- Correct page title
- Leaflet map container present
- Map attribution present:
Leaflet | © Mapbox © OpenStreetMap - Scale bar present
- Zoom controls present
- No cookie/privacy overlay blocking the page
- No relevant console warnings/errors
Despite that, Page.captureScreenshot timed out.
What steps can reproduce the bug?
Reproduction steps
- Create or run a Codex automation that uses only the Codex in-app browser.
- In the automation, open
https://example.com/. - Verify the page loaded by checking URL/title/DOM.
- Attempt to capture a screenshot from the in-app browser tab.
- Run once with the Codex app visible.
- Run again with the Codex app minimized or hidden.
Observed result
- With Codex visible/active, screenshot capture can work.
- With Codex minimized/hidden, page navigation and inspection still work, but screenshot capture times out.
What is the expected behavior?
Expected behavior
The in-app browser screenshot API should be able to capture the current tab even when the Codex desktop app is minimized or hidden, as long as the page has loaded successfully.
Additional information
_No response_