
Key points
- Work items are stored as markdown files in git, ensuring state persists even if terminal sessions fail.
- Agents process tickets in cycles, handling safe builds and tests while deferring production deployments to humans.
- A dedicated inbox aggregates decisions, presented via a Claude artifact view that mirrors the git repository.
A blog post by Sergey Kuhne outlines a workflow that uses git as a priority queue to manage interactions with terminal-based AI agents like Claude Code or Codex. This approach addresses the cognitive exhaustion caused by juggling multiple concurrent agent threads.This workflow uses standard version control tools to organize and save the progress of AI coding assistants.The author proposes a git-native state machine for agent orchestration, decoupling execution context from ephemeral terminal sessions.
The evidence
Kuhne describes starting a task with an AI agent, only to initiate another while waiting for a reply. The first response often requires clarification, follow-ups, and side tasks, each demanding its own terminal tab. As replies arrive, the developer hops between twenty threads, attempting to hold all contexts in working memory. This juggling leads to mental fatigue, loss of focus, and confusion about task origins and endpoints.
The decision
To solve sequencing and context problems, Kuhne organized work into a priority queue stored in git. Each ticket is a markdown file located next to the relevant code in the repository. The board’s state exists as a committed snapshot, meaning no critical information resides in ephemeral chat windows or human memory. If a session dies, the queue remains intact.
The takeaway
An agent processes this board in cycles, researching new tickets and building items tagged as safe by a human. It runs tests and browser checks, then verifies deployed code. For sensitive code changes, the agent builds on a branch and requests permission first. It never deploys to production, a step reserved for the human developer.
Building on this
Developers can replicate this by treating git commits as the single source of truth for agent state. The system requires a script to read the board and populate an "owner inbox" with items needing human judgment, such as trade-off rulings or change reviews. A Claude artifact serves as the reading surface, rebuilding from git each cycle to mirror the board and individual ticket reviews. This allows developers to load context for one item, make a decision, and close it, preventing mental carryover to the next task.
Why it matters
- Storing task state in git provides durability against session crashes, a common failure mode for terminal-based agents.
- Separating agent execution from production deployment creates a mandatory human checkpoint for sensitive code changes.
- Using a generated artifact view reduces the need to scroll through terminal history to reconstruct agent actions.
- The workflow explicitly limits agent autonomy to "safe" builds, requiring human tagging for execution permissions.
Topics: AI agents, git, developer tools, workflow, Claude Code
Updated
Then / now / next
Developers juggled multiple terminal threads, losing context and focus as AI agents required concurrent attention.
Work is organized into a git-based priority queue with a dedicated inbox for human decisions.
It remains unclear whether this manual queue management scales for larger teams or complex dependencies.
Story timeline
- Then Developers juggled multiple terminal threads, losing context and focus as AI agents required concurrent attention.
- 08 Nov 2026 How I'm fighting the AI brain fry
- Now Work is organized into a git-based priority queue with a dedicated inbox for human decisions.
- Next It remains unclear whether this manual queue management scales for larger teams or complex dependencies.
The strongest doubt
Counterpoint from the sources
Kuhne notes that despite the structured workflow, the process remains exhausting for the developer.
Try it
Create a markdown file in my repo for a new bug fix ticket.
Good result: The agent creates a committed markdown file in the repository, establishing a persistent task record.
Did this article give you the evidence you needed?
Your choice stays on this device. No public tally.Terms in this story
git
A distributed version control system used to track changes in source code and store task states.
Claude artifact
A visual output feature in Anthropic's Claude interface that displays documents, code, or UI previews.
priority queue
A data structure where each item has a priority, and items with higher priority are processed first.
Questions readers ask
How does this method handle agent session failures?
The queue lives in git as committed snapshots, so the state persists even if the terminal session dies.
Can the agent deploy code to production?
No, the agent never deploys to production; that responsibility remains with the human developer.
What interface is used for reviewing agent work?
A Claude artifact page is rebuilt from git on every cycle to display the board and review pages.
Connected stories
Reading receipt
- Work items are stored as markdown files in git, ensuring state persists even if terminal sessions fail.
- Agents process tickets in cycles, handling safe builds and tests while deferring production deployments to humans.
- A dedicated inbox aggregates decisions, presented via a Claude artifact view that mirrors the git repository.