Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

agent: reorder working directory instruction (#17228)

Parth Sareen5865a01e48cb
diff --git a/cmd/agent_tui.go b/cmd/agent_tui.go
index 4cf4a5ded..6d370d15b 100644
--- a/cmd/agent_tui.go
+++ b/cmd/agent_tui.go
@@ -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")
}