Repository navigation
Claude Auto: the Claude window's session key reads only claude.ai, a signed-in Claude Code does not win (VibeTV-shop/vibetv#273) - #17
Conversation
…esszer#273) VibeTV hands the sign-in of its own Claude window to the engine as CLAUDE_AI_SESSION_KEY. Auto answered from a signed-in Claude Code first, so a second account won on Windows. With the key set, Auto now reads claude.ai with it and returns that error, with no OAuth, CLI or browser fallback. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
marcus7989
left a comment
There was a problem hiding this comment.
W182 review: ohne Befund (no P1/P2 findings) on 0c5def4d9bd8b33595e0e1059f7dab46909dfda2, against #16 (f327cfcb).
With a non-empty CLAUDE_AI_SESSION_KEY or CLAUDE_WEB_SESSION_KEY, Auto directly returns the web result/error before OAuth, CLI, browser-cookie or cached-CLI fallback. Web resolution also returns directly from the environment-key branch. The existing explicit Admin API priority is preserved, as documented in this PR; without a resolved environment key the existing Auto sequence is unchanged. Companion /usage supplies no manual-cookie override.
An additional isolated probe exercised both key variants with a forced local connection failure and a populated CLI cache: the web error wins, no OAuth/CLI attempt is logged, and neither fake key appears in error text or captured TRACE logs. Empty/whitespace-only key values remain unresolved. Source review confirms the key is used in the Cookie header, not interpolated into logging; HTTP errors expose status rather than response body or cookie.
Local cargo test -p codexbar --jobs 2: 1992 passed, 4 known macOS Windows-path failures, 1 ignored. Re-running with exactly those four tests excluded passes: 1992 library tests + 1 binary test, no failures. Formatting and diff whitespace checks pass. Native two-account/expired-session Companion validation is still required on Windows.
Recommendation: bundle #17 with #16 in v0.60.3-vibetv.15, provided that tag is still unused when approved. One tested engine/Companion pair and one pin avoids an interim release retaining the wrong-account behavior. This comment does not authorize merge, tag or device use.
|
Joint Windows probe of #15–#17: PASS (details below; same text on all three PRs). Build: local merge branch
Ready for your merge, then tag |
|
W211 · Beelink Windows validation, 2026-10-29 · STOP (environment blocker) The exact native Rust 1.98.0 baseline/probe comparison could not start: HOMESTATION-WIN has no cargo/rustc/rustup on PATH, no user .cargo/.rustup directory, and no matching Rust/MSVC/Git executables in the checked tools/program directories. No compiler/toolchain was installed during this slot. This is an unfulfilled test environment, not an observed product regression; no cargo test exit codes exist and the known restart-test result remains unresolved. Task results: (1) baseline 7614e4d vs probe 8b8134d BLOCKED before execution; (2) isolated #15 / .14 build and VibeTV smoke NOT RUN; (3) automatic Windows Usage/Refresh NOT RUN after the explicit stop condition; (4) NO MERGES, NO TAGS, no release workflow triggered. Final baseline check passed: app 9999.0.2266, runtime a9e985be9d1500de8455edc26d62c9a66b52bd4f, VibeTV 5804558, Clippy, brightness 20, automatic codex/claude/cursor. All app files and 13/13 configs match the pre-slot backup byte-for-byte; Firefox process IDs and existing Codex CLI auth-file hash are unchanged. No login, reboot or OS switch performed. Current PR heads remain #15 53941bc, #16 cacb7c8, #17 0c5def4. Local evidence: .local/reports/wincb16/BEELINK-W211.md; w211/tools-result.json and w211/final-result.json. The next native run needs a prepared Rust 1.98.0/MSVC build environment, or a separately approved cross-build/native-execution plan; it must not be reported as already tested. |
Ziel
Windows-Kunden mit zwei Claude-Konten sehen dieselben Werte wie auf dem Mac: das im VibeTV-Claude-Fenster angemeldete Konto gewinnt vor einem angemeldeten Claude Code (VibeTV-shop/vibetv#273, Folge von nesszer#244).
Ursache
fetch_via_auto(Claude) fragt Admin-API → Claude-Code-OAuth → (Web nur ohne Claude-Code-Login) → CLI → Web.serveläuft immer mitSourceMode::Auto, der Companion kann die Quelle nicht wählen. Die Anmeldung aus dem VibeTV-Fenster kommt alsCLAUDE_AI_SESSION_KEYin die Umgebung des Engine-Laufs (Companion,withWindowsClaudeSession); Auto antwortete trotzdem zuerst aus Claude Code.Änderung (8 Zeilen + 1 Test)
fetch_via_auto: istCLAUDE_AI_SESSION_KEY(bzw.CLAUDE_WEB_SESSION_KEY) gesetzt, wird nurfetch_via_webgelesen und dessen Ergebnis oder Fehler zurückgegeben. Kein OAuth-, CLI- oder Browser-Rückfall. Eine abgelaufene Fenster-Anmeldung bleibt „Authentication required" (der Companion zeigt das schon als Anmeldung) statt still das Konto von Claude Code zu zeigen.auto_with_a_window_session_returns_only_the_web_error(web_api.rs): vor dem Fix rot (Auto lieferte das Ergebnis der Claude-CLI dieses Rechners), danach grün.Gestapelt
Basis ist
claude/289-c(#16), das aufclaude/missing-data-no-zero(#15) aufbaut. Bitte erst #15 und #16 mergen; GitHub zieht die Basis dann nach.Tests
cargo test: 1971 grün, 4 rot — dieselben vier Windows-Pfad-Tests (pi_family×2,codex_sessions::normalizes_codex_root_to_sessions_dir,core::hooks::tests::config_matching_respects_enabled_flag), die auf macOS auch ohne diese Änderung rot sind. Alle 156 Tests unterproviders::claudegrün. Geprüft auf macOS; Windows-Lauf folgt mit dem Release über die VibeTV-Rehearsals.Bitte an Marcus
Mergen und Tag schneiden: nächste Nummer nach
.15(v0.60.3-vibetv.16), oder zusammen mit.15— das entscheidest du. Danach bumpt VibeTV den Pin (scripts/fetch-win-codexbar.ps1).🤖 Generated with Claude Code