fix(openai): clarify remote Codex OAuth prompt#81301
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Current-main source shows the old fallback-first remote note while the remote OAuth handler and locked dependency allow either manual paste or browser callback completion, so the confusing copy is reproducible from source without a live OpenAI login. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the wording-only fix after normal CI and mergeability checks, while leaving prompt dismissal/cancellation semantics to #81405. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows the old fallback-first remote note while the remote OAuth handler and locked dependency allow either manual paste or browser callback completion, so the confusing copy is reproducible from source without a live OpenAI login. Is this the best way to solve the issue? Yes. The PR is the narrowest maintainable fix because it changes only displayed copy in both implementations and adds a focused regression assertion; the larger prompt lifecycle contract remains separately tracked. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 2a67a7f65e26. |
5064b5e to
f184012
Compare
f184012 to
1f9db1c
Compare
e5d7328 to
c7285ed
Compare
c7285ed to
7692bd9
Compare
7692bd9 to
a1fb296
Compare
a1fb296 to
cd92c4d
Compare
|
Landed via temp rebase onto
Thanks @rubencu! |
Summary
manualInputPromptMessage, OAuth timing, callback handling, prompt cancellation, token exchange behavior, provider contracts, and config surface are unchanged.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
c7285edebb5611c461dd3895fd114ece7cada5a2, Nodev22.22.2. The proof command inspected the production core provider and bundled OpenAI plugin runtime strings that ship this user-visible copy.node <<'NODE' ... verify production OpenAI Codex OAuth prompt strings, unchanged manual prompt, and old remote fallback-first wording absence ... NODEorigin/maintext.After signing in, paste the redirect URL back here.insrc/plugins/provider-openai-codex-oauth.tsandextensions/openai/openai-codex-oauth.runtime.ts.Root Cause (if applicable)
Regression Test Plan (if applicable)
src/plugins/provider-openai-codex-oauth.test.tsUser-visible / Behavior Changes
Remote OpenAI Codex OAuth wording now tells users to open the URL in their LOCAL browser, sign in, and paste the redirect URL. It also warns that sign-in may finish automatically before paste if the browser callback can reach OpenClaw. The manual paste prompt text itself is unchanged.
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
v22.22.2, pnpm repo wrapperSteps
origin/main.Expected
Actual
Evidence
Attach at least one:
Verification
pnpm exec oxfmt --write --threads=1 src/plugins/provider-openai-codex-oauth.ts src/plugins/provider-openai-codex-oauth.test.ts extensions/openai/openai-codex-oauth.runtime.tspnpm test src/plugins/provider-openai-codex-oauth.test.ts -- --reporter=verbose(17 tests passed)git diff --check origin/main...HEADcodex review --base origin/main(clean on the current head)Human Verification (required)
What you personally verified (not just CI), and how:
manualInputPromptMessageremains identical toorigin/main; no OAuth lifecycle code changed.Review Conversations
The existing top-level ClawSweeper comment refers to the previous callback-cancellation implementation. This branch has since been rewritten to the narrower wording-only patch and should receive fresh automation/maintainer review on the new head.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations