Files
kandev/apps
João Salavisa 934b713ee9 feat(orchestrator): persist ACP session id in session metadata (#1748)
* feat(orchestrator): persist ACP session id in session metadata

storeResumeToken now mirrors the agent's ACP session id into the
session's durable acp metadata map after the CAS succeeds. Previously
the id only reached metadata when an agent emitted a session_info
frame, so most sessions could not be joined to their agent-CLI
transcripts once their executors_running row was pruned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(orchestrator): make ACP session id mirror atomic and rotation-safe

Address review feedback on the metadata mirror: replace the
read-modify-write in persistACPSessionID with a single guarded UPDATE
(SetSessionACPSessionID). json_patch merges the session_id sub-key
atomically, preserving session_info keys, and the write is gated on
executors_running still holding the id as its resume token — so a
delayed event from a rotated execution can never overwrite the live
execution's id, and the session_info TOCTOU disappears along with the
unlogged GetTaskSession read.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 01:54:04 +01:00
..
2026-07-16 08:39:43 +00:00
…
…