Skip to content

Commit 6bbcfbf

Browse files
committed
fix: plan-agent tool-use — warning copy covers refusal case too
Field test surfaced a second failure mode the prior warning misframed: when the planner refuses the request outright ("I'm sorry, but I cannot assist…" — observed on `altimate-default` for a benign "add a YOLO-mode toggle button" request), the trip-wire fires (plan + finish=stop + zero tools) but the previous copy told the user the model "produced a plan without first reading any files." It did not — it refused. Reword the warning to be accurate for **both** failure modes without pattern-matching refusal text (brittle, locale-specific): - describe the observed symptom only ("stopped without calling any tools") - enumerate three common causes (prompt-context plan / content-policy refusal / under-specified request) - offer three concrete recoveries (ask to investigate, rephrase, /model) The trip-wire condition is unchanged; only the synthetic text the user sees is updated. Telemetry event shape is unchanged. This builds on d21f9b1 and supersedes the warning copy from that commit.
1 parent d21f9b1 commit 6bbcfbf

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎packages/opencode/src/session/processor.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,12 @@ export namespace SessionProcessor {
382382
synthetic: true,
383383
text:
384384
`⚠️ altimate-code: the \`plan\` agent on \`${input.model.providerID}/${input.model.id}\` ` +
385-
`produced a plan without first reading any files. Plans written from prompt context alone ` +
386-
`often miss existing patterns and reference files that may not exist. To get an investigated ` +
387-
`plan, either reply asking it to explore the codebase first (\`read\`/\`grep\`/\`glob\`/\`explore\`), ` +
388-
`or use \`/model\` to switch to a model that is more eager to investigate before drafting ` +
389-
`(e.g. a Claude Sonnet/Opus tier).`,
385+
`stopped without calling any tools — it neither read, searched, nor explored the codebase. ` +
386+
`Common causes: (a) the model wrote a plan from prompt context alone, (b) the model declined ` +
387+
`to engage with the request (content-policy refusal), or (c) the request was too thin to act on. ` +
388+
`To recover, try one of: reply asking it to investigate first (\`read\`/\`grep\`/\`glob\`/\`explore\`); ` +
389+
`rephrase the request more concretely; or \`/model\` to a tier that's more eager to explore ` +
390+
`(e.g. Claude Sonnet/Opus).`,
390391
time: { start: Date.now(), end: Date.now() },
391392
})
392393
}

0 commit comments

Comments
 (0)