Repository navigation
Add session-scoped todo reminders - #1
Merged
Merged
Conversation
toddwyl
force-pushed
the
codex/session-todo-reminder
branch
from
April 24, 2026 04:06
8e790d3 to
f1c20d7
Compare
toddwyl
force-pushed
the
codex/session-todo-reminder
branch
from
April 24, 2026 06:31
f1c20d7 to
3542eb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Codex exposes
update_planas a TODO/checklist tool that clients can render, but core did not keep an active TODO list in session state. That meant later sampling requests had to rely on whatever remained visible in transcript context, and resumed sessions could lose the latest unfinished checklist as executable state.The goal of this change is to make
update_planbehave more like an active session checklist: the UI still receivesPlanUpdate, while core also remembers unfinished work and can remind the model at the moments where task drift is most likely. The reminder is intentionally one-shot so tool continuations do not receive the same TODO reminder on every model request.What changed
update_planpayload in session state asactive_todo_list.update_planis empty or every step iscompleted.update_plancall.update_plan, at the start of a later user turn with active todos, and after resume restores active todos.How it works
PlanHandlernow parsesupdate_planarguments once, stores them on theSession, and still emits the samePlanUpdateevent for clients.SessionStateowns the active TODO payload plus a pending-reminder flag.run_turnqueues a reminder when a real user turn starts, andrun_sampling_requestappends the reminder as an ephemeral developer message only when that flag is pending.For resumed sessions, initial history restoration asks
todo_reminderto recover the last unfinishedupdate_planfrom rollout items. Completed-only plans are ignored so old finished work does not come back after resume.Verification
cargo test -p codex-core todo_remindercargo test -p codex-core update_plan_Documentation
No user-facing documentation update is needed. This is internal behavior for existing
update_planhandling.