Repository navigation
fix(agents): skip auth gate for CLI-owned transport - #88551
Conversation
|
This looks like the right direction for CLI-owned transports. One small follow-up I would love to see called out in coverage: the early return now preserves only |
|
Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 9:34 PM ET / 01:34 UTC. Summary PR surface: Source +6, Tests +144. Total +150 across 4 files. Reproducibility: yes. source-reproducible: current main still returns skipsProviderAuthCooldown: false for CLI-owned candidates before the cooldown gate, and the PR tests exercise stale auth state on the affected paths. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused bypass after maintainers accept the CLI-owned auth boundary, while keeping OpenClaw provider cooldown gating for non-CLI and OpenClaw-managed runtimes. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main still returns skipsProviderAuthCooldown: false for CLI-owned candidates before the cooldown gate, and the PR tests exercise stale auth state on the affected paths. Is this the best way to solve the issue? Yes, this is the narrow best fix subject to maintainer acceptance: it reuses existing CLI runtime detection and preserves OpenClaw cooldown gating for non-CLI/OpenClaw-managed runtimes instead of adding a broader new API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 01e562113b31. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +6, Tests +144. Total +150 across 4 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
7319c65 to
78ddcb5
Compare
|
Updated this PR to address the fallback-boundary review finding. What changed:
The new head is @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Follow-up after the Real behavior proof body update: the current head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
78ddcb5 to
be65747
Compare
|
Clownfish 🐠 reef update Thanks for the contribution here. Clownfish gave the branch a tidy little reef repair and kept this PR as the main lane. Source PR: #88551 fish notes: model gpt-5.5, reasoning medium; reviewed against d849849451e2. |
cae3f55 to
d849849
Compare
d849849 to
05ede48
Compare
86a2377 to
07cc2d0
Compare
|
Clownfish 🐠 reef update Thanks for the work here. Clownfish patched this branch directly so the contributor trail stays right where it started. Source PR: #88551 fish notes: model gpt-5.5, reasoning medium; reviewed against 07cc2d0. |
* fix(agents): skip fallback auth gate for CLI runtimes * fix(agents): skip auth gate for CLI-owned transport * fix(agents): skip auth gate for CLI-owned transport --------- Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Summary
anthropic/*withagentRuntime.id: "claude-cli".authProfileProviderwhen auth-profile forwarding is disabled.What changed after review
main.skipsProviderAuthCooldown: truebefore the fallback loop evaluates stale OpenClaw provider auth state.runWithModelFallbackwithanthropic/*,claude-cli, and stale provider auth state.runAgentAttemptcoverage showingauthProfileIdstays unset while the CLI-owned route still runs.Real behavior proof
Behavior or issue addressed: A configured CLI-owned runtime such as
anthropic/claude-sonnet-4-6withagentRuntime.id: "claude-cli"should be allowed to run even when OpenClaw has stale provider auth cooldown state foranthropic:default. The downstream CLI attempt must also avoid auto-fillingauthProfileIdwhen auth-profile forwarding is disabled.Real environment tested: Live PR branch checkout at
78ddcb5bdc61030285dc9baed100e74c184aa949, local path/private/tmp/openclaw-88551-clone, macOS shell, Nodev22.22.2, corepack pnpm11.2.2.Exact steps or command run after this patch: I ran the copied live terminal commands below on the PR branch checkout after this patch:
Evidence after fix: Copied terminal transcript / live output from the PR branch checkout:
Observed result after fix: The model fallback path reaches the configured
claude-cliruntime even with stale Anthropic provider auth cooldown state, and the CLI-owned attempt path still runs withauthProfileIdunset when auth-profile forwarding is disabled.What was not tested: No additional gaps for the reviewed fallback/auth-profile behavior. I did not run a real Claude CLI network turn against Anthropic; the after-fix proof covers the OpenClaw fallback and CLI attempt routing behavior changed in this PR.
Verification
node scripts/run-vitest.mjs run src/agents/model-fallback.test.ts -t 'lets configured CLI runtimes bypass stale provider auth cooldowns' --reporter verbosenode scripts/run-vitest.mjs run src/agents/command/attempt-execution.cli.test.ts -t 'skips auto auth-profile resolution for CLI-owned transport' --reporter verbose./node_modules/.bin/oxfmt --check --threads=1 src/agents/model-fallback.ts src/agents/model-fallback.test.ts src/agents/command/attempt-execution.ts src/agents/command/attempt-execution.cli.test.ts src/agents/fallback-skip-cache.ts packages/terminal-core/src/ansi.ts