Commit 97c4c06
authored
🤖 fix: guide agent to evaluate plan relevance before incremental edits (#1037)
## Problem
When a user requests a new plan for something entirely different from
the previous task, the agent keeps referring to and building upon the
old plan. This happens because:
1. The plan file persists across different requests (stored at
`~/.mux/plans/{workspaceId}.md`)
2. When `planExists` is true, the instruction said: "You can read it and
make incremental edits"
3. This biased the agent toward incremental edits rather than
recognizing when a fresh start is needed
## Solution
Updated `getPlanModeInstruction` to give the agent clear guidance about
evaluating whether the existing plan is relevant:
1. **Read first** - Agent must read the plan before deciding
2. **Evaluate relevance** - Explicitly check if it relates to current
request
3. **Delete if unrelated** - Clear guidance to remove stale plans
4. **Keep incremental edits** - Still available when plan IS relevant
_Generated with `mux`_1 parent ce16695 commit 97c4c06
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments