Why LLMs Forget Your Instructions — And Why It Looks Exactly Like ADHD

TL;DR

A Reddit discussion in r/artificial is getting traction around a fascinating parallel: large language models forget instructions the same way ADHD brains do, and there’s actual research explaining why. The “Lost in the Middle” problem — where AI assistants like Claude drop earlier instructions during long sessions — isn’t a random glitch, it’s a structural feature of how these models process information. Understanding the neuroscience and ML research behind this could change how you prompt, how you build, and how you think about AI reliability. Tools like Agently are already trying to solve this at the enterprise level.


What the Sources Say

There’s a Reddit thread in r/artificial that’s quietly striking a nerve. Posted under the title “LLMs forget instructions the same way ADHD brains do. The research on why is fascinating,” it’s generated 40 comments and a score of 47 — modest numbers by Reddit standards, but the quality of the conversation matters more than the vote count here. The topic hit a nerve because it puts language on something that every power user of AI tools has experienced but struggled to articulate.

If you’ve ever spent an hour in a Claude coding session, carefully setting up your constraints — “always use TypeScript, never use var, keep functions under 20 lines” — only to find the model casually ignoring those rules by message thirty, you’ve run into this problem firsthand. The community has a name for it: the “Lost in the Middle” problem.

The parallel to ADHD is more than a cute metaphor. According to the Reddit discussion, researchers have identified that both ADHD brains and LLMs share a structural challenge with working memory and attentional prioritization. In ADHD, the prefrontal cortex struggles to maintain and prioritize task-relevant information against competing inputs. The brain isn’t ignoring the instructions — it’s failing to keep them sufficiently “activated” as new information floods in.

LLMs operate on a similar principle. Transformer architectures use attention mechanisms to decide what’s relevant at any given moment. When a context window fills up, earlier tokens — including your carefully crafted system prompt or early instructions — don’t disappear, but they compete with everything else for attention weight. In long sessions, the model’s attention naturally drifts toward what’s recent and nearby, which is why that instruction you set in message one is effectively drowned out by message thirty.

The Reddit community’s reaction is telling. Many commenters recognized the experience immediately, particularly in coding contexts where continuity matters most. Others pushed back, arguing the analogy oversimplifies both ADHD and ML architecture — a fair critique, but one that doesn’t invalidate the practical insight. Whether the neuroscience maps perfectly to transformer math or not, the behavioral outcome is functionally identical: important context gets lost, and the system keeps running as if it didn’t.

What makes this discussion interesting isn’t just the “aha” moment of the comparison — it’s the implication that solutions designed for one domain might inform the other. ADHD management strategies like externalized reminders, chunked tasks, and frequent context resets have direct analogues in prompt engineering best practices. Coincidence? Maybe. But the Reddit thread suggests the research community is starting to take this cross-domain lens seriously.


The “Lost in the Middle” Problem in Practice

The competitor notes in the source data specifically call out Claude as an AI assistant where users observe the “Lost in the Middle” problem in long coding sessions. This isn’t a knock on Claude specifically — it’s a property of virtually all large language models with long context windows. Longer context is generally better, but it introduces this attention dilution effect.

Here’s how it plays out in a typical workflow:

Session start: You give the model your full context — tech stack, style preferences, what you’re building, constraints you want respected.

Mid-session: The model is performing well. It remembers the constraints. Responses feel coherent.

Late-session: You ask it to add a new feature. It reaches back for guidance… and what it grabs is the most recent, nearby information — not your original setup. It writes JavaScript when you asked for TypeScript. It uses a library you explicitly said to avoid. It’s not being defiant. It’s lost the thread.

This is the real cost of the problem. It’s not just annoying — in enterprise contexts, it’s a reliability issue. Code review cycles get longer because you’re catching AI drift rather than logic errors. Developers start adding reminder prompts mid-session (“remember, we’re using TypeScript only”) — essentially treating the AI like a colleague with attention issues who needs periodic re-briefing.


Pricing & Alternatives

The source package mentions two tools in this space, though pricing details aren’t available for either.

ToolDescriptionBest ForPricing
Claude (Anthropic)General-purpose AI assistant; commonly used in long coding sessionsIndividual developers, general coding workNot specified
AgentlyEnterprise-focused framework for managing agentic workflows; described as “Cursor for enterprises”Enterprise teams running multi-step AI agentsNot specified

Agently’s positioning is worth unpacking. Being described as “Cursor for enterprises” places it in a specific niche: not just an AI assistant you chat with, but a structured environment for orchestrating AI agents across complex workflows. The “Lost in the Middle” problem is particularly acute for agentic systems — when an AI agent is executing a multi-step task autonomously, losing track of its initial constraints partway through isn’t just annoying, it can produce genuinely broken outputs that are hard to audit.

An enterprise-grade framework that manages agentic workflows would presumably need to solve instruction persistence as a core feature, not an afterthought. Whether Agently does this explicitly isn’t stated in the source, but it’s a logical inference from the problem space it’s targeting.

For pricing on either tool, you’d need to check their respective sites directly — the research package doesn’t include current figures.


What You Can Actually Do About It

The Reddit discussion, while focused on the “why,” implicitly points toward practical mitigations. The ADHD analogy is useful here too — because ADHD management isn’t about “fixing” the brain, it’s about designing systems that work with how attention actually functions.

For individual users:

The most reliable mitigation is periodic context reinforcement. If you’re in a long coding session, restate your key constraints every 10-15 messages. Yes, it feels redundant. So does a sticky note on your monitor — and yet.

Chunked sessions also help. Rather than one 50-message mega-session, break work into smaller, focused sessions with clear handoffs. Start each session with a compact summary of the constraints that must persist.

System prompts designed for drift are another approach. Instead of stating constraints once at the top, some users report success with prompts that include internal reminders — essentially building the “remember you’re doing X” instruction into the system prompt itself.

For teams and enterprise contexts:

This is where structured frameworks become more relevant. The “Lost in the Middle” problem scales badly in agentic systems, because a single forgotten constraint can propagate through multiple downstream steps before anyone notices. Frameworks that maintain explicit state separate from the context window — rather than relying on the model to “remember” everything in-context — address the architectural root cause rather than papering over it.


The Bottom Line: Who Should Care?

Developers in long coding sessions should care immediately. If you’ve noticed your AI assistant getting sloppier as a session progresses, this is why, and there are practical workarounds that don’t require waiting for better models.

Prompt engineers and AI power users should care because the ADHD research lens offers a genuinely fresh framework for thinking about instruction persistence. The solutions that work in one domain — externalized memory, chunked tasks, frequent resets — translate surprisingly well.

Enterprise teams building with AI agents should care most of all. In agentic workflows, instruction drift isn’t a UX annoyance — it’s a correctness problem. If your agent is running 30-step workflows and losing its initial constraints halfway through, you need either architectural solutions (explicit state management outside the context window) or tooling like Agently that’s designed for this operating mode.

Researchers and AI curious will find the cross-domain parallel genuinely interesting. The idea that ADHD neuroscience and transformer attention mechanics share enough structure to generate mutual insights is the kind of interdisciplinary connection that tends to be generative. Whether or not the analogy holds up rigorously under scrutiny, it’s a useful thinking tool — and apparently the research community is engaged enough that a Reddit post about it is getting real discussion.

The “Lost in the Middle” problem isn’t going away anytime soon. Longer context windows help but don’t solve it — attention dilution is a function of how transformers work, not just how long they are. The right response is to understand it, design around it, and use frameworks and workflows that don’t assume perfect instruction recall over long horizons.

That’s not a limitation unique to AI. It’s a constraint that humans with and without ADHD navigate every day. The fact that our AI tools share it is, depending on your perspective, either humbling or kind of fascinating.


Sources