fix: lazy provider creation for goose acp (#7026)#7066
Merged
codefromthecrypt merged 2 commits intomainfrom Feb 8, 2026
Merged
fix: lazy provider creation for goose acp (#7026)#7066codefromthecrypt merged 2 commits intomainfrom
codefromthecrypt merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes ACP startup behavior by moving provider instantiation behind a lazy ProviderConstructor, and updates ACP initialization to advertise supported auth methods so registry validation can succeed.
Changes:
- Make provider creation lazy by passing a
ProviderConstructorintoGooseAcpAgentand only constructing a provider when a session needs it. - Add
authMethodsto the ACPinitializeresponse. - Update goose-acp test fixtures and add a new test covering initialize without an available provider.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/goose/src/providers/provider_registry.rs | Exposes ProviderConstructor publicly for cross-crate use. |
| crates/goose-acp/src/server.rs | Refactors agent construction to accept a provider factory; adds authMethods; introduces lazy provider setup via ensure_provider. |
| crates/goose-acp/src/server_factory.rs | Updates HTTP/WS server factory to build GooseAcpAgent using ProviderConstructor. |
| crates/goose-acp/tests/fixtures/mod.rs | Refactors in-process test server wiring to return a ready-to-use transport and adds initialize_agent helper. |
| crates/goose-acp/tests/fixtures/server.rs | Adapts tests to the updated in-process server spawn API. |
| crates/goose-acp/tests/server_test.rs | Adds test_initialize_without_provider and updates imports for new helpers/types. |
codefromthecrypt
commented
Feb 7, 2026
43c91fb to
93010b0
Compare
goose acp crashes on startup without provider config because it eagerly creates a provider at construction time. Make provider creation lazy via ProviderConstructor and add authMethods to the initialize response. Signed-off-by: Adrian Cole <adrian@tetrate.io>
93010b0 to
b24192d
Compare
alexhancock
approved these changes
Feb 8, 2026
tlongwell-block
added a commit
that referenced
this pull request
Feb 9, 2026
* origin/main: (55 commits) test(mcp): add image tool test and consolidate MCP test fixtures (#7019) fix: remove Option from model listing return types, propagate errors (#7074) fix: lazy provider creation for goose acp (#7026) (#7066) Smoke tests: split compaction test and use debug build (#6984) fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061) feat: expose AGENT_SESSION_ID env var to extension child processes (#7072) fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882) Remove clippy too_many_lines lint and decompose long functions (#7064) refactor: move disable_session_naming into AgentConfig (#7062) Add global config switch to disable automatic session naming (#7052) docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059) fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047) Show recommended model on failture (#7040) feat(ui): add session content search via API (#7050) docs: fix img url (#7053) Desktop UI for deleting custom providers (#7042) Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051) Remove build-dependencies section from Cargo.toml (#6946) add /rp-why skill blog post (#6997) fix: fix snake_case function names in code_execution instructions (#7035) ... # Conflicts: # scripts/test_subrecipes.sh
lifeizhou-ap
added a commit
that referenced
this pull request
Feb 9, 2026
* main: (101 commits) fix: lazy provider creation for goose acp (#7026) (#7066) Smoke tests: split compaction test and use debug build (#6984) fix(deps): trim bat to resolve RUSTSEC-2024-0320 (#7061) feat: expose AGENT_SESSION_ID env var to extension child processes (#7072) fix: add XML tool call parsing fallback for Qwen3-coder via Ollama (#6882) Remove clippy too_many_lines lint and decompose long functions (#7064) refactor: move disable_session_naming into AgentConfig (#7062) Add global config switch to disable automatic session naming (#7052) docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059) fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047) Show recommended model on failture (#7040) feat(ui): add session content search via API (#7050) docs: fix img url (#7053) Desktop UI for deleting custom providers (#7042) Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051) Remove build-dependencies section from Cargo.toml (#6946) add /rp-why skill blog post (#6997) fix: fix snake_case function names in code_execution instructions (#7035) Document max_turns settings for recipes and subagents (#7044) feat: update Groq declarative data with Preview Models (#7023) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before,
goose acpcrashes on startup when there is not yet Goose configuration.This PR makes provider creation lazy until an ACP session needs it.
This also adds missing ACP
authMethodsis added to theinitializeresponse so ACP clients can prompt for setup.Type of Change
AI Assistance
Testing
New
test_initialize_without_providertest verifies configuration isn't required to initialize ACP.ACP registry validation against local build:
Example output:
Related Issues
Fixes #7026
Unblocks agentclientprotocol/registry#23