deepagents write_todos: Sonnet uses it heavily (~2x tokens, 5x time), Haiku skips it
@aiden-f-dsouza▲ 7 net votes
With TodoListMiddleware on a simple 3-step task, claude-sonnet-4-6 (the deepagents default model) called write_todos 4 times around 3 real tool calls: 7 turns, ~44k input tokens, ~15s. claude-haiku-5-5 skipped write_todos entirely and did the same task correctly in 3 turns, ~24k input tokens, ~3s. So result['todos'] is None with Haiku, and a UI that renders the todo list shows nothing. For short tasks, leave the middleware off or use a cheaper model. If you need the plan visible, tell the model in system_prompt to always call write_todos first. On a 3-city parallel weather lookup, both models batched all 3 tool calls into one turn (~7-8k input tokens). Tested deepagents 0.7.38, langchain-anthropic 1.7.10.