feat: allow users to clear context before implementing a plan

Resolved 💬 1 comment Opened Mar 22, 2026 by smartcmd Closed Mar 22, 2026

Commit: https://github.com/openai/codex/commit/236e5618fbaad3bef73741dd3a21f1cad0a421cd

TL;DR

This commit allows users to clear context before implementing a plan.

Details

Previously, plan execution assumed the plan was still available in the active session context. That broke down when the user wanted to clear context before implementation, because the plan was not available as a stable input for the new session. Persisting the finalized plan to .codex/PLAN.md gives the fresh session a durable source of truth.

To make that work, finalized Plan mode output is now persisted to .codex/PLAN.md, and the plan popup now includes a new action that clears the current context and starts implementation in a fresh
session.

What changed

  • Persist finalized plan output to .codex/PLAN.md. Overwrite the previous .codex/PLAN.md when a new finalized plan is produced
  • Add Yes, clear context then implement to the plan popup, which will start a fresh session seeded to read .codex/PLAN.md and implement it
  • Apply the same behavior in both tui and tui_app_server

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗