Skip to content

fix(acp): send session setup updates after new and fork session responses - #11018

Merged
lifeizhou-ap merged 2 commits into
mainfrom
lifei/send-available-slash-command-after-session-setup
Aug 10, 2026
Merged

fix(acp): send session setup updates after new and fork session responses#11018
lifeizhou-ap merged 2 commits into
mainfrom
lifei/send-available-slash-command-after-session-setup

Conversation

@lifeizhou-ap

@lifeizhou-ap lifeizhou-ap commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix #11010

Change

Send ACP setup notifications after session/new and session/fork responses instead of before responses are completed. This aligns slash-command advertisement (include usage) with ACP standard in the post session creation flow.

Testing

  • Unit test
  • Confirmed in Zed that /goal is sent through session/prompt

@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: 5104940135

ℹ️ 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".

Comment thread crates/goose/src/acp/server/dispatch.rs Outdated
Comment on lines +50 to +53
responder.respond(response)?;
if let Err(error) = agent
.notify_session_setup_by_id(&cx_clone, &session_id)
.await

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 Queue setup updates before accepting follow-up requests

Once respond is called, the client can immediately submit session/prompt, but the setup task then yields while reloading the session and usage totals. Because prompt handling is spawned concurrently, its final usage update can be sent before this task resumes, after which the older setup usage update resets the client's counters; the same race exists in the fork handler. Gather the setup state before responding, then synchronously enqueue the response followed by its notifications so no follow-up request can interleave them.

Useful? React with 👍 / 👎.

@DOsinga DOsinga 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.

The final commit addresses the notification-ordering race by preparing session setup state before responding, then enqueueing the response and setup notifications without yielding. The raw ACP tests cover the required ordering for both new and forked sessions, and all required checks pass. This is a clear, contained core-team bug fix. LGTM.

@lifeizhou-ap
lifeizhou-ap added this pull request to the merge queue Aug 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 9, 2026
@lifeizhou-ap
lifeizhou-ap added this pull request to the merge queue Aug 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 10, 2026
@lifeizhou-ap
lifeizhou-ap added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit 4ae4017 Aug 10, 2026
39 of 44 checks passed
@lifeizhou-ap
lifeizhou-ap deleted the lifei/send-available-slash-command-after-session-setup branch August 10, 2026 01:46
michaelneale added a commit that referenced this pull request Aug 10, 2026
* origin/main:
  fix(streaming): skip metadata-only SSE frames instead of failing the turn (#10942)
  fix(telegram): send responses as rich markdown (#11062)
  fix(acp): send session setup updates after new and fork session responses (#11018)
  fix(ui): remove duplicated brace-expansion keys that break every pnpm install (#11071)

# Conflicts:
#	ui/pnpm-lock.yaml
lifeizhou-ap added a commit that referenced this pull request Aug 10, 2026
* main:
  fix(streaming): skip metadata-only SSE frames instead of failing the turn (#10942)
  fix(telegram): send responses as rich markdown (#11062)
  fix(acp): send session setup updates after new and fork session responses (#11018)
  fix(ui): remove duplicated brace-expansion keys that break every pnpm install (#11071)
  chore(deps): bump pypa/gh-action-pypi-publish from 1.14.1 to 1.14.2 (#11037)
  chore(deps): bump actions/setup-java from 5.6.0 to 5.7.0 (#11036)
  chore(deps): bump Jimver/cuda-toolkit from 0.2.35 to 0.2.36 (#11035)
  chore(deps-dev): bump js-yaml from 4.3.0 to 4.3.1 in /documentation (#11052)
  chore(deps-dev): bump @types/yauzl from 2.10.3 to 3.4.0 in /ui (#10975)
  chore(deps-dev): bump electron from 41.0.0 to 41.10.3 in /ui (#10969)
  chore(deps): bump brace-expansion from 1.1.16 to 1.1.18 in /documentation (#10947)
  chore(deps-dev): bump postcss from 8.5.8 to 8.5.23 in /ui (#10946)
  chore(deps): bump aiohttp from 3.14.1 to 3.14.3 in /scripts/provider-error-proxy (#10945)
  chore(deps): bump fast-uri from 3.1.4 to 3.1.5 in /documentation (#10944)
  fix: reject invalid subrecipe content (#10994)
  chore(deps): bump azure/login from 3.0.0 to 3.0.1 (#11033)
  chore(deps): bump pnpm/action-setup from 6.0.9 to 6.0.10 (#11034)
  Cache-safe request assembly: append-only turn context and declared cache semantics (#11022)
lifeizhou-ap added a commit to vincenzopalazzo/goose that referenced this pull request Aug 10, 2026
* main:
  docs: add tool shim guide covering when to enable, backends, and troubleshooting (aaif-goose#10858)
  fix(deep-link): route extension/session deep links to regular windows not standalone app windows (aaif-goose#10908)
  fix(ui): raise chat input z-index so slash menu appears above loading indicator (aaif-goose#11015)
  fix(ui): support remote working directory for external backend (aaif-goose#10827)
  fix(acp): resume provider-native sessions (aaif-goose#10379)
  fix (UI): Fix Form/JSON toggle buttons invisible in dark mode on Deeplink Generator (aaif-goose#11077)
  fix(streaming): skip metadata-only SSE frames instead of failing the turn (aaif-goose#10942)
  fix(telegram): send responses as rich markdown (aaif-goose#11062)
  fix(acp): send session setup updates after new and fork session responses (aaif-goose#11018)
  fix(ui): remove duplicated brace-expansion keys that break every pnpm install (aaif-goose#11071)
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.

No /goal command found by ACP

2 participants