From 7eca7bc3dbdb29588c1cc55fb4dfb6b28784cfea Mon Sep 17 00:00:00 2001 From: alsaberi <115580105+alsaberi@users.noreply.github.com> Date: Sun, 29 Mar 2026 07:45:47 -0700 Subject: [PATCH] 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 --- agents/s03_todo_write.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/s03_todo_write.py b/agents/s03_todo_write.py index af0109c..13ecbf7 100644 --- a/agents/s03_todo_write.py +++ b/agents/s03_todo_write.py @@ -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": "Update your todos."}) + results.append({"type": "text", "text": "Update your todos."}) messages.append({"role": "user", "content": results})