Skip to content

keep browser login alive on non-callback requests - #167

Merged
raine merged 2 commits into
raine:mainfrom
yongtenglei:fix/codex-oauth-ignore-probe
Oct 25, 2026
Merged

raine merged 2 commits into
raine:mainfrom
yongtenglei:fix/codex-oauth-ignore-probe

Conversation

@yongtenglei

Copy link
Copy Markdown
Contributor

The thing

Codex browser login exits when any non-callback request hits the localhost listener.

Reproduce

claude-code-proxy codex auth login

# before completing OAuth:
curl http://127.0.0.1:1455/

# login exits immediatel:
Not found

Changes

src/providers/codex/auth/browser_login.rs

Validation

cargo fmt --all --check
cargo test --all
cargo clippy --all-targets -- -D warnings -A deprecated
just check-ci

cyberphantom52 added a commit to cyberphantom52/claude-code-proxy that referenced this pull request Oct 22, 2026
yongtenglei and others added 2 commits October 25, 2026 14:16
A silent local connection could hold the callback listener in its five-second
read timeout even when the configured login timeout was about to expire. Limit
each callback read to the lesser of the remaining login window and the normal
per-request cap.

Exercise malformed and unrelated requests before an OAuth error on the real
listener, and cover bounded silent connections. This preserves terminal state,
OAuth, and token-exchange failures while ensuring probes cannot extend login
timeout by the full socket read allowance.

Issue: raine#167
@raine
raine force-pushed the fix/codex-oauth-ignore-probe branch from 828985a to 9dce70a Compare October 25, 2026 12:40
@raine
raine merged commit 444290b into raine:main Oct 25, 2026
@raine

raine commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix. Included in v0.1.47. Codex login now keeps waiting after unrelated or malformed requests reach the callback listener, instead of exiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants