Skip to content

feat(tasks): re-dispatch resumes the prior transcript + jump from a session to its task (v0.320.0) - #585

Merged
vikasprogrammer merged 2 commits into
mainfrom
feat/task-resume
Aug 8, 2026
Merged

feat(tasks): re-dispatch resumes the prior transcript + jump from a session to its task (v0.320.0)#585
vikasprogrammer merged 2 commits into
mainfrom
feat/task-resume

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

Two related task changes.

1. A task re-dispatch RESUMES the prior transcript (not a fresh restart)

A task is the durable unit of work; a session is one attempt. Every other re-entry path — chat threads, DM replies, poke-back, self-schedule — already --resumes the prior transcript. Task re-dispatch was the lone exception: it spawned a fresh session with only a text summary of the last run's outcome (priorRuns), so a retried or reopened task re-derived everything it had already worked out (files read, decisions, half-done work).

dispatchTask now resumes the same transcript when the task's latest run was the same assignee agent and pinned one (TerminalManager.resumableTaskTranscript), seeded with a "continue, don't restart" prompt.

Bounded — the ladder you land on a failing task:

attempt 1: fresh (first run)
attempt 2: RESUME transcript
attempt 3: RESUME transcript
attempt 4: FRESH escape (2 resumes didn't close it → mint a new transcript)
attempt 5: TASK_MAX_ATTEMPTS → park blocked
  • MAX_TASK_RESUMES = 2 — after two resumes that don't close the task, start fresh to escape a wedged/looping transcript. A fresh run mints a new claude_session_id, so the streak resets and the last attempt before parking is a clean slate rather than a third reload of a poisoned context.
  • TASK_MAX_ATTEMPTS 3 → 4 so the escape-fresh attempt actually runs before the block. (Flagged: this nudges the global per-task retry budget by one.)
  • A changed assignee can't resume another agent's transcript → fresh.
  • Side benefit: because a resumed dispatch reuses the transcript id, retries now collapse into one conversation in the chain/cost view (cost = max) instead of N separate ones.

Pinned by scripts/task-resume-test.cjs (wired into test:governance) — 17 assertions covering the full ladder, the same-agent guard, and the escape minting a new transcript.

2. Jump from a session to its attached task

The session view couldn't reach the task it works — the edge only existed the other way (task room → its runs). The session facts row now shows a clickable task chip when the run has a task:/poke:/ask: provenance (Session.taskId, already stamped by listSessions' chainLinks), deep-linking to the board card via the same #/tasks/<id> route the inbox uses.

Verification

  • npm run build + cd web && npm run build + full npm run test:governance green (incl. the new task-resume test).

🤖 Generated with Claude Code

vikasprogrammer and others added 2 commits August 8, 2026 16:32
…of restarting

A task is the durable unit of work; a session is one attempt. Every other re-entry path (chat
threads, DM replies, poke-back, self-schedule) --resumes the prior transcript — task re-dispatch
was the lone exception, spawning a FRESH session with only a text summary of the last run's
outcome, so a retried/reopened task re-derived everything (files read, decisions, half-done work).

dispatchTask now resumes the SAME transcript when the task's latest run was the same assignee agent
and pinned one (resumableTaskTranscript), seeded with a "continue, don't restart" prompt. Bounded:
after MAX_TASK_RESUMES (2) resumes that still don't close it, it starts FRESH to escape a wedged
transcript — a fresh run mints a new claude_session_id, so the streak resets and the LAST attempt
before parking is a clean slate. TASK_MAX_ATTEMPTS 3→4 so the ladder (fresh → resume → resume →
fresh-escape → park) fits before the block. A changed assignee can't resume another agent's
transcript → fresh. Because a resumed dispatch reuses the transcript id, retries also collapse into
ONE conversation in the chain/cost view (cost = max) instead of N separate ones.

Pinned by scripts/task-resume-test.cjs (wired into test:governance), 17 assertions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The session view could not reach the task it was working — the edge only existed the other way
(task room → its runs). The session facts row now renders a clickable task chip when the run has a
task/poke/ask provenance (Session.taskId, already stamped by listSessions' chainLinks), deep-linking
to the board card via the same #/tasks/<id> route the inbox uses.

Also moves the v0.320.0 CHANGELOG heading in for the task-resume change shipped alongside.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vikasprogrammer
vikasprogrammer merged commit 0f3cd8f into main Aug 8, 2026
1 check passed
vikasprogrammer added a commit that referenced this pull request Aug 8, 2026
…1) (#589)

#588 branched off v0.319.0 and bumped to v0.319.1. #585 merged v0.320.0 in the
meantime, so #588's squash carried its own package.json back over it: main landed
on 0.319.1 with 0.320.0's code in it, and the CHANGELOG listed 0.319.1 above
0.320.0. The live instapods box then reported 0.319.1 while running both changes.

That matters because the sidebar/`/health` version is how we tell which build a
long-running server is holding in memory — the first thing checked when a change
"isn't taking". A version that moves backwards makes that check lie.

Renames the 0.319.1 heading to 0.320.1 (the patch on top of 0.320.0, which is what
the code actually is), bumps package.json to match, and updates the Step 0
reference in docs/insights-revisit.md. No code change.


Claude-Session: https://claude.ai/code/session_01AiTKjtdcF4ESbuYVWj2CfU

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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