revert: remove post-iteration system prompt rebuild
Show the actual prompt sent to the LLM (messages[0].Content), not a rebuilt version. The pre-iteration capture is the ground truth. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e824ce8945
commit
4f0384212d
1 changed files with 0 additions and 7 deletions
|
|
@ -926,13 +926,6 @@ func (al *AgentLoop) runAgentLoop(ctx context.Context, agent *AgentInstance, opt
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5-post. Refresh cached system prompt: tool execution may have updated touch_dir,
|
|
||||||
// so rebuild with current workDir so Mini App shows the up-to-date version.
|
|
||||||
if active := al.sessions.ListActive(); len(active) > 0 && active[0].SessionKey == opts.SessionKey && active[0].TouchDir != "" {
|
|
||||||
agent.ContextBuilder.SetWorkDir(filepath.Join(agent.Workspace, active[0].TouchDir))
|
|
||||||
}
|
|
||||||
al.lastSystemPrompt.Store(agent.ContextBuilder.BuildSystemPrompt())
|
|
||||||
|
|
||||||
// 5a. Auto-advance plan phases after LLM iteration
|
// 5a. Auto-advance plan phases after LLM iteration
|
||||||
postStatus := agent.ContextBuilder.GetPlanStatus()
|
postStatus := agent.ContextBuilder.GetPlanStatus()
|
||||||
if agent.ContextBuilder.HasActivePlan() && (postStatus == "executing" || postStatus == "review" || postStatus == "completed") {
|
if agent.ContextBuilder.HasActivePlan() && (postStatus == "executing" || postStatus == "review" || postStatus == "completed") {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue