Repository navigation
fix(sleep): refuse uncontrolled Claude OAuth replays - #336
Daniel Peng (original4422) wants to merge 2 commits into
Conversation
|
Hi Yifan Yang (@Yif-Yang), could you review this when convenient? This refuses Claude OAuth replays that cannot be isolated and keeps API-key replays in |
|
Thanks for picking this up, and for keeping API-key replays in Before we make OAuth a hard refusal, there is one option that may keep subscription users working. Current Claude Code has a
Could you rework the change along these lines?
Please also add a test that the OAuth path passes |
|
Implemented in
I checked the real installed Claude Code 2.1.283 using an entirely synthetic HOME/config and a loopback HTTP provider fixture. The normal-mode positive control sent the user-level Current full validation: 2,000 passed, 24 skipped, 4 xfailed; 381 subtests passed, plus strict MkDocs and diff checks. Eight Ruff findings match the original head's source exactly; no new lint violation. The PR body records the warnings and validation limits. Developed and tested with Codex. |
Summary
Claude replay now selects an isolated mode without excluding supported subscription/OAuth setups:
Both plain and tool-aware replay stay fail-closed. Per-night
claude_isolation_modesdiagnostics and report notes record the selected mode, including split optimizer/target roles. Admin-managed policy settings still apply in safe mode. No dependency or credential-discovery change.Closes #335
Evidence
CLAUDE.mdmarker and ran itsUserPromptSubmithook;--safe-modeand--bareexcluded both. All three calls received fixture responses and exited successfully. The modified SkillOpt backend also completed an actual no-API-key safe-mode call against the fixture using synthetic bearer authentication.python -m mkdocs build --strictandgit diff --checkpass. Ruff reports eight violations already present in the original head, independently matched by source line/code/message; no new violation. Docs retain two existing unnavlisted-page notices and the Material lifecycle warning.Merge Danger
Door: two-way. Blast Radius: replay-authentication.
OAuth requires a CLI advertising
--safe-mode. Missing, unsuccessful or timed-out help probes never permit an unisolated replay; the capability result is cached per backend instance.AI disclosure: developed and validated with OpenAI Codex as the contributor's authorized proxy.