Skip to content

feat: workdir snapshot on timeout + resume-task (Codex checkpoint/rollback parity) #360

Done

Description

@dahai80

Problem

4/20 harness-gain failures (T05/T13/T14/T17) are 600 s timeout kills, and the work tree is discarded at kill time. The medium tier already shows tasks resolving AT the cap (T10/T11/T12: timedOut=true but verify passes on the final tree), so timed-out trees are often near-green — we throw away nearly-done work.

Parity check vs the Codex agent-harness post: fusion-code has /checkpoint (bookkeeping only: a name-to-git-ref log, no snapshot, no restore, degrades to no-op outside git) and /resume (transcript-level). Missing: automatic state capture on abnormal exit + a restore surface that works outside git repos.

Proposal (harness-side only, no engine dependency)

  1. Auto-snapshot on timeout/kill: reuse the BENCH_DRA tar mechanism — tar the workdir next to the transcript instead of rmSync on the timeout path.
  2. --resume-task <snapshot.tar>: extract to a fresh workdir, re-enter the agent loop with a compacted prior-transcript summary injected as first-turn context.
  3. File-level rollback from the snapshot diff (git-free, so bench workdirs and temp projects are covered).

Success criteria

  • A timed-out task's tree survives the kill and can be resumed into a run that verifies green.
  • Bench: BENCH_RESUME=1 mode reruns only timeout-killed tasks from their snapshots and reports recovered/total.
  • /checkpoint gains restore (file-level) or the issue documents why it stays log-only.

Design notes: code-research/docs/competitor-scan-2026-11-25.md addendum 2026-11-27.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions