What
A remote session is a Claude Code session running somewhere other than your terminal, which your terminal talks to over the network. Several pieces of work let a message you have queued in such a session be cancelled and confirmed:
- A new tracker handles
cancel_async_messagecontrol requests and messages that have been withdrawn. It is gated bytengu_stateless_treasure, a server-controlled switch whose built-in fallback is off. The flag server returned off for this site's account and for the anonymous baseline; no reading has been taken under this release yet. - The
cancel_async_messageresult can now include an optionalmessage_uuidnaming the message that was dropped. Before, it only said whether something was cancelled. - Taking back a message from the thin client now counts as "taken_back" only when the response says cancelled and its
message_uuidmatches the message you meant. The old code read the wrong variable. SessionsV2Clientgained apingmethod that sends a POST to/v1/code/sessions/{id}/ping.- Reconnecting now rounds the wait between attempts, and keeps trying without a limit when redialling past its budget.
Why
If you take back a queued message, Claude Code no longer reports success when the cancel actually hit a different message. Programs built on the SDK can also see exactly which message was dropped.
Names in the bundlecancel_async_messagemessage_uuid
Documented inclaude-code/agent-sdk/streaming-output