Skip to content

fix(plan): Show Plan item ids to the model as TODO-<n> - #3852

Merged
BYK merged 2 commits into
mainfrom
fix/plan-item-todo-refs
Nov 20, 2026
Merged

BYK merged 2 commits into
mainfrom
fix/plan-item-todo-refs

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

In a long design conversation, Junior wrote its own Plan item ids in replies as #1914, #3211 and #2673. Readers took them for getsentry/junior PRs. One of them, #3211, is a real and unrelated PR. Plan ids are global numbers, and the plan blocks rendered them as - #<id> (...), so the model copied the GitHub #N form.

Two fixes:

  • Model-facing ids are now TODO-<n>. updatePlan and listAgents results, removed_ids, replaced_person_changes, and the <plan> and <plan-delta> blocks render TODO-12. updatePlan accepts only that form, so a bare 12 or #12 fails with a hint. Storage, the REST API, and the dashboard keep numeric ids.
  • Planning rule: Plan item ids are only for updatePlan. Do not write them in a reply, a PR, an issue, or a message to a person. Name the work instead.

via @BYK.

--

View Session [Sentry]

Bare plan ids rendered as #1914 read as GitHub PR numbers, and Junior
wrote them in replies as if they were PRs. Tool results and plan blocks
now use TODO-<n>, updatePlan accepts only that form, and the planning
rules keep the ids out of replies.

Co-Authored-By: BYK <[email protected]>
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 20, 2026 9:30am UTC

Request Review

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 20, 2026 09:23
@sentry-junior
sentry-junior Bot requested a review from BYK November 20, 2026 09:23
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 20, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2126ed0. Configure here.

@BYK
BYK merged commit 77d4d4c into main Nov 20, 2026
58 of 60 checks passed
@BYK
BYK deleted the fix/plan-item-todo-refs branch November 20, 2026 09:50
BYK pushed a commit that referenced this pull request Nov 20, 2026
#3852 (merged 2026-11-20 09:50:55 UTC) changed Plan item
ids in model-read text from `#<n>` to `TODO-<n>`. #3771
(merged 2026-11-20 19:24:08 UTC) was written before that change and
expects the old `#<n>` format for the open plan items review.

This changes that expectation to `TODO-<n>`, the format the rest of the
file already uses.

<!-- junior-request-attribution:start -->
via **andrew**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3Ae1b013079cd0f736421b3bbf -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3Ae1b013079cd0f736421b3bbf)
[[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Ae1b013079cd0f736421b3bbf/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: andrew <[email protected]>
BYK added a commit that referenced this pull request Nov 21, 2026
Junior's Plan is used as a to-do list, but it has five statuses and a
one-in-progress-per-assignee rule. `pending` and `blocked` both mean the
work is still open, and the rule makes the agent shuffle statuses before
it can start a second item. This PR makes it a To-do list with four
statuses and renames Plan and Plan item to **To-do** everywhere, in one
hard cutover.

- **Statuses:** `open`, `in_progress`, `done`, `dropped`. Migration
`0143_todos` renames the table, sequence, and constraints (data stays),
keeps `in_progress`, maps `pending`/`blocked` to `open` and `cancelled`
to `dropped`, and drops the one-in-progress-per-assignee unique index.
- **Tool:** `updateTodos` replaces `updatePlan`, with the same add,
update, remove, delta, and `replaced_person_changes`. The model sees and
passes To-do ids as `TODO-<n>` (from #3852); storage, the REST API, and
the dashboard keep numeric ids.
- **Prompt:** `<todos>` and `<todo-delta>` replace `<plan>` and
`<plan-delta>`. The rules section is `<todo-policy>`. It asks the agent
to set `in_progress` when work starts and `done` or `dropped` in the
Turn that the work ends, and to keep `TODO-<n>` ids out of replies.
- **Stale To-do review (from #3771):** when history has not shown the
To-dos for 3 inputs (no successful `updateTodos` result, no `<todos>`,
no `<todo-delta>`), the next Turn context gets a `<todos>` block with
every open To-do: "These To-dos are still open. Close each one whose
work ended." The Turn-context field is `todos`; a `<todo-delta>` wins
over a review.
- **API and dashboard:** `/api/conversations/:id/todos` replaces
`/plan`. The card is "To-dos", with Start / Mark done / Stop / Drop /
Reopen.

**What breaks:** code from before this PR cannot read the renamed table,
so roll forward instead of rolling back the deploy. The `/plan` routes
are gone; only the dashboard used them.

| | Desktop | Mobile |
| --- | --- | --- |
| Light | ![To-dos, light,
desktop](https://junior-prod.sentry.dev/public/artifacts/4f6f1548-969f-4626-af73-61d4b1dda788.png)
| ![To-dos, light,
mobile](https://junior-prod.sentry.dev/public/artifacts/16d16e17-3da2-49dc-a1e2-07df3cf6081f.png)
|
| Dark | ![To-dos, dark,
desktop](https://junior-prod.sentry.dev/public/artifacts/926a3522-824d-4906-8436-73005551faf4.png)
| ![To-dos, dark,
mobile](https://junior-prod.sentry.dev/public/artifacts/93796c24-4780-42b8-a2a0-fab5ab219ec2.png)
|

Status menu on an in-progress To-do:

![To-do status menu, dark,
desktop](https://junior-prod.sentry.dev/public/artifacts/4ad55aca-826d-48e7-83d0-72a4e6f13efd.png)

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Ab532e61f522b672af8b9e6e0d710a06f -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Ab532e61f522b672af8b9e6e0d710a06f)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab532e61f522b672af8b9e6e0d710a06f/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 71c5dc96 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant