Inspiration

We run a lot of coding agents now. Codex in one tmux pane, another Codex on a refactor in a second, a test-fixer in a third, to the point that agents are no longer the bottleneck; we are. Every once in a while one of them stops to ask a simple question, and humans either babysit the terminals all day or come back to find an agent an hour deep into the wrong assumption or have fully stopped waiting for a "LGTM." Human attention, not agent capability, is the scarce resource, because only it can reduce the entropy of a codebase's state. Pendulum is the missing piece: an agent that manages human attention.

What it does

Pendulum is an always-running attention agent for coding agents that already live in your tmux panes. It never spawns or owns workers; it watches them, and it guards you.

The core mechanism is the entropy gate. Every watched pane has one model-reported number (entropy: how uncertain that agent is about what you'd want, 0.0 - 1.0) and one human-set tolerance (/gate low / medium / high). When entropy rises above the gate, deterministic code halts Pendulum's actions on that pane until you answer its queued questions. Answering questions is how you pay the debt down.

Before you leave, /away 30m starts a negotiation; Pendulum audits every pane and interviews you until each one is below its gate, storing your pre-authorizations as standing instructions that expire when you return. While you're gone it stays silent: questions queue, pre-authorized answers get relayed autonomously, quiet panes get checked less often. When you return, you get exactly one digest: halted panes first, every claim backed by an append-only ledger id you can drill into. It also works from your phone through a Telegram bridge, when it really needs you to answer a question.

How we built it

Codex built Pendulum, end to end, and the story has three layers:

Codex as the builder: The entire codebase was produced by Codex CLI from written specs with dated milestone commits, with the session ID in the README and the submission. We iterated between spec writing, building, code review and follow-up prompts, treating Codex like an engineering team and ourselves like the architect.

Codex as the runtime. Pendulum runs on cheap GPT 5.6 Luna tokens through the Pi coding-agent SDK using the Codex subscription login.

Codex as the workload. The demo is self-hosted: Pendulum watches a fleet of real codex exec agents building Pendulum's own roadmap features, each in its own git worktree, the same way the project itself was built.

Other technologies used include TypeScript on Node 22, node:sqlite with an append-only event ledger enforced by triggers, custom tools injected into GPT-5.6 via the Pi SDK, a Telegram bridge on the raw Bot API with long polling, with a determinstic test suite.

Challenges we ran into

Where does the model end and harness begin?

Our first designs had complicated mechanical rules. After iterations, all of it were cut. We trusts the model's self-reported entropy completely, but every report is ledgered with old value, new value, and reason, so the system is auditable, and can improve over time with model improvements and external checks.

Honesty about observation.

The system works by running tmux captures, which is ~150 lines of terminal tail, not an agent's mind. We label this consistently through prompts and storage, and validate every citation in the digest against the ledger, with fallbacks designed when models hallucinate references.

Accomplishments that we're proud of

The system works end-to-end: LLM reports uncertainty, human sets tolerance, harness enforces everything, and human attention is saved.

The harness implements many hard restrictions for when the model makes the occasional mistakes, such as append-only provenance for every capture, send, question, answer, and entropy report; sends only under an answered question or exact pre-authorization; and zero mid-away interruptions by construction.

37 deterministic tests, a scrub check, and a judge-runnable demo (npm run demo, compressed 2-minute mode), so you can clone, /login, go.

What we learned

Trust the backbone model with judgment, never with authority. Every place we replaced a formula with a prompt, the system got better; every place we replaced a code invariant with model discipline, it got worse. The entropy rubric lives in one prompts file and improved more per hour of editing than any code we wrote. And the scarcest resource in multi-agent development really is human attention, where GPT 5.6 series' agentic capabilities helped tremendously.

What's next for Pendulum: Human Attention Manager

  • Adapters beyond tmux, such as herdr-managed workers, Codex cloud tasks, CI runners.
  • Richer standing instructions: such as conditional and reusable pre-authorizations.
  • Multi-user and team surfaces: one Pendulum, several humans, routed by who owns which decision, so Pendulum can work well in workplace and team settings.
  • Entropy history as a first-class view, so you can visualize your fleet's uncertainty over time, and determine when it's worth walking away.

Built With

  • codex
  • gpt
  • pi
Share this project:

Updates