What version of the Codex App are you using (From “About Codex” dialog)?
26.721.41059
What subscription do you have?
ChatGPT Free
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
The in-app browser's iPhone preset changes viewport metrics, but the HTTP request still uses a desktop User-Agent. This creates a hybrid state on SSR applications that choose mobile/desktop output from the request User-Agent: responsive CSS sees a phone-sized viewport while the server renders the desktop variant.
Observed with the attached minimal reproduction:
| Browser state |
Viewport |
DPR |
CSS max-width: 480px |
HTTP User-Agent / SSR |
| Codex in-app browser, normal mode |
495 × 808 |
2 |
false |
desktop / Desktop |
| Codex in-app browser, iPhone preset |
393 × 852 |
2 |
true |
desktop / Desktop |
| Chrome, iPhone 14 Pro Max preset |
430 × 932 |
3 |
true |
mobile / Mobile |
The mismatch is visible only in the in-app browser's mobile preset.
Screenshots
Codex in-app browser — normal mode
Codex in-app browser — iPhone preset
Chrome — iPhone 14 Pro Max preset
What steps can reproduce the bug?
- Run a minimal HTTP server that classifies each request from its User-Agent and returns that server-side result, while client-side JavaScript reports the viewport:
const http = require("http");
http.createServer((req, res) => {
const ua = req.headers["user-agent"] || "";
const serverMode = /Mobile|iPhone|Android/i.test(ua) ? "Mobile" : "Desktop";
res.setHeader("content-type", "text/html; charset=utf-8");
res.end(`<!doctype html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<h1>SSR: ${serverMode}</h1>
<pre>User-Agent: ${ua}</pre>
<script>
document.write("<p>Viewport: " + innerWidth + " × " + innerHeight + "</p>");
document.write("<p>Mobile media query: " +
matchMedia("(max-width: 480px)").matches + "</p>");
<\/script>`);
}).listen(8091);
- Open the page in the Codex in-app browser in normal mode.
- Open the device toolbar and select an iPhone preset.
- Reload the page so the SSR request is made in the selected mode.
- Compare the result with Chrome DevTools using an iPhone preset.
Actual result: the in-app browser changes the viewport but continues sending a macOS desktop Chrome User-Agent. Chrome changes both signals.
What is the expected behavior?
Selecting an iPhone/mobile preset should emulate a mobile device consistently: the viewport, device pixel ratio, and HTTP User-Agent should all switch to the selected mobile profile. Reloaded SSR requests should therefore receive a mobile User-Agent and render the mobile variant.
Additional information
Related closed issues:
This report is narrower than the earlier requests: the mobile preset is now visible and changes viewport dimensions, but it does not change the HTTP User-Agent used for navigation/reload requests.
What version of the Codex App are you using (From “About Codex” dialog)?
26.721.41059
What subscription do you have?
ChatGPT Free
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
The in-app browser's iPhone preset changes viewport metrics, but the HTTP request still uses a desktop User-Agent. This creates a hybrid state on SSR applications that choose mobile/desktop output from the request User-Agent: responsive CSS sees a phone-sized viewport while the server renders the desktop variant.
Observed with the attached minimal reproduction:
max-width: 480pxThe mismatch is visible only in the in-app browser's mobile preset.
Screenshots
Codex in-app browser — normal mode
Codex in-app browser — iPhone preset
Chrome — iPhone 14 Pro Max preset
What steps can reproduce the bug?
Actual result: the in-app browser changes the viewport but continues sending a macOS desktop Chrome User-Agent. Chrome changes both signals.
What is the expected behavior?
Selecting an iPhone/mobile preset should emulate a mobile device consistently: the viewport, device pixel ratio, and HTTP User-Agent should all switch to the selected mobile profile. Reloaded SSR requests should therefore receive a mobile User-Agent and render the mobile variant.
Additional information
Related closed issues:
This report is narrower than the earlier requests: the mobile preset is now visible and changes viewport dimensions, but it does not change the HTTP User-Agent used for navigation/reload requests.