aheadloop
Product

How Aheadloop works.

One binary and your project’s aheadloop.json. Standalone, it is a local daemon on your machine; in distributed mode, a central server with workers you run on Docker hosts or Kubernetes. Either way, it is self-hosted.

Fig. 2One sessionIllustrative
Agent
writing codefixing the test, adding morewaitsdone ✓
Aheadloop
checks: test failedchecks: passedchecks the final code
  1. 1

    Checks start on their own

    Each change the agent makes is verified in the background.

  2. 2

    Failures come back at once

    A test fails. The agent is told right away and fixes it without stopping.

  3. 3

    “Done” gets checked

    When the agent says it is finished, the exact code it hands over is checked.

  4. 4

    Failing work is sent back

    If it passes, the agent finishes. If it fails, it gets the error and goes back to work.

An example session. The agent never stops to wait for a pipeline; it waits once, for the final code.
Fig. 3What runs whereIllustrative
Your machine
Coding agentsClaude Code · Codex · any CLI agent
aheadloop daemonsnapshots · queue · evidence · gatesUnix socket, owner-only
Dockerone container per check
Your repositoryaheadloop.json · working copy
aheadloop uiread-only web console
Standalone mode: everything lives on your machine. Agents talk to the daemon through hooks or the CLI over a Unix socket; checks run as Docker containers; the web console only reads. In distributed mode the same engine runs on a central server, workers run the checks, and clients connect over mutual TLS.
The parts
01

Snapshot

Each verification starts from an immutable snapshot of the working copy: uncommitted files included, .gitignore respected, common secret files excluded. Snapshots are content-addressed, so unchanged files are stored once.

  • no commit needed
  • content-addressed
  • garbage-collected
02

Execute

Every check runs in its own container: non-root by default, read-only root filesystem, all capabilities dropped, no network, no host credentials, and CPU, memory and time limits. Output is bounded; containers are cleaned up, also after a crash. On Kubernetes, checks run as restricted Jobs.

  • 2 CPUs · 2 GiB · 600 s by default
  • network off by default
  • output bounded
03

Coordinate

All sessions share one queue, on your machine or on the server. It is fair across developers (and weighted teams on a server), prefers checks an agent is blocked on, and serves anything that has waited more than 60 seconds. A newer request supersedes the same session’s older ones nobody waits on; identical checks in flight share one run.

  • agent-aware
  • starvation guard
  • bounded queue
04

Gate

The gate answers one question about the workspace as it is now. A pass is bound to the exact snapshot, the approved policy and the execution environment, image digest included. It fails closed.

  • passed · failed · pending · unknown
  • explicitly approved policy
  • not a merge control by itself

Four answers, no guessing

passed
Every required check passed for exactly this content, policy and environment.
failed
A required check failed for this content.
pending
Required checks are still running.
unknown
No usable result: stale, missing or interrupted. Never treated as a pass.

Feedback an agent can act on

Failures are returned as aheadloop.feedback/v1: which required checks failed, file:line locations that resolve to the snapshot, short excerpts with common credential formats redacted, and the next action. Check output is labelled as untrusted data, never as instructions.

aheadloop feedback --json
{
  "schema": "aheadloop.feedback/v1",
  "result": "failed",
  "applies_to_current": true,
  "failed_required": [{
    "check": "test",
    "failure_class": "test_failure",
    "locations": [
      {"file": "pricing/pricing_test.go", "line": 19}
    ],
    "excerpt": "--- FAIL: TestTaxRounding …"
  }],
  "next_action": "fix_required_failures"
}

Abridged example