Skip to content

Keep requires_action while a waiting Turn cancels - #861

Merged
SaladDay merged 2 commits into
mainfrom
fix/cancel-keeps-requires-action
Oct 25, 2026
Merged

SaladDay merged 2 commits into
mainfrom
fix/cancel-keeps-requires-action

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Official API alignment (ST-05): after a waiting Turn is cancelled (202), the official Session keeps requires_action until the Turn ends; Core switched to in_progress at once and journaled an interim agent.session.in_progress.

  • The cancel request on a waiting Turn now only records the request; the Session keeps requires_action with its actions until the Turn ends, then turn.cancelled and agent.session.idle follow as before.
  • Function results after the cancel are still rejected, and the executor gets no pending calls for a cancelling Turn. Unconfirmed cancels still fail after the existing cancel_unconfirmed bound.
  • Docs (sessions-events.md, ledger line, + zh) updated.

Checks: go test ./internal/sessions ./internal/api ./internal/execution, ./tests/integration -run TestFunctionState against a test database, make sqlc-generate (no diff), go vet ./..., gofmt.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay force-pushed the fix/cancel-keeps-requires-action branch from d75d900 to 81374ff Compare October 25, 2026 02:39
@SaladDay
SaladDay merged commit 1fbc193 into main Oct 25, 2026
1 check passed
@SaladDay
SaladDay deleted the fix/cancel-keeps-requires-action branch October 25, 2026 02:39
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.

1 participant