agent: reorder working directory instruction (#17228)

This commit is contained in:
Parth Sareen
2026-07-16 19:05:30 -07:00
committed by GitHub
parent e61c1c73fe
commit 5865a01e48
+3 -3
View File
@@ -359,9 +359,6 @@ func agentDefaultSystemPromptWithWorkingDir(now time.Time, modelName string, wor
"Current date: " + date + ".",
"",
}
if workingDir != "" {
parts = append(parts, "Current working directory: "+strconv.Quote(workingDir)+".", "")
}
parts = append(parts,
"Be concise, practical, and action-oriented. Use tools when they materially help. Verify current or fast-changing facts with web tools when available; otherwise state uncertainty.",
"",
@@ -369,6 +366,9 @@ func agentDefaultSystemPromptWithWorkingDir(now time.Time, modelName string, wor
"",
"Tell the user about meaningful changes, verification, failures, blockers, assumptions, and risks. Summarize routine tool output instead of dumping it.",
)
if workingDir != "" {
parts = append(parts, "Current working directory: "+strconv.Quote(workingDir)+".")
}
return strings.Join(parts, "\n")
}