Repository navigation
fix(opencode): recognize todowrite in V2 mapping when experimental.todo is enabled (#2701) - #2719
Open
Aniketchavan7 wants to merge 1 commit into
Open
Aniketchavan7 wants to merge 1 commit into
Aniketchavan7 wants to merge 1 commit into
Conversation
…al.todo is enabled (obra#2701) In OpenCode v2.x, todowrite is available when experimental.todo: true is configured. Previously, the V2 tool mapping asserted that V2 had no todo tool, causing models to distrust the available tool or emit unparseable pseudo-tool text. Update the V2 mapping, documentation, and bootstrap tests to teach todowrite usage when available while retaining markdown tracking fallback. Closes obra#2701 Co-authored-by: yalongwastaken <yalongwastaken@users.noreply.github.com>
danishkumar26
left a comment
There was a problem hiding this comment.
Code review of #2719 — fix(opencode): recognize todowrite in V2 mapping when experimental.todo is enabled (#2701) (by Aniketchavan7)
What this change does:
- Rewrites the OpenCode V2 tool mapping in .opencode/INSTALL.md, .opencode/plugins/superpowers.js and docs/README.opencode.md: V2's todo tool is todowrite, available only when experimental.todo: true is set in opencode.json, taking {content, status} items. Previously the docs said V2 has no todo tool.
- tests/opencode/test-bootstrap-caching.mjs: replaces mapsV2NoTodoTool with mapsV2TodoTool, drops todowrite from the stale-V1-tools check, and updates the asserted needles.
Findings:
- Internally consistent. All four files say the same thing about todowrite and experimental.todo, and the test assertions match the doc text.
- Unverifiable external claim. Whether OpenCode V2 really exposes todowrite behind experimental.todo depends on the OpenCode 2.0.4/2.0.7 host contracts cited in the docs; I can't check that here. If the contract differs, the mapping teaches a tool that does not exist — the one real risk, and it sits outside this repo.
Verdict: Ship, with the caveat noted in finding 2.
Verification context: this repo has no CI workflows in this clone and no node_modules installed, so I could not run tests or CI here. Review is based on reading the full diff.
3 of 5 tasks
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.
Resolves #2701
Summary
In OpenCode v2.x, the \ odowrite\ tool exists and is exposed when \�xperimental.todo: true\ is configured in \opencode.json\ (per OpenCode Todo Docs).
Previously, \V2_MAPPING\ asserted:
- Create or update todos → OpenCode v2 has no todo tool; track the plan in a markdown file (or the harness's plan facility) instead\
As reported in #2701, this caused models to distrust or ignore the native \ odowrite\ tool present in their tool list and drift into hallucinatory pseudo-tool syntax.
Changes
Co-authored-by: yalongwastaken yalongwastaken@users.noreply.github.com