Repository navigation
fix(core): clarify Plan mode delegation - #56683
sayedrisat wants to merge 2 commits into
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
The new wording is a reasonable fix for #56674, but this PR breaks an existing test. I couldn't verify the behaviour change, because it depends on how real models read the reminder, and only a simulated model is available here.
packages/core/test/plugin/plan.test.ts still expects the old sentence: expect(persisted[0]).toContain("Do not modify any other files") around line 165. bun test test/plugin/plan.test.ts in packages/core now fails that test (11 pass, 1 fail). It passes on the base. Please update that assertion to match the new text.
Also, "read-only subagents" is vague: see the inline comment.
The public API is unchanged.
Related: #55814
| ${directory} | ||
|
|
||
| Do not modify any other files or ask a subagent to do so. | ||
| Do not modify files outside the Plan directory or delegate file modifications to a subagent. Read-only subagents may be used to explore the codebase. |
There was a problem hiding this comment.
"Read-only subagents" doesn't say which agents those are. Of the built-in agents, only explore is read-only; general can edit (see #55814), and nothing in the reminder lets the model tell them apart. Without a name, a model may pick general for "exploration" and then let it edit. Could the sentence name the agent directly, e.g. "You may use the explore subagent to research the codebase; do not delegate to subagents that can modify files (such as general)."?
Issue for this PR
Closes #56674
Type of change
What does this PR do?
Plan mode’s reminder now names the
exploresubagent as the read-only option for codebase research and warns thatgeneralcan modify files. The reminder test checks these instructions.How did you verify your code works?
git diff --checkpassed.Screenshots / recordings
Not a UI change.
Checklist