From c9767afb6cf7e6e75c8f50e573a87fe05bce0ce0 Mon Sep 17 00:00:00 2001 From: sjd9021 Date: Sun, 15 Feb 2026 23:54:00 +0530 Subject: [PATCH] fix: don't skip exploratory prompt on bare sessions buildPrompt() now checks config.exploratory before returning null, ensuring exploratory sessions always receive EXPLORATORY_AGENT_PROMPT even when there's no issue, rules, or user prompt. Co-Authored-By: Claude Opus 4.6 --- packages/core/src/prompt-builder.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/prompt-builder.ts b/packages/core/src/prompt-builder.ts index 1455033a5..7b92a122e 100644 --- a/packages/core/src/prompt-builder.ts +++ b/packages/core/src/prompt-builder.ts @@ -167,7 +167,8 @@ export function buildPrompt(config: PromptBuildConfig): string | null { const hasUserPrompt = Boolean(config.userPrompt); // Nothing to compose — return null for backward compatibility - if (!hasIssue && !hasRules && !hasUserPrompt) { + // (but exploratory sessions always need the exploratory prompt) + if (!hasIssue && !hasRules && !hasUserPrompt && !config.exploratory) { return null; }