Skip to content

fix: keep ACP session naming out of live conversations - #10963

Merged
DOsinga merged 1 commit into
mainfrom
codex/issue-10843-session-naming
Aug 5, 2026
Merged

fix: keep ACP session naming out of live conversations#10963
DOsinga merged 1 commit into
mainfrom
codex/issue-10843-session-naming

Conversation

@DOsinga

@DOsinga DOsinga commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • generate local four-word session names for providers that manage their own context
  • consume ACP session_info_update titles and persist them for the matching Goose session
  • preserve user-set names and prevent later local fallback naming from replacing an ACP title

Root cause

Session naming called Provider::complete with a hidden prompt. For ACP providers, the default completion implementation streams that prompt through the live stateful agent session, which could produce bad titles and visible phantom responses.

Stateful providers now stay on the local naming path, so the hidden prompt never reaches their live session. ACP agents can replace the fallback by publishing a title through the standard session info update.

User impact

Codex ACP sessions receive a stable local title without an extra agent turn. Claude ACP titles can replace that fallback when the adapter publishes its generated title. User-provided titles always win.

Closes #10843

Verification

  • cargo test -p goose --lib session_title_publisher_forwards_non_empty_titles
  • cargo test -p goose --lib test_maybe_update_name_uses_local_name_for_stateful_provider
  • cargo test -p goose --lib test_provider_name_replaces_generated_name_but_not_user_name
  • cargo clippy -p goose --lib -- -D warnings
  • cargo fmt

@DOsinga
DOsinga marked this pull request as ready for review August 5, 2026 08:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa15700fa0

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let session_name_update_tx = self.config.session_name_update_tx.clone();
let session_id_for_title = session_id.to_string();
let runtime = tokio::runtime::Handle::current();
provider.set_session_title_callback(Arc::new(move |title| {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the session-naming opt-out

When GOOSE_DISABLE_SESSION_NAMING/ACP disable_session_naming is set, reply_internal skips maybe_update_name and the ACP server also withholds session_name_update_tx, but this callback is still registered and always calls update_name_from_provider, so any ACP agent that emits a SessionInfoUpdate.title will still persistently rename the session despite the opt-out. Please gate this registration (or the callback body) on !self.config.disable_session_naming, not just the notification send.

Useful? React with 👍 / 👎.

@lifeizhou-ap lifeizhou-ap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There is a code review comment that seems valid and it is worthwhile addressing it.

@DOsinga
DOsinga added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 6646a0f Aug 5, 2026
25 checks passed
@DOsinga
DOsinga deleted the codex/issue-10843-session-naming branch August 5, 2026 15:46
lifeizhou-ap added a commit that referenced this pull request Aug 6, 2026
* main: (32 commits)
  fix: keep turn-context in place for OpenAI Responses-stack models so prompt caching works (#10993)
  fix(developer): byte-bound the shell truncation preview (#10992)
  fix(openrouter): stop silently ignoring thinking effort off (#10991)
  fix: dispatch edited queued messages (#10933)
  fix: contain recipe template paths (#10930)
  fix: make shell approval titles faithful (#10986)
  fix: block MCP app form submissions (#10985)
  fix: migrate desktop routing to React Router 8.3.0 (#10971)
  fix: sanitize Bedrock tool errors (#10934)
  fix implicit OAuth during model discovery (#10929)
  fix: update React Router to 7.18.2 (#10967)
  test: early-exit code-exec smoke tests once tool invocation is observed (#10954)
  fix: keep ACP session naming out of live conversations (#10963)
  Bind MCP apps to trusted ownership metadata (#10747)
  tests: add recursion_limit attribute to remaining ACP test files (#10559)
  Sanitize Unicode tags in MCP resources (#10746)
  fix(oauth): preserve RFC 9207 iss from MCP OAuth callback (#10678)
  feat(installer): detect Termux and select musl portable build (#10568)
  feat: add Celeris provider (#10714)
  fix: shell ACP providers on desktop (#10907)
  ...
lifeizhou-ap added a commit that referenced this pull request Aug 6, 2026
* main: (101 commits)
  fix: keep turn-context in place for OpenAI Responses-stack models so prompt caching works (#10993)
  fix(developer): byte-bound the shell truncation preview (#10992)
  fix(openrouter): stop silently ignoring thinking effort off (#10991)
  fix: dispatch edited queued messages (#10933)
  fix: contain recipe template paths (#10930)
  fix: make shell approval titles faithful (#10986)
  fix: block MCP app form submissions (#10985)
  fix: migrate desktop routing to React Router 8.3.0 (#10971)
  fix: sanitize Bedrock tool errors (#10934)
  fix implicit OAuth during model discovery (#10929)
  fix: update React Router to 7.18.2 (#10967)
  test: early-exit code-exec smoke tests once tool invocation is observed (#10954)
  fix: keep ACP session naming out of live conversations (#10963)
  Bind MCP apps to trusted ownership metadata (#10747)
  tests: add recursion_limit attribute to remaining ACP test files (#10559)
  Sanitize Unicode tags in MCP resources (#10746)
  fix(oauth): preserve RFC 9207 iss from MCP OAuth callback (#10678)
  feat(installer): detect Termux and select musl portable build (#10568)
  feat: add Celeris provider (#10714)
  fix: shell ACP providers on desktop (#10907)
  ...
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.

ACP providers send the session-naming prompt into the live agent session — garbage titles and phantom chat responses

2 participants