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 <noreply@anthropic.com>
This commit is contained in:
sjd9021 2026-02-15 23:54:00 +05:30
parent 6cf888653a
commit c9767afb6c
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}