Feature Request: Automatic Session Checkpointing and Recovery for Interrupted Workflows

Open 💬 2 comments Opened Jun 14, 2026 by shubhamjrd4559-sudo

What variant of Codex are you using?

App, CLI

What feature would you like to see?

Summary

Introduce a persistent session recovery mechanism that allows users to resume interrupted Codex workflows after crashes, forced shutdowns, network failures, or agent execution stalls.

Problem

Long-running Codex sessions often contain valuable context, execution history, plans, and ongoing tasks. When a session is interrupted unexpectedly, users must manually reconstruct their workflow and restore context.

This impacts:

  • Multi-step refactoring
  • Large repository analysis
  • Long-running agent tasks
  • Complex debugging workflows

Proposed Solution

Implement automatic session checkpointing and recovery.

Automatic Checkpointing

Persist:

  • Conversation history
  • Task plan / todo state
  • Working directory metadata
  • Agent execution state
  • Model configuration
  • Pending tool operations

Session Recovery

On startup, detect interrupted sessions and offer:

Detected interrupted session

Repository: <repo>
Last checkpoint: <timestamp>

[Resume Session]
[Start New Session]

Failure Detection

Recovery should be triggered after:

  • Application crashes
  • Forced termination
  • System restart
  • Network interruption
  • Agent timeout/stall

Recovery Diagnostics

Provide structured recovery logs to simplify debugging and issue reporting.

Technical Considerations

  • SQLite-backed local persistence
  • Versioned checkpoint schema
  • Atomic checkpoint writes
  • Corruption detection and rollback
  • Local-only storage by default
  • Optional encrypted checkpoint storage

Benefits

  • Reduced context loss
  • Improved reliability
  • Better developer experience
  • Faster recovery from interruptions
  • Increased confidence in long-running Codex workflows

Related Context

This request is related to session continuity and workflow recovery, but differs from existing session-management requests because it focuses on persistence, checkpointing, and restoration of interrupted execution state rather than thread organization or navigation.

Additional information

A phased implementation could make adoption easier:

  • Phase 1: Local checkpoint storage and manual session resume.
  • Phase 2: Automatic crash detection and recovery prompts.
  • Phase 3: File-system drift detection to warn users when project files changed externally between checkpoint creation and recovery.

This feature would be particularly valuable for developers using Codex App and CLI on large repositories or multi-hour coding sessions.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗