Skip to content

Support running a follow-up turn on the same task workspace (session reuse) #649

Open

Description

@aprajitaarora13

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.

Activity

  1. added
    bug-bash
    on Nov 19, 2026
  2. yongruilin commented on Nov 19, 2026

    @yongruilin
    Collaborator

    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

  3. mayawang commented on Nov 19, 2026

    @mayawang
    Collaborator

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-bash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions