fix(auth): harden codex auth probes#75272
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR should close because its central Codex auth-probe fix is superseded by a narrower merged implementation on current main, while this branch remains dirty and carries broader auth/session changes without upstream real behavior proof. Canonical path: Keep the merged current-main implementation from #87559 as the canonical fix, and open a fresh narrow follow-up only if maintainers want a separately approved change to Codex custom stream ownership. So I’m closing this here and keeping the remaining discussion on #87559. Review detailsBest possible solution: Keep the merged current-main implementation from #87559 as the canonical fix, and open a fresh narrow follow-up only if maintainers want a separately approved change to Codex custom stream ownership. Do we have a high-confidence way to reproduce the issue? No, not as a current-main failure: current main already contains the merged auth-probe fix. The original bug is source-reproducible from the PR and replacement evidence, but I did not run a live OAuth probe in this read-only review. Is this the best way to solve the issue? No. The merged replacement is the better solution because it fixes the selected-profile raw probe and native instructions fallback without this branch's broader custom stream override and session auth hook mutation. Security review: Security review needs attention: The branch changes token handling and introduces a concrete stale-credential/session-auth risk that the merged replacement avoids.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b352cb2d8e7f; fix evidence: commit 37c5003ed966, main fix timestamp 2026-05-29T01:58:48+01:00. |
9c0e0c5 to
25dc2a3
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
models status --probecan report false auth/format failures for OpenAI Codex OAuth profiles even when the selected profile is valid.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/commands/models/list.probe.test.ts,src/agents/pi-embedded-runner/stream-resolution.test.ts,src/agents/openai-transport-stream.test.tsUser-visible / Behavior Changes
openclaw models status --probe --probe-provider openai-codex --probe-profile <profile>should be less likely to return false auth/format failures for valid OpenAI Codex OAuth profiles.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) YesYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: resolved credentials are forwarded only to the matching run provider via the existing API-key seam; no credential material is logged or exposed in tests.Repro + Verification
Environment
openai-codex/gpt-5.5Steps
openclaw models status --agent graphiti-agent --probe --probe-provider openai-codex --probe-profile openai-codex:soylei --probe-timeout 90000 --probe-max-tokens 16 --json.Expected
status: ok.Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
main; the same fix was live-verified on the downstream runtime before extracting this minimal upstream patch.Commands run:
pnpm docs:listpnpm installpnpm exec oxfmt --check --threads=1 src/agents/openai-transport-stream.ts src/agents/openai-transport-stream.test.ts src/agents/pi-embedded-runner/run/attempt.ts src/agents/pi-embedded-runner/stream-resolution.ts src/agents/pi-embedded-runner/stream-resolution.test.ts src/commands/models/list.probe.ts src/commands/models/list.probe.test.tspnpm test src/agents/openai-transport-stream.test.ts src/agents/pi-embedded-runner/stream-resolution.test.ts src/commands/models/list.probe.test.tspnpm check:changed --stagedReview Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
openai-codex-responses, which needs provider-specific credential/payload handling; non-Codex custom session streams keep existing behavior.