Skip to content

Resume and interrupt Codex sessions #395

Closed

Description

@JacobStephens2

Parent

#136

What to build

Codex sessions handle killed background work and interrupts the way Claude sessions do.

  • Killed background work. A Codex session can end its turn while a command it started is still running, which Codex then kills on exit. In the stream, that's a command_execution (or a sub-agent call) with item.started but no item.completed before the turn ends.
    • It's treated as killed background work, and the session gets its single Resume: codex exec resume <thread id> with the Resume prompt.
    • The Resume passes the Model, Effort, bypass flag and CLAUDE.md fallback again, since a Codex resume doesn't keep them.
    • As on Claude, a Resume that ends the same way gets no second Resume. The killed work is named in a progress line, and named in the cause if the Run then fails.
  • Interrupts. An interrupt sends a Codex session SIGINT first, which is the only signal Codex stops cleanly on. Then comes the existing SIGTERM and SIGKILL stop, and the Run ends as interrupted.

Acceptance criteria

  • A Codex session that leaves a command running gets one Resume through codex exec resume <thread id>, with the Model, Effort, bypass flag and CLAUDE.md fallback passed again.
  • A Resume that ends the same way doesn't get a second Resume. The Run carries on, and names the killed work in its cause if it then fails, as in the existing background-work tests.
  • A Resume counts against no Repair cap.
  • Interrupting a Run during a Codex session sends that session SIGINT before SIGTERM and SIGKILL, and the Run ends as interrupted.

Blocked by

Activity

  1. added
    ready-for-agent
    on Oct 5, 2026
  2. added a commit that references this issue on Oct 5, 2026
  3. JacobStephens2 commented on Oct 5, 2026

    @JacobStephens2
    OwnerAuthor

    Closed by #405, merged into issue-136 by a thirdshift Merge run.

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

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions