Skip to content

Refresh shared Goose credentials after provider saves - #1571

Open
pepmach wants to merge 1 commit into
block:mainfrom
pepmach:fix/goose-provider-credentials
Open

pepmach wants to merge 1 commit into
block:mainfrom
pepmach:fix/goose-provider-credentials

Conversation

@pepmach

@pepmach pepmach commented Oct 22, 2026 •

Copy link
Copy Markdown

Settings saves provider keys through a short-lived goose-acp, while the persistent agent worker caches secrets per process. That worker could keep failing with "Configuration value not found" after a successful save and connection test.

After saving provider fields, await Goose's existing providers/inventory/refresh request in the shared worker, if one exists. Goose clears its secret cache and increments its configuration generation; its shared API-key providers are cached against that generation, so the next call rebuilds the provider with the new credentials. Existing sessions continue.

Refresh is best effort: a refresh failure does not fail the persisted credential save. The existing request timeout stops an unresponsive worker; other refresh errors are suppressed.

Fixes #1569.

Validation

  • Goose suite: 185 passed, 8 opt-in live tests skipped.
  • Required pre-push checks: 192 related tests passed, 8 opt-in live tests skipped; TypeScript, design types and static guards passed.
  • Required pre-commit checks passed on all seven changed files, with no formatting changes.
  • Against bundled Goose 1.56.0, an isolated loopback provider received synthetic key labels old → old → new: initial prompt, prompt after a separate credential save, then prompt after inventory refresh. All three prompts used the same worker and ACP session. No real API key or user Keychain was used.

Draft acceptance

Desktop Settings flow and human confirmation remain outstanding. Start a Goose worker before configuring its provider, save the provider key in Settings, test the connection, and message the agent again. It should respond without restarting Buzz.

No browser journeys or visual UI changes are included.

Settings saves provider keys through a short-lived goose-acp, but goose
caches secrets per process, so the long-lived agent worker kept failing
with "Configuration value not found" until Buzz restarted.

After a save, send the shared worker goose's existing
providers/inventory/refresh, which clears its secret cache and bumps its
config generation. Shared API-key providers are keyed by that
generation, so sessions build a provider with the new key on their next
call; nothing is reopened or interrupted. Refresh is best effort and
skipped when no worker is running.

Fixes block#1569.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019e7yZchkqtXj3yFgL9wpZr
Signed-off-by: Stan <273962421+pepmach@users.noreply.github.com>
@pepmach
pepmach force-pushed the fix/goose-provider-credentials branch from ceeb400 to 41c546f Compare October 22, 2026 22:55
@pepmach
pepmach marked this pull request as ready for review October 22, 2026 22:57
@pepmach
pepmach requested a review from a team as a code owner October 22, 2026 22:57
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.

Goose keeps stale provider credentials after Save to goose until Buzz restarts

1 participant