Skip to content

fix(acp): stream scheduled turn activity - #3004

Open
Oxygen56 wants to merge 3 commits into
MoonshotAI:mainfrom
Oxygen56:fix/2991-acp-scheduled-turn-updates
Open

fix(acp): stream scheduled turn activity#3004
Oxygen56 wants to merge 3 commits into
MoonshotAI:mainfrom
Oxygen56:fix/2991-acp-scheduled-turn-updates

Conversation

@Oxygen56

@Oxygen56 Oxygen56 commented Aug 17, 2026

Copy link
Copy Markdown

Related Issue

Resolve #2991

Problem

ACP only forwarded events from the turn owned by the active session/prompt request. A cron-triggered turn has no such request driver, so its assistant, thinking, and tool activity was discarded. When an interactive prompt waited behind that turn, the pending driver also buffered and later dropped the scheduled turn's remaining events.

What changed

  • Track cron-triggered turns from their turn.started origin and forward their normal ACP updates.
  • Keep scheduled activity streaming while an interactive prompt waits for its own turn, then clean up tracking and publish usage when the scheduled turn ends.
  • Keep cancellation of a queued ACP prompt scoped to that prompt instead of cancelling the active scheduled task.
  • Add an end-to-end regression covering a scheduled turn with a queued ACP prompt, plus mirrored English and Chinese documentation.

Verification

  • The exact pre-fix implementation failed the scheduled-update assertion, while the current implementation passed it.
  • The complete ACP server test suite, including queued-prompt cancellation safety, passed.
  • The full workspace build and CLI bundle smoke check passed.
  • ACP server type checking, changed-file type-aware linting, repository lint, package and workspace consistency checks, and the documentation build passed.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a67c8e6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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: scheduled (cron) turns emit no session/update events, so clients cannot tell the session is busy

1 participant