agent: wrap user prompts in <context> tags for rendering

This commit is contained in:
Levi Neely 2026-08-20 11:59:15 +02:00
parent 013a669e9d
commit c602238835
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ func (ag *Agent) executeTurn(ctx context.Context, input string) string {
// Prepend resolved user prompts (active global rules) to the user input.
if ag.runtime.UserPrompt != "" {
input = ag.runtime.UserPrompt + "\n\n" + input
input = "<context>\n" + ag.runtime.UserPrompt + "\n</context>\n\n" + input
}
ag.emit(Event{Role: "user", Content: input})