fix(coding-agent): stop anchoring auto-continue prompt on stale 'Next Steps'
The autoContinue post-compaction prompt echoed the summary's '## Next Steps' heading, but that section is generated only from the compacted tail; the kept ~20k recent tokens are not fed to the summarizer. When the user pivoted within the kept window, 'Continue if you have next steps.' anchored the model on the now-outdated plan instead of the latest intent. Move the prompt to prompts/system/auto-continue.md (per AGENTS.md no-inline-prompts rule) and rewrite it to direct the model to re-read the kept recent messages and follow the user's most recent request, explicitly allowing it to stop when nothing remains. Fixes #840
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Resume work on the user's most recent intent. Re-read the kept recent messages above the summary to confirm what the user asked for last; if their latest request supersedes earlier plans recorded in the summary, follow the latest request. If there is nothing left to do, say so briefly instead of inventing further work.
|
||||
@@ -121,6 +121,7 @@ import {
|
||||
import { getCurrentThemeName, theme } from "../modes/theme/theme";
|
||||
import type { PlanModeState } from "../plan-mode/state";
|
||||
import autoHandoffThresholdFocusPrompt from "../prompts/system/auto-handoff-threshold-focus.md" with { type: "text" };
|
||||
import autoContinuePrompt from "../prompts/system/auto-continue.md" with { type: "text" };
|
||||
import eagerTodoPrompt from "../prompts/system/eager-todo.md" with { type: "text" };
|
||||
import handoffDocumentPrompt from "../prompts/system/handoff-document.md" with { type: "text" };
|
||||
import ircIncomingTemplate from "../prompts/system/irc-incoming.md" with { type: "text" };
|
||||
@@ -1221,11 +1222,11 @@ export class AgentSession {
|
||||
await this.#promptWithMessage(
|
||||
{
|
||||
role: "developer",
|
||||
content: [{ type: "text", text: "Continue if you have next steps." }],
|
||||
content: [{ type: "text", text: autoContinuePrompt }],
|
||||
attribution: "agent",
|
||||
timestamp: Date.now(),
|
||||
},
|
||||
"Continue if you have next steps.",
|
||||
autoContinuePrompt,
|
||||
{ skipPostPromptRecoveryWait: true },
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user