Menu

1 / 2

Your AI agent skips steps. Give it a todo list.

DEV Community: java·ByteChef·11 days ago
#eP2VfEt3
#devtojava#devto#dev#agent#tool
Reading 0:00
15s threshold

You give an agent a real job: "audit these ten endpoints, fix the auth bug in each, run the tests, write up what changed."

It starts well. Six endpoints fixed, some tests run, a tidy summary. The last four endpoints? Never touched.

No crash. No error. It just lost track.

If you've built anything agentic, you've seen this. Here's a small tool that fixes most of it, and how we run it in ByteChef , an open-source workflow automation and AI agent platform built on Java and Spring.

Why agents drop steps

Language models pay less attention to whatever sits in the middle of a long context. As an agent works, its context fills with tool calls and results, and the original plan drifts into that middle zone.

The Spring AI team covered this in their TodoWrite post and borrowed the fix from Claude Code: don't keep the plan in your head. Write it down as a checklist and keep it current.

The TodoWrite tool

TodoWriteTool lives in the spring-ai-agent-utils library. The model sees a tool called TodoWrite .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.