feat(acp): allow session/new to request a Hidden session via _meta.hidden - #10811
Conversation
…dden Clients can now pass "hidden": true in session/new _meta to create a Hidden session, taking precedence over the "client" key. Absent, null, or false values preserve the existing User/Acp behavior, and non-boolean values are rejected with invalid_params. Signed-off-by: Matt Toohey <contact@matttoohey.com>
30b06cf to
1a09305
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a09305eeb
ℹ️ 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".
| if meta_bool(meta, "hidden")? { | ||
| return Ok(SessionType::Hidden); |
There was a problem hiding this comment.
Preserve ACP recall scope for hidden sessions
When an external ACP client omits client but sends _meta.hidden: true, this collapses the session to SessionType::Hidden instead of retaining that it came from ACP. Chat Recall later scopes searches only by the persisted SessionType: Acp sessions search ACP history, while every other type searches User/Scheduled history (crates/goose/src/agents/platform_extensions/chatrecall.rs:103-106). In a hidden ACP session with Chat Recall enabled, the agent can therefore read desktop/legacy history and cannot recall ACP history, which regresses ACP session isolation. Consider preserving ACP provenance for hidden ACP sessions or updating the downstream scope logic before storing these sessions as plain Hidden.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I think this is a limitation of a single "type" per session in Goose's existing data model
* main: (224 commits) fix(desktop): allow removing images when editing user messages (aaif-goose#9979) Fetch cursor-agent models from CLI (aaif-goose#10367) fix(cerebras): preserve thinking inline for models that reject reasoning_content (aaif-goose#10774) perf: make CLI streaming render incremental instead of O(n^2) (aaif-goose#10487) Moving to issues as the new PRs (aaif-goose#10818) ci: defer privileged recipe scans for forks (aaif-goose#10825) docs: adopt issue-first contribution workflow (aaif-goose#10819) Add Azure AI Foundry multi-LLM provider (aaif-goose#10622) fix(together): parse model list response (aaif-goose#10576) docs: remove retired site resources (aaif-goose#10817) feat: streaming shell output while commands run (aaif-goose#10808) feat(acp): allow session/new to request a Hidden session via _meta.hidden (aaif-goose#10811) chore: removed stale text pnpm workspace (aaif-goose#10809) feat(otel): emit GenAI semantic convention attributes (aaif-goose#10700) fix: avoid double loading full conversation on session open (aaif-goose#10794) feat(providers): forward images and MCP embedded-resource blobs in Anthropic and Google formats (aaif-goose#10340) Deprecate and remove ui/text TUI (aaif-goose#10799) Upgrade to rmcp 3.0 (aaif-goose#10789) fix(release): signing environment (aaif-goose#10797) feat(tools): collapse const-union enums in tool schemas (aaif-goose#10577) ...
Summary
Allows ACP clients to request a
Hiddensession by passing"hidden": truein the_metaobject of asession/newrequest.session_type_from_metahelper:_meta.hidden: trueyieldsSessionType::Hidden(taking precedence over theclientkey); otherwise the existing behavior is preserved (clientpresent →SessionType::User, absent →SessionType::Acp).meta_boolhelper that treats missing or non-boolean values asfalse, so a malformedhiddenvalue falls back to the prior session-type logic rather than erroring.Testing
Added unit tests covering:
hidden: truealone and combined withclient, absent/falsehiddenpreservingAcp, non-booleanhiddenfalling back toUser, and the existingclient→Userpath.🤖 Generated with Claude Code