You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support running a follow-up turn on the same task workspace (session reuse) #649
Follow-up from #643 (Step 3 of hack/hero-demo/run.sh).
Problem
Today each Task gets its own Substrate Actor and its own /workspace durable volume. As a result, creating a second Task with the same spec.sessionId cannot see edits made in Turn 1 or any persisted session state stored under /workspace/.ax/sessions/<sessionId> (as implemented for Antigravity in agentexecutor/images#25).
Because of this, hack/hero-demo/run.sh currently runs Turn 1 and verifies suspend/resume persistence, while leaving the second turn stubbed (STUB) in Step 3.
Goal
Support running a follow-up turn on the same task's workspace (reusing the same sessionId and persisted session state), and wire Turn 2 into hack/hero-demo/run.sh Step 3 once supported:
Allow a follow-up goal/turn to execute against the same task workspace and session state (including updating turn-completion tracking so a new goal runs rather than being skipped by Turn 1's /workspace/.ax/launcher-done marker).
Preserve workspace edits and session state under /workspace across turns and across suspend/resume.
Replace the Turn 2 mark_stub in hack/hero-demo/run.sh (and update hack/hero-demo/README.md) with an end-to-end Turn 2 check verifying both workspace continuity and session reuse.
How about just making the follow-up a 2nd run on the same Task, rather than a 2nd Task with the same sessionId? The Task already has the workspace and the session state, and sessionId can be shared by tasks that run in parallel.
Currently nothing can start that run -- after Turn 1 the Task is Completed and ax resume is rejected. I tried to reset a finished Task to runnable with a new goal, the runner ran the launcher again with the same workspace and session ID. launcher-done did not block it, since pull mode never writes it.
So I think what's missing is a server call that starts the next run with a new goal, for example ax run task <name> --goal "..."? @itssimrank does that fit the lifecycle, or should ax resume take a goal?
cc @rakyll
Nice digging Yongrui! I'd keep Task single-goal with COMPLETED terminal for v1alpha1, so a follow-up stays a new Task with the same sessionId. That's also how Studio models it: the new Task starts from the workspace snapshot and the Git refs that were pushed. The open part is unpushed edits and the agent's session files. @itssimrank@aprajitaarora13 could you sketch a couple of options here before we pick a direction?
Activity
yongruilin commentedon Nov 19, 2026
How about just making the follow-up a 2nd run on the same Task, rather than a 2nd Task with the same
sessionId? The Task already has the workspace and the session state, andsessionIdcan be shared by tasks that run in parallel.Currently nothing can start that run -- after Turn 1 the Task is
Completedandax resumeis rejected. I tried to reset a finished Task to runnable with a new goal, the runner ran the launcher again with the same workspace and session ID.launcher-donedid not block it, since pull mode never writes it.So I think what's missing is a server call that starts the next run with a new goal, for example
ax run task <name> --goal "..."? @itssimrank does that fit the lifecycle, or shouldax resumetake a goal?cc @rakyll
mayawang commentedon Nov 19, 2026
Nice digging Yongrui! I'd keep Task single-goal with COMPLETED terminal for v1alpha1, so a follow-up stays a new Task with the same sessionId. That's also how Studio models it: the new Task starts from the workspace snapshot and the Git refs that were pushed. The open part is unpushed edits and the agent's session files. @itssimrank @aprajitaarora13 could you sketch a couple of options here before we pick a direction?