feat(delegation): resume an interrupted delegated task with resume_delegation
New codeg-mcp tool that revives a delegated task cut off by a cancel or an unexpected session/app termination — and ONLY such a task — under its original task_id: the child's recorded agent session is reloaded via the row's external_id and a fixed continuation prompt lands in the same conversation row, whose unchanged delegation_call_id re-arms the lifecycle's TurnComplete routing, so get_delegation_status / cancel_delegation keep working on the id the caller already holds. Strict scope, enforced broker-side: running / completed / failed / foreign tasks refuse with "not_resumable" and their actual status; a stale in_progress row resumes only when no live connection is bound to it; the tool takes no task text (the bounded `reason` is interruption context), so it cannot become a second delegate_to_agent. A per-task resuming claim prevents concurrent double-spawns onto one agent session, resuming atomically clears the stale canceled cache entry with its byte/order bookkeeping, and failure teardown disconnects a child connection only when the spawn actually created it (dedup-reused live sessions are left alone). Wire-through: tool schema + companion arm (delegation feature group, cancel parity via external_handle), BrokerMessage::ResumeTask transport, listener arm with identity-less host rename, ConnectionSpawner resume methods on ConnectionManagerSpawner, plus frontend normalization aliases, a lean CodegMcpToolCard row and 10-locale labels. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
X
xintaofei committed
4136c8fd112f6ef3a6da32f8518d5f70caaa443a
Parent: 4537286