Skip to content

Commit 7eca7bc

Browse files
alsabericlaude
andauthored
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>
1 parent 0cb6f85 commit 7eca7bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

agents/s03_todo_write.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def agent_loop(messages: list):
187187
used_todo = True
188188
rounds_since_todo = 0 if used_todo else rounds_since_todo + 1
189189
if rounds_since_todo >= 3:
190-
results.insert(0, {"type": "text", "text": "<reminder>Update your todos.</reminder>"})
190+
results.append({"type": "text", "text": "<reminder>Update your todos.</reminder>"})
191191
messages.append({"role": "user", "content": results})
192192

193193

0 commit comments

Comments
 (0)