Skip to content

Session-scoped active todo reminders for update_plan #19749

Closed as not planned
Closed as not planned

Description

@toddwyl

What variant of Codex are you using?

CLI / App core session engine (codex-core)

What feature would you like to see?

I would like update_plan to maintain a session-scoped active todo list and use it to remind the model at task-continuation boundaries.

Since external PRs are not currently accepted for this repository, I opened this issue with a reference implementation in a fork PR:

Problem

update_plan is already useful as a structured TODO/checklist tool that clients can render, but the core session does not currently treat the latest unfinished plan as active execution state.

In practice this creates a few gaps:

  • The UI can receive and render a PlanUpdate, but the model still relies on normal transcript context to remember the checklist later.
  • A later user turn such as "continue" may not reliably steer the model back to the unfinished in_progress / pending items.
  • A resumed session can restore transcript history, but there is no explicit active todo state recovered from the latest unfinished update_plan call.
  • A naive reminder on every model request would be too noisy, especially during tool continuations and retries.

The intended behavior is closer to Claude Code's TodoWrite-style workflow: the todo list is not just UI decoration; it is active session state that helps prevent task drift during long-running work.

Proposed behavior

When update_plan has unfinished items, Codex should keep that plan as the session's active todo list and remind the model only when that reminder is useful:

  • after update_plan updates the active todo list
  • at the beginning of a later user turn while unfinished todos exist
  • after resume restores an unfinished todo list from history

The reminder should be one-shot: once it is injected into the next sampling request, it should be consumed so the same todo list is not repeated on every model request or tool continuation.

If update_plan is empty or every item is completed, the active todo list should be cleared.

Reference implementation

The fork PR implements the behavior as follows:

  • Adds active_todo_list to SessionState.
  • Updates PlanHandler so parsed update_plan arguments are stored in session state before the existing PlanUpdate event is emitted.
  • Clears active todo state when the plan is empty or all steps are completed.
  • Adds a pending-reminder flag so reminders are queued and consumed once.
  • Queues reminders after update_plan, on new user turns with active todos, and after resume restores active todos.
  • Appends the reminder as an ephemeral developer message in run_sampling_request only when a reminder is pending.
  • Restores active todos on resume by scanning rollout items for the latest unfinished update_plan function call.

The reference PR uses the name active_todo_list rather than latest_todo_list because the state represents the current unfinished checklist, not just the most recent plan payload.

Verification in the reference PR

The fork PR includes tests covering:

  • reminder formatting
  • skipping empty / completed todo lists
  • restoring the latest unfinished update_plan from rollout history
  • storing and clearing active todo state through the update_plan handler
  • injecting and consuming the reminder in model request construction

Commands run locally:

cargo test -p codex-core todo_reminder
cargo test -p codex-core update_plan_

Related issues

This appears related to, but narrower than, these existing issues:

This issue is specifically about the core session/model-reminder behavior: preserving the unfinished update_plan checklist as active execution state and injecting a bounded reminder to reduce task drift.

Activity

  1. added
    enhancement
    CLI
    session
    plan
    on Apr 27, 2026
  2. removed
    CLI
    on Apr 27, 2026
  3. etraut-openai commented on Jul 1, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received enough upvotes, so it is being closed automatically. If you still feel this feature is needed, please open a new feature request with an updated title and description.

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

    enhancementplansession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions