Add resumable multi-step agent sessions

Merged
TH
3mo ago
+691-43

Summary

  • Add explicit resume = true support for multi-step tasks so a step can continue the previous step's native agent session instead of starting a fresh conversation.
  • Preserve the previous step's live /logs/agent state when the next step resumes, while still archiving a copy under the step output directory.
  • Reject first-step or missing-state resumes, fail cleanly for agents without native resume support, and document the task configuration behavior.

Fixes #1858.

Testing

  • uv --no-config run ruff check --fix .
  • uv --no-config run ruff format .
  • uv --no-config run ty check
  • uv --no-config run pytest tests/unit/models/test_task_config_toml.py tests/unit/test_multi_step_run_step.py tests/integration/test_multi_step_trial.py --maxfail=1
  • uv --no-config run pytest tests/unit/ --maxfail=1
  • npm_config_cache=/tmp/npm-cache npm exec --yes --package bun -- bun run build from docs/
  • Runtime Docker checks passed on a two-step resume = true recall task for codex, claude-code, and opencode.

Open in Devin Review