You ask Codex to fix a bug. It runs for 20 minutes, edits three files, then runs out of tokens. You restart the session and it starts over—it doesn't remember what it changed, what's left on the todo list, or why it made those changes.
This isn't a Codex problem; it's a common flaw in all agent loops. Short-task agents are easy to build; long-task agents are hard. Once work spans hours, days, and multiple sessions, the "chat memory + timer" approach breaks down: goals change, decisions accumulate, evidence goes stale, agents need to hand off work, and schedulers keep burning tokens without valid transitions.
LoopX hit GitHub trending this week doing exactly this: installing a local control plane for long-running agents. It is not an agent runtime and doesn't replace Codex or Claude Code—it provides a "state kernel" for those runtimes.
Core abstraction: an agent-native Kanban
LoopX's mental model is a Kanban board—but not one built for humans, one built for agents.
Cards on a traditional board carry only a title and description. LoopX cards carry five things:
- identity: whose card this is, which agent owns it
- authority: what permissions execution requires
- evidence: what's been done and where the outputs live
- continuation: what to do next
- quota: how much budget remains
- Data stays local: state lives on your machine, not in the cloud. Enterprise-sensitive data, code, and internal docs never leave your machine.
- Control stays local: LoopX is not an autonomous production controller. Dangerous permissions, releases, production writes, and final ownership remain with humans.
- LangGraph: graph orchestration, focused on defining agent workflows
- Temporal: general-purpose workflow engine, not agent-specific
- obra/superpowers: skill framework, encoding engineering experience for agents
- LoopX: state kernel, focused on persisting agent work state
- Runtime layer: Codex, Claude Code, Cursor
- State layer: LoopX (local), cloudflare/computer (cloud)
- Skills layer: addyosmani/agent-skills, obra/superpowers
- Evaluation layer: uber/ADR (safety observability)
Moves on the board are verified operators: claim, gate, monitor, and writeback. The board itself is only a projection—LoopX's state layer is the source of truth.
The key insight: the problem with long-running agents isn't insufficient capability—it's lost state. What an agent can finish in 5 minutes becomes unfinishable even over 200 hours, not because it got dumber, but because intermediate state—goals, decisions, evidence, todos—wasn't reliably persisted.
200+ hour real trajectories
The README gives a compelling data point: the OpenViking Issue-Fix and Auto ML trajectories each span 200+ hours of loop lifecycle wall-clock time.
Note this isn't 200 hours of continuous model execution—it's calendar time from project start to completion, with many bounded agent turns, human decisions, and evidence updates along the way. LoopX's value: after every turn, state is reliably saved; when the next turn starts, the agent sees the full context.
This aligns with the "granularity isomorphism" principle previously discussed on zhichai.net regarding Heddle and CodeRescue: a system's optimization granularity should match the granularity of the thing being optimized. Long-running agents work at the granularity of "multi-turn traces," not "single calls"—so state management must operate at the trace level too.
Four key mechanisms
LoopX's control state includes four core mechanisms:
1. Gates: Not everything can execute automatically. Dangerous permissions, releases, production writes, final ownership—these stay with humans. LoopX checks gates before each agent turn; if human judgment is needed, it poses a specific question and waits.
2. Quota awareness: Agents can't burn tokens indefinitely. LoopX tracks per-turn budgets and pauses when quota is exhausted, waiting for the next wake-up. This solves the "scheduler keeps burning tokens without valid transitions" problem.
3. Evidence logs: After every turn, the agent must write out evidence—what was done, where the outputs are, what's next. This isn't optional logging; it's part of the state.
4. Verifiable handoffs: When agents hand off work, it's not a casual "I'm done, you continue"—there's a structured handoff protocol covering current state, completed work, pending work, and required permissions.
Why "local control plane"
LoopX emphasizes being a local-first control plane, with two meanings:
This positioning is smart. It doesn't compete head-on with cloud orchestration tools like LangGraph or Temporal—it's the "local state layer." You can use any agent runtime and any cloud orchestration tool, but keep the state layer in LoopX.
How it differs from other projects
Several recent projects address agent loop management, but from different angles:
LoopX's uniqueness: it doesn't try to replace any layer—it only does the state layer. This echoes cloudflare/computer, which also only does state (file system), not execution. But cloudflare/computer is cloud-based; LoopX is local.
A larger trend
Placing LoopX among recent trending projects reveals that agent engineering is rapidly stratifying:
One line from LoopX's README captures it well: "Keep the loop moving. Keep the judgment human." This may be agent engineering's most concise design principle—automate everything automatable, but leave accountable decisions to humans.
---
*Project: huangruiteng/loopx · Python · 327 stars today · 200+ hour real trajectories*