fix(sdk): stop duplicating prompt in runPhaseStepSession user message (#2223)
runPhaseStepSession was passing the full prompt string as both the user-visible prompt: argument and as systemPrompt.append, sending the same (potentially large) text twice per invocation and doubling the token cost for every phase step session. runPlanSession correctly uses a short directive as the user message and reserves the full content for systemPrompt.append only. Apply the same pattern to runPhaseStepSession: use a brief "Execute this phase step: <step>" directive as the user message. Closes #2194 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -277,7 +277,7 @@ export async function runPhaseStepSession(
|
||||
const cwd = options?.cwd ?? process.cwd();
|
||||
|
||||
const queryStream = query({
|
||||
prompt: prompt,
|
||||
prompt: `Execute this phase step: ${phaseStep}`,
|
||||
options: {
|
||||
systemPrompt: {
|
||||
type: 'preset',
|
||||
|
||||
Reference in New Issue
Block a user