Since a62d739, cleanup_done transitions to 'closed' (not terminal/deleted)
so sessions are retained on disk for history lookup. Update wait_session_cleanup
to accept 'closed' status as cleaned up, and add timeout wait for cancel test.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Persist the Codex thread id as a provider resume token so reject/resume reconnects to the same Codex conversation instead of passing the daemon session id to the SDK.
Also update the daemon smoke test to wait for async review-session cleanup and guard empty task cleanup arrays under set -u.
The reject was racing with finalize — task reached in_review on the
server but daemon hadn't finished preserving the session yet. Agent
would then see in_progress (rejected) instead of in_review on getTask,
causing a spurious release + re-dispatch. Add 5s delay to let finalize
complete before rejecting.
The smoke test was blindly selecting the first agent from the list,
which could be a builtin like Quality Goalkeeper. Now filters by
developer role and auto-creates from fullstack-developer template
if none exists.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
createTask was hardcoding assigned_to as NULL, ignoring the --assign-to
CLI flag. Now accepts assigned_to in the input and writes it atomically
with an 'assigned' log entry. Also adds a smoke-test script for e2e
flow verification.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>