fix: append nag reminder instead of inserting at front (#142)

The reminder was inserted at index 0, placing a text block before
tool_result blocks in the user message content array. Use append
to keep the reminder at the end, consistent with message ordering.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
alsaberi
2026-03-29 07:45:47 -07:00
committed by GitHub
parent 0cb6f85805
commit 7eca7bc3db

View File

@@ -187,7 +187,7 @@ def agent_loop(messages: list):
used_todo = True
rounds_since_todo = 0 if used_todo else rounds_since_todo + 1
if rounds_since_todo >= 3:
results.insert(0, {"type": "text", "text": "<reminder>Update your todos.</reminder>"})
results.append({"type": "text", "text": "<reminder>Update your todos.</reminder>"})
messages.append({"role": "user", "content": results})