Repository navigation
fix(agent-core-v2): remind the agent to update its todo list less often - #4524
Conversation
- Wait 10 steps since the last TodoList write, and 10 steps since the previous reminder, before reminding again (was 5 and 5). - Drop "now" from the "mark it done" sentence and tell the agent that no update is needed while the list still matches its progress.
🦋 Changeset detectedLatest commit: 6c7429a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c7429a308
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const TODO_LIST_REMINDER_STEPS_SINCE_WRITE = 10; | ||
| const TODO_LIST_REMINDER_STEPS_BETWEEN_REMINDERS = 10; |
There was a problem hiding this comment.
Gate the reminder change on an escape hatch or explicit approval
For main-agent sessions with TodoList enabled, these unconditional constants remove reminders at steps 5–9 and double the repeat interval, with no way to restore the previous cadence. The reviewed commit explicitly says maintainer approval is still needed and leaves the corresponding approval checklist unchecked. Before merging, provide a config/env/flag escape hatch with coverage for the retained five-step behavior, or obtain explicit maintainer sign-off accepting its removal, as required by AGENTS.md.
AGENTS.md reference: AGENTS.md:L114-L116
Useful? React with 👍 / 👎.
MoonshotAI#4410 MoonshotAI#4413 MoonshotAI#4431 MoonshotAI#4450 MoonshotAI#4451 MoonshotAI#4485 MoonshotAI#4524 were each implemented earlier — the compaction prefix suite, the media-recovery case, the OAuth callback socket drain, the split delivering-work section, the compaction wording, the reasoning-key order and the 10-step todo reminder are all in the tree and pinned by their own tests. Each row now carries that probe. Only MoonshotAI#4410 needed care: upstream patched paths that this fork renamed (`human/llm/builtin/protocol` versus `human/llm/requester/bases`), so the matching was done on the behaviour — stripDynamicToolContext is gone and extractEventUsage already reads usage only on terminal response events. Ledger: closed 22 -> 28, remaining 71.
Requirement or Bug
todo 过期提醒太频繁:某一项正常要做十几步时,每 5 步就重复提醒一次,大多被模型忽略。
Bug Reproduction Steps
本地一个 26 步的回合里一共出现 4 次提醒,其中 2 次落在同一项正常进行的过程中,模型没有采纳。
Root Cause
这是对提醒节奏和措辞的调整,不是根本修复。
Code Changes
只改了
features/todo/todoListReminder.ts:计数单位仍是 assistant step,
todo_reminder_shown/todo_list_written里steps_since_write的口径不变。选 10/10 的依据:拿本地 49 个实际写过 TodoList 的会话(共 592 个 step),按真实的 step 与写入序列重放提醒条件:
前面那个 26 步的回合,提醒从 4 次降到 1 次。另一个常见 coding agent 的同类提醒也是 10 / 10,不过它按 content block 计数,折算到本仓库大约是 6 个 step。
Behavior Changes and Affected Users
影响人群:所有 TodoList 可用的主 agent 会话(TUI、print 模式、desktop 与 web、VS Code、ACP、SDK)。subagent 本来就不提醒。
不变:只在有未完成项时提醒;只提醒主 agent;提醒的其余句子和列表渲染;写入回显;工具描述和 system prompt;遥测事件与字段。
没有退路开关,需要维护者拍板。合入后看 #4239 定的主指标:
updated_in_turn = true的todo_turn_ended中open_count > 0所占比例;如果明显回升,说明降频过头了。测试覆盖:
test/features/todo/todoListReminder.test.ts:写入后 9 步不提醒、10 步提醒;距上次提醒 9 步不提醒、10 步再次提醒(stepsSinceLastWrite为 20);查询模式不算写入;新增的那句出现在文案里;全部完成和空列表时不提醒。test/features/todo/sessionTodo.test.ts:只在有未完成项时提醒、subagent 不提醒(都改为 10 步);todo_reminder_shown.steps_since_write为 10。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.