Developers using AI coding tools like Claude Code or Codex often face 'AI brain fry,' a state of cognitive exhaustion caused by juggling dozens of concurrent threads and trying to maintain their respective contexts in mental RAM. Sergey Kuhne addresses this by replacing transient chat windows with a persistent, git-based priority queue that treats every task as a committed snapshot.

The Problem of Contextual Juggling

When working with AI agents, a single task can quickly branch into multiple follow-up clarifications and side tasks, each demanding its own workspace. This forces developers to hop between numerous threads, attempting to keep the specific requirements and progress of each active conversation in their heads simultaneously.

Kuhne describes this as a failure of focus where the brain becomes exhausted, making it difficult to remember where a task started or where it was supposed to finish. While common advice suggests taking breaks or limiting scope, Kuhne's approach focuses on restructuring the sequencing and context of the work itself.

“The ticket doesn't keep hanging in my memory as a thing to remember about. The context closes with it. So when I pick the next item from the queue, I can actually focus. One thing at a time.”

— How I'm fighting the AI Brain Fry — Sergey Kuhne

A Git-Based Priority Queue

The proposed workflow organizes work like a priority queue where the 'source of truth' lives in a git repository rather than a chat interface. Every ticket is a markdown file located next to the relevant code, and the state of the project board is maintained as a committed snapshot.

An agent works through this board in cycles, researching new tickets and building those tagged as 'safe' by a human. For sensitive code, the agent builds on a separate branch and requests permission before proceeding. Crucially, the agent never deploys to production, as that remains a human responsibility.

The Owner Inbox and Context Closing

To prevent the AI from making autonomous decisions on complex tradeoffs, the system routes items requiring human judgment to an 'owner inbox.' A script reads the entire board and presents a prioritized list of items waiting for a verdict, such as reviewing a specific change or answering a technical question.

The developer views these items through a single-page viewer—a Claude artifact rebuilt from git on every cycle. This allows the developer to see the entire board and a review page for each ticket without scrolling through terminal history. Once a verdict is given, it is committed back to git, and the developer 'closes' that context.

By closing the context of one item and putting it back into the queue, the developer can clear their mental RAM. This allows them to pick the next item from the queue and focus entirely on its specific requirements without the distraction of unfinished tasks hanging in their memory.

Technical Constraints and Trade-offs

The system is not a perfect solution and faces ongoing technical challenges. Kuhne notes that the primary difficulty lies in serving context quickly enough so that loading a ticket takes less than a minute, and preventing tickets from entering infinite loops when they are blocked by a human decision.

While the system significantly improves productivity by reducing distraction, it remains an exhausting process. The goal is to move from a state of being 'lost' in multiple threads to a structured flow where the developer only needs to hold one piece of context at a time.

What Hacker News readers are saying

  • Experience: One commenter who uses a similar setup noted that while keeping markdown files in a repository helps, they still experience burnout from repeatedly loading and dumping context for multiple simultaneous agents. comment ↗
  • Alternative: Another user suggested using GitHub issues as a management system, arguing that it provides a better UI and more tools for tracking the queue of tasks assigned to agents. comment ↗
  • Skeptical: Several commenters suggested that the issue might stem from attempting too much parallel work at once, noting that human cognitive capacity for multitasking remains a limitation regardless of the tools used. comment ↗
  • Alternative: One commenter recommended using LLMs as tools to check for errors or suggest better patterns rather than relying on them for primary code generation. comment ↗

Summarized opinions from the Hacker News thread, not verified facts. Read the full discussion ↗