diff --git a/packages/coding-agent/src/prompts/system/auto-continue.md b/packages/coding-agent/src/prompts/system/auto-continue.md new file mode 100644 index 000000000..a68b9db67 --- /dev/null +++ b/packages/coding-agent/src/prompts/system/auto-continue.md @@ -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. diff --git a/packages/coding-agent/src/session/agent-session.ts b/packages/coding-agent/src/session/agent-session.ts index dfb352999..894ebcabf 100644 --- a/packages/coding-agent/src/session/agent-session.ts +++ b/packages/coding-agent/src/session/agent-session.ts @@ -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 }, ); };