Skip to content

hack/hero-demo: live steps hang because tasks never reach Completed since #688 #722

Done

Description

@rakyll

Summary

RUN_LIVE_STEPS=1 ./hack/hero-demo/run.sh no longer works on main. Steps 3, 4 and 5 hang until they time out, although the work inside the sandboxes finishes. The dry run (without RUN_LIVE_STEPS) still passes, so CI does not notice.

Root cause

#688 (2ede873, "push tasks to runners and remove the runner pull protocol") removed the path by which ax-server learned that a task's command had exited:

  • runner.Config.OnCommandExit (runner/runner.go) is never set by cmd/ax-runner, so the exit code is only logged.
  • Nothing in internal/server or internal/controller moves a task to TASK_STATE_COMPLETED (or to FAILED on a non-zero exit) any more, and status.outcome (exit code, output) is never filled in.
  • The all: push tasks to runners and remove the runner pull protocol #688 commit message acknowledges this: it removed TestE2E_PureImageLauncher and TestE2E_PrewarmAndCustomImageSharedWorkspace because "those tasks stay Working and both tests timed out".

finish_task in hack/hero-demo/run.sh (#671) waits for ax describe task to report Completed or Failed with Output:, so it never returns.

Reproduced on an ax local cluster at 775f5ad: the starter agent finished (it edited math_utils.py and wrote /workspace/.ax/output), and the runner logged task command completed successfully, but ax describe task hero-demo-starter-task still shows State: Working with no outcome.

Related problems found along the way

  1. launcher-done marker cannot be written. After a successful launcher run the runner logs:
    failed to record that the launcher finished path=/workspace/.ax/launcher-done error="open /workspace/.ax/launcher-done: permission denied"
    
    ax-runner runs as root without CAP_DAC_OVERRIDE in the sandbox, and /workspace/.ax is owned by UID 1000 with mode 0755 (ensureWritableForUser / chownTree). As a result, a resumed starter task re-runs its one-shot agent (launcherCommand in runner/launcher.go).
  2. Missing Gateway credential gives an unhelpful failure. On a fresh cluster without the hero-demo-gemini Secret, the agent gets 403 egress denied from the Gemini API and exits with empty output. The task still shows Working / Ready=True TaskRunning, so nothing tells the user that the run failed.

Activity

  1. self-assigned this
    on Nov 23, 2026
  2. added this to the v0.4.0 milestone on Nov 23, 2026
  3. added a commit that references this issue on Nov 24, 2026
    3779eeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions