feat(acp): add session/set_config and stabilize list, delete and close#7984
feat(acp): add session/set_config and stabilize list, delete and close#7984codefromthecrypt merged 1 commit intomainfrom
Conversation
8908db2 to
a769e96
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a769e96489
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
draft as while the bot comment was a red herring, in investigating it I found a different bug nearby where we aren't implementing model change, just it appears we are. I am going to fix that and re-open for review when done |
3b4f484 to
34e59df
Compare
|
This was quite possibly the most tedious manual Q/A I've ever done in goose. hope it helps! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34e59df074
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
34e59df to
1cd9c46
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1cd9c4616d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5c93809a9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I have spent 3 dauys on this and do not and won't spend unlimited time feeding copilot where if ever more than 50% accurate still wastes similar time and many rabbit holes. the last I did is the last revision |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecf5badfe1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a77cb4f17
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
codex is getting a bit much I think... over confident and not always helpful |
|
as usual, the last several comments of codex are either garbage or highly speculative. The only one not completely invalid is assuming agents (which it sometimes it conflates with clients), randomly change the model and we might not know about it, and wants even more complicated code to address, that too. I'll look into it, but yes... this bot has been a cure worse than the disease. |
|
yes at the moment there is no open source agent that sends unsolicited model changes, even though mode sometimes is (escape planning mode) but that's also different than our permission mode (e.g. smart approve) this is ready for a human review (I've had enough of codex and don't want to lose more time with it again on this PR) |
7a77cb4 to
b397d44
Compare
|
squashed into one commit for easier rebasing |
| #[tokio::test] | ||
| async fn test_gemini_acp_provider() -> Result<()> { | ||
| ProviderTestConfig::with_agentic_provider("gemini-acp", GEMINI_ACP_DEFAULT_MODEL, "gemini") | ||
| // Don't run tests with ACP_CURRENT_MODEL, as gemini sets "auto-gemini-3" even when the user |
There was a problem hiding this comment.
cc @michaelneale gemini is not the best at this, neither product nor code IMHO
There was a problem hiding this comment.
this might be an argument to not be fancy with gemini as it sets impossible defaults. very frustrating
There was a problem hiding this comment.
fyi errors around this come from google's api I've confirmed there is no hard-coding on their acp code. Basically, google is returning from the cloud choices that cannot be used, and there are multiple issues open about this in the gemini repo.
Once they fix this, the "auto-gemini-3" problem of it showing up but being unusable in ways the cloud would already know.. it will just disappear as a problem.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b397d44053
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "Gemini CLI (ACP)", | ||
| "ACP provider for Google's Gemini CLI. Install: npm install -g @google/gemini-cli", | ||
| GEMINI_ACP_DEFAULT_MODEL, | ||
| ACP_CURRENT_MODEL, |
There was a problem hiding this comment.
Keep Gemini ACP off the unsupported
current default
Fresh evidence in crates/goose/tests/providers.rs:892-895 shows Gemini resolves ACP_CURRENT_MODEL to auto-gemini-3 and fails with Requested entity was not found for accounts without Preview Release Channel access. Publishing ACP_CURRENT_MODEL as the default here means a brand-new gemini-acp configuration can break before the user has selected any model.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
👎we have two bad choices here,
- 2.5 is too flakey to use and if we start advertising that, it won't work.
- 3 returns an error if the user hasn't enable the preview channel
If we hard-code 2.5 we will make sure there are bugs and also we need to track drift when gemini's model changes. If we don't, people who use the preview channel can work.
I think the solution is to tell people to enable the preview channel in docs.
b397d44 to
64eaeb5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64eaeb5ca9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
ok once again done feeding codex, and I am out of time (another 8hrs done) |
|
majority of recent feedback from codex has been about session/delete which is not used anywhere except goose. Hopefully, there is enough coverage for it now, to stop fussing. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7500908e73
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5b19345dd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@copilot please remember session/delete is reserved, but not yet specified. there is literally no one but us using it. Please stop inventing lifecycle requirements for it. |
…cp 11 Signed-off-by: Adrian Cole <[email protected]>
|
@codefromthecrypt I've opened a new pull request, #8063, to work on those changes. Once the pull request is ready, I'll request review from you. |
a5b1934 to
fc3a2cf
Compare
|
@michaelneale I've resquashed this again. I will try my best to ignore anything further copilot dreams up |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc3a2cf2f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ($conn:ty) => { | ||
| #[test_case::test_case("not_a_mode", None, sacp::Error::invalid_params().data("Invalid mode: not_a_mode") ; "invalid mode")] | ||
| #[test_case::test_case("auto", Some("nonexistent-session-id"), sacp::Error::invalid_params().data("Session not found: nonexistent-session-id") ; "session not found")] | ||
| #[test_case::test_case("auto", Some("nonexistent-session-id"), sacp::Error::resource_not_found(Some("nonexistent-session-id".to_string())).data("Session not found: nonexistent-session-id") ; "session not found")] |
There was a problem hiding this comment.
fyi I checked and resource_not_found is the correct error to return, panik is the worst ;)
michaelneale
left a comment
There was a problem hiding this comment.
not really sure how to truly hand vet this but seems to make sense, don't want to be a blocker, good luck
|
thanks @michaelneale if anyone truly does want to re-vet this they could run through the Testing section in the PR I wrote, though I don't recommend it as it is extremely tedious. |
* origin/main: (62 commits) Tweak the release process: no more merge to main (#7994) fix: gemini models via databricks (#8042) feat(apps): Pass toolInfo to MCP Apps via hostContext (#7506) fix: remove configured marker when deleting oauth provider configuration (#7887) docs: add vmware-aiops MCP extension documentation (#8055) Show setup instructions for ACP providers in settings modal (#8065) deps: replace sigstore-verification with sigstore-verify to kill vulns (#8064) feat(acp): add session/set_config and stabilize list, delete and close (#7984) docs: Correct `gosoe` typo to `goose` (#8062) fix: use default provider and model when provider in session no longer exists (#8035) feat: add GOOSE_SHELL env var to configure preferred shell (#7909) fix(desktop): fullscreen header bar + always-visible close controls (#8033) docs: add Claude Code approve mode permission routing documentation (#7949) chatgpt_codex: Support reasoning and gpt-5.4 (#7941) refactor(anthropic): fix N+1 thinking message storage issue (#7958) fix: handle mid-stream error events in OpenAI SSE streaming (#8031) Fix apps extension: coerce string arguments from inner LLM responses (#8030) feat: ability to expand sidebar to see chats names (#7816) Fix config for GOOSE_MAX_BACKGROUND_TASKS (#7940) set MACOSX_DEPLOYMENT_TARGET=12.0 (#7947) ...
…pstream * wpfleger/socket-support: (62 commits) Tweak the release process: no more merge to main (#7994) fix: gemini models via databricks (#8042) feat(apps): Pass toolInfo to MCP Apps via hostContext (#7506) fix: remove configured marker when deleting oauth provider configuration (#7887) docs: add vmware-aiops MCP extension documentation (#8055) Show setup instructions for ACP providers in settings modal (#8065) deps: replace sigstore-verification with sigstore-verify to kill vulns (#8064) feat(acp): add session/set_config and stabilize list, delete and close (#7984) docs: Correct `gosoe` typo to `goose` (#8062) fix: use default provider and model when provider in session no longer exists (#8035) feat: add GOOSE_SHELL env var to configure preferred shell (#7909) fix(desktop): fullscreen header bar + always-visible close controls (#8033) docs: add Claude Code approve mode permission routing documentation (#7949) chatgpt_codex: Support reasoning and gpt-5.4 (#7941) refactor(anthropic): fix N+1 thinking message storage issue (#7958) fix: handle mid-stream error events in OpenAI SSE streaming (#8031) Fix apps extension: coerce string arguments from inner LLM responses (#8030) feat: ability to expand sidebar to see chats names (#7816) Fix config for GOOSE_MAX_BACKGROUND_TASKS (#7940) set MACOSX_DEPLOYMENT_TARGET=12.0 (#7947) ...
* main: (37 commits) fix: handle reasoning content blocks in OpenAI-compat streaming parser (#8078) chore(acp): build native packages on latest mac (#8075) Display delegate sub agents logs in UI (#7519) Update tar version to avoid CVE-2026-33056 (#8073) refactor: consolidate duplicated dependencies into workspace (#8041) tui: set up for publishing via github actions (#8020) feat: feature-gate local inference dependencies (#7976) feat: ability to manage sub recipes in desktop ui (#6360) Tweak the release process: no more merge to main (#7994) fix: gemini models via databricks (#8042) feat(apps): Pass toolInfo to MCP Apps via hostContext (#7506) fix: remove configured marker when deleting oauth provider configuration (#7887) docs: add vmware-aiops MCP extension documentation (#8055) Show setup instructions for ACP providers in settings modal (#8065) deps: replace sigstore-verification with sigstore-verify to kill vulns (#8064) feat(acp): add session/set_config and stabilize list, delete and close (#7984) docs: Correct `gosoe` typo to `goose` (#8062) fix: use default provider and model when provider in session no longer exists (#8035) feat: add GOOSE_SHELL env var to configure preferred shell (#7909) fix(desktop): fullscreen header bar + always-visible close controls (#8033) ...
Summary
This change stabilizes ACP session related functionality that is re-used across multiple ACP agents. This does so by adding the new unified
session/set_config_optionand formalizing existing support likesession/list,session/deleteandsession/closewith integration tests. To unlock this, it updates to the latest sacp lib as the prior revlocked us into old schema types.ACP stabilized
session/set_config_optionas a unified config method, supersedingsession/set_modeandsession/set_model.Instead of separate
modesandmodelsfields insession/new, agents return a singleconfig_optionsarray that clients use to populate their UI and send changes back.Here are some notable clients/IDEs that support deviations of this config:
set_config_optionwhen agents advertiseconfig_options, falls back otherwiseset_config_optionsession/set_modeThis updates
goose acpto acceptset_config_optionand fall back toset_mode/set_modelto support the above, taking care not to duplicate code.Goose is also a client when using ACP providers (e.g. claude-acp, codex-acp). The provider now handles
ConfigOptionUpdatenotifications to sync local state, supporting the same patterns in the other direction.Here are some notable agents that support deviations of this config:
config_optionsand falls back toset_modeset_config_optionsession/set_modeandsession/set_modelWe couldn't add this before due to revlock in sacp 10, not without manually writing JSON.
So this bumps to sacp 11 to get
SetSessionConfigOptionRequest.It also adds
if_requestrouting and minor call-site updates.Note:
session/set_config_optionalso addsthought_level, but we returninvalid_paramsuntil we figure out how to normalize thinking.Session lifecycle methods (
session/list,session/close) now use typedif_requestdispatch via sacp's unstable feature flags.session/deleteis a standard ACP method (RFD #395) not yet in the schema crate, so it remains in custom method dispatch untilDeleteSessionRequestis added.Goose as a client now sends
session/closeon shutdown to ACP agents that advertisesessionCapabilities.close. This lets agents free resources:The
#[custom_method]macro no longer forces a_goose/prefix on all methods. This allows us to add impl for emerging ACP methods likesession/delete(before they are in the schema). Goose-only methods (_goose/tools,_goose/config/extensions, etc.) keep their prefix.All ACP providers now use a single sentinel
"current"instead of per-provider default model strings ("default","gpt-5.4","auto-gemini-3"). At connect time, goose resolves it to the agent's actualcurrent_model_idfromsession/new. This fixes a clash where claude-acp's old default"default"could overwrite the user's real model choice, and eliminates per-provider constants that drift as agents change their model names.Notable bugs fixed along the way:
fs_errType of Change
AI Assistance
Testing
Integration tests
ACP provider updates:
Scoped provider tests (includes claude-code to prove sentinel check doesn't break non-ACP agentic providers):
Zed
Kill goose and clear state:
Add to
~/.config/zed/settings.json:Mode selection:
Model selection:
Model selection — set_config_option forwarding (claude-acp):
Replace the
envin~/.config/zed/settings.jsonwith:Restart Zed:
Model selection — set_model fallback (gemini-cli):
Replace the
envin~/.config/zed/settings.jsonwith:Restart Zed:
Session list:
acpx (
set_config_optiononly client)acpx uses
session/set_config_optionexclusively (nosession/set_modeorsession/set_modelfallback).Add to
~/.acpx/config.json:{ "agents": { "goose": { "command": "env RUST_LOG=debug,sacp=trace /path/to/goose/target/release/goose acp --with-builtin developer" } } }Kill goose and clear state:
Mode selection (approve mode denies tool calls):
Model selection:
Goose CLI
Setup providers:
$ source bin/activate-hermit $ npm install -g @zed-industries/claude-agent-acp @zed-industries/codex-acp @google/gemini-cli $ just release-binaryEach test should be run with this cleanup first:
session/close on shutdown (claude-acp):
sessionCapabilities.close)session/closewas sentGoose UI
We need to use Goose UI for mid-session ACP provider verifications.
ACP provider updates:
Each test should be run with this cleanup first:
set_config_option — mode (claude-acp):
GOOSE_PROVIDER=claude-acp GOOSE_MODEL=default RUST_LOG=debug,sacp=trace just run-uiset_config_optionto claude-acp:set_mode fallback — mode (gemini-cli):
GOOSE_PROVIDER=gemini-acp GOOSE_MODEL=gemini-2.5-flash RUST_LOG=debug,sacp=trace just run-uisession/set_mode(notset_config_option):Related Issues
Uses ACP #411