Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesPreserve paragraph breaks and the question’s own browser URL in harness question text while retaining escaping elsewhere. Example: Codex sends a text-only browser step containing https://chatgpt.com/apps/google-drive/connector_5f3c8c41.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a current browser-step formatting bug with a focused shared-owner fix; no actionable defects were found, and exact-head CI remains pending. Priority: P0 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared harness formatter converts Codex and Copilot questions into authored fallback text and portable presentation blocks for Gateway channel delivery. flowchart TD
A[Codex elicitation] --> B[Structured input compiler]
B --> C[Shared question formatter]
D[Copilot question] --> C
C --> E[Authored fallback text]
C --> F[Portable presentation]
E --> G[Gateway channel delivery]
F --> G
Technical reviewBest possible solution: Land the focused shared-formatter repair once required checks pass, restoring an intact inline browser link and readable completion instructions. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically corrupts underscores and newlines on this path, and supplied built-Gateway base/head traces demonstrate the reported failure and repair. Is this the best way to solve the issue? This is a small, complete repair of the formatting invariant in its existing shared owner, with one reused helper and two distinct regression cases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e04d625a4825. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +20, Tests +30. Total +50 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 24, 2026, 5:45 PM ET / 22:45 UTC (Revision 2). |
Escape question text per line; leave the line that is exactly the question's own url literal unless it carries markup or mention characters. Fold the tests into one regression through the Codex bridge.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Runtime proof on the built Gateway ( Reporter case, text-only channel, merge base Same case, this head Per run ( Controls, byte-compared with the merge base:
|
|
Merged in 25efa33. Thanks @shu-chen-dot-ca for the fix and @DougButdorf for the clear report in #204846. When Codex asks you to finish a step in your browser, channels without buttons now receive the exact link on its own line, with the instructions as separate paragraphs, so the link opens instead of returning "Invalid URL". Other question text is escaped as before, and channels with buttons keep the same buttons. |
…law#204900) Root cause: `src/agents/harness/user-input-bridge.ts:61` (and `:125` for the presentation block) ran the runtime's single-line display escaper over the whole question text, which for a Codex browser step is also the only copy of the sign-in link on channels without buttons, so `_` became `_` (U+FF3F), each line break became `?` and the link returned `Invalid URL`. Fixes openclaw#204846 Thanks @DougButdorf for the precise report (exact delivered text, the `question.list` record and the root cause), and @shu-chen-dot-ca for the fix this PR builds on. ## What Problem This Solves When Codex asks you to finish a step in your browser (for example reconnecting a ChatGPT connector), channels that show the question as plain text received a link that no longer worked: the `_` in the address was replaced by a fullwidth look-alike, and the line breaks around it arrived as `??`. Opening the link returned `Invalid URL`, so the step could not be completed and the turn stayed blocked on the question. ## What changed The question text is now escaped line by line, so paragraphs stay paragraphs. The line that is exactly the question's own `url` (the line OpenClaw itself writes for a browser step) is left as it is, unless the link contains whitespace or one of `` < > @ ` [ ] ( ) * ~ | ``. Those are the characters the escaper exists to neutralize (mentions, HTML, code, markdown links and emphasis), minus `_` and `&`, which ordinary sign-in links use. A link that contains any of them is escaped exactly as before. Every other line, including the server's message and any copy of the link inside it, is escaped exactly as before. Headers, option labels and descriptions are untouched. Channels with buttons show the same readable question text above unchanged buttons. Copilot questions keep their line breaks instead of `?`. With no formatter the text is passed through byte for byte, as before. The issue's second point (a reply that matches no option keeps bouncing) is not changed here; it alters pending-question behavior and is a separate decision. Maintainer follow-up on top of the contributor commit: narrowed the literal exemption from "every occurrence of the link inside any line" to "the line that is exactly the link", dropped the whitespace-preserving split that only that wider rule needed, and folded the 8 added test cases into one two-row regression through the real Codex bridge (red on the merge base). ## Evidence Built Gateway runs ([proof comment](openclaw#204900 (comment))): the Codex runtime runs against a stand-in app-server that raises the reporter's exact browser step, delivered to a text-only channel (qa-channel, authored fallback text) and to Telegram with inline buttons (stub Bot API). Two runs each on the merge base `adb8e2b56f` and this head `8d86412a4e`. - Merge base, both runs: `…request.??https://chatgpt.com/apps/google-drive/connector_5f3c…??Open the link…`, which is the reporter's text exactly. - This head, both runs: blank-line-separated paragraphs, with the link on its own line and byte-equal to the `url` in `question.list`. Codex receives `accept` after the answer. - Controls: markup in the server's message stays escaped, byte-identical to the base. A link containing `@` or `*` stays escaped, byte-identical to the base. On Telegram, `reply_markup` is identical (`Open link` is the raw `url` on both); only the question text above it becomes readable, and it now links the full URL instead of a truncated `…/connector`. - `extensions/codex/src/app-server/user-input-bridge.elicitation.test.ts`: one two-row regression through the real Codex bridge. Both rows fail against the base bridge and pass here. - Checks on this head: oxfmt and oxlint; the Codex and Copilot input-bridge tests, `run-attempt`, `attempt-active-run`, `question-channel-runtime.generation`, `agent-harness-runtime` and `gateway-question` (7 shards passed); `pnpm check:changed`. Line deltas against the merge base: production +22/−2 in one file, tests +30 in one file. Against the contributor's head: production −11 lines, tests −48 lines (8 cases folded into 2 rows; the harness-level case is removed because the Codex-bridge regression covers the same behavior end to end). ## Merge danger Two-way door: display-only change in one function; no stored state, config or protocol. A revert fully restores the old text. Blast radius: question prompts from agent harnesses that pass a display formatter (Codex, Copilot), on text-only and button channels. Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Root cause:
src/agents/harness/user-input-bridge.ts:61(and:125for the presentation block) ran the runtime's single-line display escaper over the whole question text, which for a Codex browser step is also the only copy of the sign-in link on channels without buttons, so_became_(U+FF3F), each line break became?and the link returnedInvalid URL.Fixes #204846
Thanks @DougButdorf for the precise report (exact delivered text, the
question.listrecord and the root cause), and @shu-chen-dot-ca for the fix this PR builds on.What Problem This Solves
When Codex asks you to finish a step in your browser (for example reconnecting a ChatGPT connector), channels that show the question as plain text received a link that no longer worked: the
_in the address was replaced by a fullwidth look-alike, and the line breaks around it arrived as??. Opening the link returnedInvalid URL, so the step could not be completed and the turn stayed blocked on the question.What changed
The question text is now escaped line by line, so paragraphs stay paragraphs. The line that is exactly the question's own
url(the line OpenClaw itself writes for a browser step) is left as it is, unless the link contains whitespace or one of< > @ ` [ ] ( ) * ~ |. Those are the characters the escaper exists to neutralize (mentions, HTML, code, markdown links and emphasis), minus_and&, which ordinary sign-in links use. A link that contains any of them is escaped exactly as before. Every other line, including the server's message and any copy of the link inside it, is escaped exactly as before. Headers, option labels and descriptions are untouched.Channels with buttons show the same readable question text above unchanged buttons. Copilot questions keep their line breaks instead of
?. With no formatter the text is passed through byte for byte, as before.The issue's second point (a reply that matches no option keeps bouncing) is not changed here; it alters pending-question behavior and is a separate decision.
Maintainer follow-up on top of the contributor commit: narrowed the literal exemption from "every occurrence of the link inside any line" to "the line that is exactly the link", dropped the whitespace-preserving split that only that wider rule needed, and folded the 8 added test cases into one two-row regression through the real Codex bridge (red on the merge base).
Evidence
Built Gateway runs (proof comment): the Codex runtime runs against a stand-in app-server that raises the reporter's exact browser step, delivered to a text-only channel (qa-channel, authored fallback text) and to Telegram with inline buttons (stub Bot API). Two runs each on the merge base
6400a15695and this head8d86412a4e.…request.??https://chatgpt.com/apps/google-drive/connector_5f3c…??Open the link…, which is the reporter's text exactly.urlinquestion.list. Codex receivesacceptafter the answer.@or*stays escaped, byte-identical to the base. On Telegram,reply_markupis identical (Open linkis the rawurlon both); only the question text above it becomes readable, and it now links the full URL instead of a truncated…/connector.extensions/codex/src/app-server/user-input-bridge.elicitation.test.ts: one two-row regression through the real Codex bridge. Both rows fail against the base bridge and pass here.run-attempt,attempt-active-run,question-channel-runtime.generation,agent-harness-runtimeandgateway-question(7 shards passed);pnpm check:changed.Line deltas against the merge base: production +22/−2 in one file, tests +30 in one file. Against the contributor's head: production −11 lines, tests −48 lines (8 cases folded into 2 rows; the harness-level case is removed because the Codex-bridge regression covers the same behavior end to end).
Merge danger
Two-way door: display-only change in one function; no stored state, config or protocol. A revert fully restores the old text. Blast radius: question prompts from agent harnesses that pass a display formatter (Codex, Copilot), on text-only and button channels.