GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — v2: restoring `todowrite` (#56947) left its prompt guidance behind, so models ignore it when enabled · Issue #59259 · anomalyco/opencode

v2: restoring todowrite (#56947) left its prompt guidance behind, so models ignore it when enabled #59259

New issue
Copy link
New issue
Copy link
Open
Open
v2: restoring todowrite (#56947) left its prompt guidance behind, so models ignore it when enabled#59259
Copy link

Description

@vazw
vazw
opened on Oct 26, 2026
Issue body actions

Description

With experimental.todo: true the todowrite tool is registered and callable, but models practically never call it. Enabling the flag is not enough: the only thing that mentions the tool is its own tool description, and nothing in the system prompt establishes that the agent should track tasks at all.

In practice a task with 3+ distinct steps produces zero todowrite calls until the user explicitly asks for a todo list.

opencode v2.1.4-local, verified on dev ed74ec82ce.

Reproduce

  1. Set experimental.todo: true.
  2. Give an agent a task with 3+ distinct steps ("add X, update the tests, run the checks").
  3. Observe: no todowrite call. The model just works through the steps. The tool description's own trigger — "Use it proactively when a task has 3 or more distinct steps" — never fires.

Root cause

The tool was restored without the prompt guidance that used to accompany it.

  • 7feefb697f refactor: remove todo tool (#35989) deleted the tool and the text that told models to use it: packages/core/src/session/runner/prompt/anthropic.txt (52 lines) and a 44-line packages/core/src/tool/todowrite.txt. The removed prompt text included:
    • "You have access to the todowrite tool to help you manage and plan tasks. Use it VERY frequently..."
    • "It is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks..."
  • 8f7db12b2a feat: restore the todowrite tool behind an experimental flag (#56947) restored the tool, a 7-line description, and the whole TUI/app surface. No prompt file appears in that diff.

Current state on dev:

  • packages/core/src/tool/plugin/todo.ts:50 gates registration on experimental.todo === true; :57 registers with codemode: false, so the model does see a native tool.
  • packages/core/src/tool/todowrite.txt is 7 lines / 512 bytes. Line 3 carries the only trigger anywhere.
  • packages/core/src/session/runner/prompt/system.txt — 0 occurrences of "todo".
  • Every provider template (anthropic, gpt, gpt-astra, kimi, meta, trinity) — 0 occurrences. v1's Anthropic task-management section did not survive into v2.
  • Nothing injects a reminder when the agent goes many steps without touching the list.

So the only instruction is a tool description competing with every other tool description, while everything else the harness cares about (shell usage, editing, response shape) is stated in system.txt. Models follow the system prompt; a description is advisory.

Prior attempts

  • Model completes tasks but doesn't mark todo items as completed #27560 (closed) — "Model completes tasks but doesn't mark todo items as completed".
  • fix(session): keep todo list current for non-Claude models #48729 (auto-closed 2026-09-13 by the compliance bot) — added task-management sections to the default/gpt/gpt-astra/gemini/kimi/codex/trinity prompts. Its body notes only anthropic.txt had guidance.
  • fix(todo): ensure models track and complete todos across all providers #54137 (closed by maintainer 2026-10-09) — same class of change. Closing reason: v1 dev only takes critical fixes and this is "a useful improvement" — the merit was not disputed.
  • TodoWrite's single in_progress instruction causes GPT-5.6 Sol to serialize concurrent tasks #44221 (closed) — description wording (exactly ONE in_progress) over-constraining GPT-5.6; closed as moot when the tool was removed.

All of these were against v1. v2 has the tool back and the guidance is still missing.

Proposed fix

Render the guidance conditionally, the way tool guidance already works:

  • packages/core/src/session/system-prompt.ts:9-27 already injects shell / write / edit bullets into ${OPENCODE_TOOL_GUIDANCE}.
  • Add a tools.includes("todowrite") branch with a short block: when the task has 3+ distinct steps, write the list first; keep one item in progress; mark items completed immediately instead of batching.
  • Nothing renders when the flag is off, so the prompt stays byte-identical for everyone who does not enable it.

I'm keeping the patch in my own fork for now and can open a PR if you want this upstream.

Reacted by AlexSilverLight and Nathan Brown

Activity

  1. opencode-agent commented on Oct 26, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 26, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for the detailed write-up and for tracing it back to #35989 and #56947.

    You're asking for the system prompt to include todo guidance when experimental.todo is enabled. It would sit in a conditional block in SessionSystemPrompt.render, like the existing shell/write/edit bullets, so nothing changes for anyone who leaves the flag off. Right now the tool is registered and callable as #56947 intended, and the only usage hint is in its tool description. So I'm filing this as a feature request rather than a bug. Maintainers will consider it, along with your offer to open a PR.

    Until then, you can get most of the effect by putting the same guidance in your AGENTS.md or in the config instructions. For example: "For tasks with 3+ distinct steps, call todowrite with the full plan before starting, keep one item in_progress, and mark items completed as soon as each is done."

    Related issues:

    • [Feature]: add todo support for v2 #42421: the open request for todo support in v2
    • feat: rename the experimental todowrite tool to todo #57481: a proposed rename of the tool to todo, closed without merging. If the rename comes back, the guidance check would need to use the new name
    • v2: the todowrite tool and its task list were dropped without a replacement #53587: the earlier v2 report about the todo tool being dropped
    • fix(todo): ensure models track and complete todos across all providers #54137, fix(session): keep todo list current for non-Claude models #48729, Model does not actively update todowrite list during task execution #28961, Model completes tasks but doesn't mark todo items as completed #27560: earlier v1 reports and attempts about the same prompt guidance
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.