codex - 💡(How to fix) Fix Session-scoped active todo reminders for update_plan [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19749Fetched 2026-04-28 06:37:48
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4unlabeled ×1

Root Cause

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.

Code Example

cargo test -p codex-core todo_reminder
cargo test -p codex-core update_plan_
RAW_BUFFERClick to expand / collapse

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:

  • #2966 asks for TODO support for long-running tasks.
  • #18920 asks for the update_plan task list to remain visibly rendered in the TUI.

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.

extent analysis

TL;DR

Implementing the proposed behavior in the reference PR, which adds an active_todo_list to SessionState and updates the PlanHandler to store parsed update_plan arguments, should resolve the issue.

Guidance

  • Review the reference PR and its implementation details to understand how the proposed behavior is achieved.
  • Verify that the tests included in the reference PR cover all necessary scenarios, such as reminder formatting and restoring the latest unfinished update_plan from rollout history.
  • Consider the implications of adding a pending-reminder flag and how it affects the queuing and consumption of reminders.
  • Evaluate the approach of appending the reminder as an ephemeral developer message in run_sampling_request and its potential impact on the model's behavior.

Example

No code snippet is provided as the issue already includes a reference implementation in a fork PR.

Notes

The proposed solution relies on the reference PR, which may require further review and testing to ensure its correctness and compatibility with the existing codebase.

Recommendation

Apply the workaround by implementing the proposed behavior as described in the reference PR, as it provides a clear and well-structured approach to addressing the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Session-scoped active todo reminders for update_plan [1 participants]