Repository navigation
fix(acp): name the fix when pi is signed out or goose key is in keyring - #14411
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify pi-acp releases newer than 0.0.34 still emit the declared phrase — signature drift silently reverts to the raw-frame-plus-respawn behavior. [DESIGN-REVIEWED] 4512866 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify pi-acp's phrase never appears in a retryable error — a match now makes any pi failure terminal after one spawn, 401/403 included, by declared design. Not justified as shipped
What this change shipsInventory (3 items) — 2 justifiedIntent: a signed-out pi user and a keyring-only goose user each see the one step that makes chat work — a FIX.
Both items fill the pre-existing [FIRST-PRINCIPLES-REVIEWED] 4512866 |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsThe new goose signed-out message states a Linux-only measurement as a universal fact about the sandbox. FINDING — src/kiro_crew/agent_sdk/host_auth.py:587 — a macOS operator whose goose provider is unconfigured hits [OPUS-REVIEWED] 4512866 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
9000d25 to
8664de7
Compare
|
Maintainer sweep (2026-09-27, on behalf of @bolichen97): #14340 is now on main as bde52f5, and this branch (which carried #14340's commit f6c6152 as its base) is |
8664de7 to
dc5ada2
Compare
UX Review (Fable 5) — ⏭️ skippedRevision |
dc5ada2 to
068f353
Compare
… keyring pi-acp answers session/new with -32000 'Authentication required: Configure an API key or log in with an OAuth provider.' Crew retried once and then showed the raw JSON-RPC frame. Declare that phrase as pi's signed-out signature so the startup ladder fails fast with pi's own sign-in message. goose keeps provider keys in the OS keyring by default. Crew's sandboxed child cannot reach the session bus, so goose falls back to secrets.yaml, finds no key, and answers the first prompt with 'Authentication required'. Its signed-out message said to run 'goose configure', which only stores the key in the keyring again. Name the keyring case and the file-storage switch (GOOSE_DISABLE_KEYRING=true goose configure) instead. Builds on #14340's signed_out_signature mechanism.
068f353 to
4512866
Compare
Problem / Motivation
Goal: A pi user who is not signed in, and a goose user whose key sits in the system keyring, are told the one step that makes chat work inside Crew.
Two harnesses fail with advice that does not work:
session/newJSON-RPC error: {'code': -32000, 'message': 'Authentication required: Configure an API key or log in with an OAuth provider.', ...}session/promptgoose configure..."The goose user already ran
goose configure. Running it again stores the key in the keyring again, so the chat never works and nothing says why.Why it matters
Both are a first chat that fails on a normal setup. pi's frame names no fix. goose's message sends the user in a loop: the keyring is goose's recommended storage, and Crew's sandboxed child cannot reach it.
Not a goal
_format_acp_errorputs before goose's prompt-time message; that arm is shared with every harness.What changed (motivation → approach → change)
Symptom: pi showed a raw frame; goose showed a fix that cannot work. Root cause: pi's signed-out words were not declared in
host_auth, and goose's message did not know the sandbox hides the keyring.pi:
src/kiro_crew/agent_sdk/host_auth.pynow declares pi's phraseConfigure an API key or log in with an OAuth provideras itssigned_out_signature. Copied from a live pi-acp 0.0.34 run with an empty pi home. The startup ladder insrc/kiro_crew/acp/client.pythen fails fast with pi's ownsigned_out_message.goose: its
signed_out_messagenow names the keyring case and the fix:GOOSE_DISABLE_KEYRING=true goose configure, which saves the key tosecrets.yaml, the one store goose reads inside the sandbox. Measured: inside Crew's sandbox,busctl --useranswers "Permission denied". goose 1.52.0 with no reachable bus logs "Keyring unavailable. Using file storage for secrets." and answers the prompt withAuthentication required. With the key insecrets.yaml, the same run reaches its provider.No mask, bus or environment rule changes. The sandbox stays as strict as it is.
Backwards compatibility
Compatible: only pi's startup answer with its own declared phrase, and goose's signed-out text, change. Every other harness keeps today's messages and retry.
Tests
test/test_acp_pi_backend.py: pi's live signed-out frame raises a non-transientAcpErrorwith pi's message after ONE spawn, and not the Kiro sign-in type; kiro-cli meeting the same words still retries.test/test_acp_goose_backend.py: goose's liveAuthentication requiredprompt frame formats to a message namingGOOSE_DISABLE_KEYRING=true goose configure, the keyring andsecrets.yaml.host_auth.pychange reverted, the pi startup test and the goose keyring test fail.host_authplus the goose and pi backend files: 3255 passed.Manual verification
pi: drove pi-acp 0.0.34 over stdio with an empty
PI_CODING_AGENT_DIR;session/newreturned the frame above, withauthMethodsoffering terminal login.goose: drove
goose acp1.52.0 over stdio with a scratch config home and no session bus. WithGOOSE_PROVIDER: openaiand no key: session opens, prompt answers-32000 Authentication required. WithOPENAI_API_KEYinsecrets.yaml: prompt endsend_turn.Not run inside a real Crew sandbox: the Dev Fleet pod tool was not enabled on the test host, and a Crew sandbox cannot nest another.
Related Issues
N/A — found while reviewing why pi and goose basic chat fail inside Crew's sandbox.
Pattern harvest
Rule candidate: review-prompt
Pattern: a sign-in remedy that names a store the sandboxed child cannot reach
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)