Desktop composer appends trailing instructions to a URL and drops the prompt

Open 💬 0 comments Opened Jul 29, 2026 by dongjun545-lab

What version of the Codex App are you using?

Codex desktop app on macOS:

CFBundleShortVersionString: 26.721.81911
CFBundleVersion: 5973
Codex Framework: 150.0.7871.128

What platform is your computer?

macOS, Apple Silicon, app language zh-CN.

What issue are you seeing?

When a message starts with a long share URL and the user appends a natural-language instruction after the URL, Codex Desktop sometimes treats the entire composer contents as a browser URL. It opens the browser sidebar, percent-encodes the trailing instruction into the URL, and does not submit/preserve that instruction as the Codex prompt.

This is a client-side URL-boundary/parsing issue, not a model-comprehension issue.

What steps can reproduce the bug?

  1. Start a new local Codex task in the desktop app.
  2. Paste a long share URL containing query parameters, for example:

``text
https://example.com/item/123?source=share&origin=menu
``

  1. Append a Chinese natural-language instruction after the URL, for example:

``text
验证链接内容是否可靠,如果可靠则帮我整理三个方案
``

The failure was observed when the text followed the URL directly; the client should not silently discard it even if the boundary is ambiguous.

  1. Submit the message.

Actual behavior

The app creates an in-app browser sidebar and uses a value shaped like this as initialUrl:

https://example.com/item/123?source=share&origin=menu验证链接内容是否可靠,如果可靠则帮我整理三个方案

A redacted desktop log showed:

IAB_LIFECYCLE renderer created browser sidebar webview
conversationId=client-new-thread:<redacted>
initialUrl=https://<redacted>?...&origin=menu验证链接的可靠性,如果觉得可靠且有必要帮我做三个

The browser then navigates to the same value with the Chinese instruction percent-encoded into the URL. The instruction disappears from the Codex conversation instead of being processed as the user's request. In the UI, the resulting item is titled only with the site domain (for example, www.xiaohongshu.com), confirming that a browser item was created instead of a normal Codex turn.

Expected behavior

Codex should preserve and submit all user-authored text. Opening or attaching a URL must never consume or discard trailing instructions.

A robust fix could follow these invariants:

  • Do not treat the entire composer value as a navigation URL merely because it begins with http:// or https://.
  • Parse the URL from the editor's detected link range, not from the full raw composer string.
  • Preserve any text outside the detected link range as the task prompt.
  • If the URL/text boundary is ambiguous, prefer submitting the full input to Codex (with the link as context) instead of navigating and dropping the instruction.
  • Add regression tests for long query-string share links followed by Chinese text, ASCII text, punctuation, whitespace, and newlines.

Additional information

The relevant app log location is:

~/Library/Logs/com.openai.codex/YYYY/MM/DD

The original URL contained private share parameters, so it is intentionally redacted here. A private feedback/session upload can be provided to OpenAI staff if needed.

View original on GitHub ↗