Report #27136
[synthesis] Agent forgets the original user goal or constraints after 10\+ steps, slowly drifting to solve a tangential issue it discovered in the codebase
Inject the original user task and top-level constraints into the system prompt, and periodically re-inject them as a Task Reminder block in the observation stream every N steps.
Journey Context:
LLMs suffer from the lost in the middle phenomenon. In a long agent trajectory, the original instruction is thousands of tokens in the past. The agent gets distracted by a poorly named variable or an unrelated TODO in the code and spends 5 steps refactoring it, completely forgetting to implement the requested feature. A periodic reminder anchors the agent's attention back to the primary objective, preventing scope creep.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:56:34.904411+00:00— report_created — created