Why Your Fleet Boss Needs a Nervous System: Pairing Firstmate With Jev

/ Article
[ Fig. 1 ]

If you ask an AI supervisor to think deeply about everything, it will quickly do nothing well.

In our fleet, the lead coordinator is an agent named Firstmate. Firstmate sits in a terminal pane, takes directions from me, and manages a crew of worker agents.

Early on, we treated Firstmate like a human manager who reads every email, checks every terminal, and answers every tap on the shoulder.

When a worker pane went quiet, Firstmate pulled the whole screen buffer into its context window to see why. When an alarm went off, Firstmate read raw stack traces. When an intake task arrived, Firstmate spent 4,000 tokens deciding which worker should take it.

The result was predictable:

  • Its context window filled with terminal junk.
  • Every decision took thirty seconds.
  • We burned hundreds of dollars on routine checks.
  • When real emergencies hit, the boss was already out of memory.

Human brains do not work that way. Daniel Kahneman described two systems of thought: System 1 is fast, automatic, and reflexive. System 2 is slow, deliberate, and expensive.

We had built a fleet with a brilliant System 2, but zero reflexes.

To fix it, we paired Firstmate with Jev.

What Is Jev?

Jev is our fleet’s nervous system. It runs on a fast, specialized model (api.typesafe.ai/v1/systemone).

Jev does not plan projects. Jev does not write software. Jev answers binary or multi-choice questions about fleet events in less than half a second.

Firstmate is System 2. Jev is System 1.

Incoming Fleet Signals (Alerts, Done Claims, PII, Commands)


                 ┌──────────────────┐
                 │  Jev (System 1)  │
                 │  Fast Reflexes   │
                 └─────────┬────────┘

             ┌─────────────┴─────────────┐
             ▼                           ▼
      Noise / Routine             Genuine Decisions
     (Suppressed / Handled)      (Passed to Firstmate)
             │                           │
             ▼                           ▼
        Dropped / Logged       ┌──────────────────┐
                               │ Firstmate (Sys 2)│
                               │ Calm Executive   │
                               └──────────────────┘

When something happens in the fleet, it hits Jev first. If Jev can handle it with a reflex, Firstmate never hears about it. Firstmate’s context window stays clean for deep coordination.

Here are four real reflexes Jev runs for Firstmate today.

1. Stale Wake Triage: Stop Waking the Boss for CI

Our watcher daemon monitors worker terminal panes. If a pane stops printing output for ten minutes, the old watcher assumed the agent was dead and rang Firstmate’s pager.

On any real software team, panes go quiet all the time. A worker pushes a branch and waits eight minutes for GitHub Actions. It is not stuck; it is waiting.

Under the old system, Firstmate received dozens of “possible wedge” alarms every day. It would wake up, read the pane, realize CI was running, and go back to sleep—having wasted tokens and lost its place.

Now, bin/fm-jev-wake-triage.sh intercepts the alarm:

# What the watcher runs before paging Firstmate:
fm-jev-wake-triage.sh --class worker --age 600 --last-status "waiting on PR #42 check run"

Jev classifies the state into one of three buckets:

  • pipeline_wait: The worker is waiting on external CI. Suppress the alarm.
  • healthy_idle: The worker finished its step and is waiting for input. Suppress the alarm.
  • true_wedge: The worker is in an infinite loop or hung on a lock. Escalate to Firstmate.

False wake-ups dropped to zero. Firstmate only gets paged when a worker is genuinely dead.

2. The Definition-of-Done Reality Check

Worker agents are optimistic. They love to announce that a feature is finished when they only wrote the code and never ran the tests.

If Firstmate had to verify every worker’s claim itself, it would spend all day running curl commands, checking git commit hashes, and reading test logs.

We moved verification into Jev: bin/fm-jev-done-verify.py.

Every task brief includes a strict Definition of Done:

  1. Is the branch pushed to origin?
  2. Is there an open pull request?
  3. Did automated tests pass in CI?
  4. Is the staging URL returning HTTP 200?

When a worker calls done, Jev runs the checks and evaluates the receipts. If a single requirement is missing, Jev rejects the completion report before Firstmate even sees it.

The worker gets sent back to finish the job. The supervisor’s attention is never disturbed.

3. Zero-Touch Routing: config/crew-dispatch.json Meets Jev

When a new task brief arrives, someone has to pick the right worker harness and model:

  • When is a job right for agy with Gemini 3.8 Flash?
  • When does it need claude with Opus 5?
  • When does it need codex with Sol for images, or grok for live news?
  • When is it a two-line typo that belongs on cursor Composer so we do not waste frontier quota?

If Firstmate had to read every incoming brief, ponder model catalogs, and check live quota balances, it burned 4,000 tokens before writing a single line of code.

We solved this with two pieces: a declarative policy file, config/crew-dispatch.json, and a fast resolver tool, bin/fm-dispatch-resolve.sh.

Our dispatch rules live in plain English inside config/crew-dispatch.json:

{
  "rules": [
    {
      "when": "The captain explicitly requests Gemini, Antigravity, or agy for coding or investigation.",
      "use": { "harness": "agy", "model": "gemini-3.8-flash-high", "effort": "high" },
      "why": "Top-tier DeepSWE quality-to-cost ratio (73.8% pass@1 at $2.36)."
    },
    {
      "when": "The task requires image generation or visual asset generation through Codex capability.",
      "use": { "harness": "codex", "model": "gpt-5.6-sol", "effort": "high" }
    },
    {
      "when": "The task depends on fresh news, current events, live public facts, or recent market changes.",
      "use": { "harness": "pi", "model": "xai/grok-4.5", "effort": "medium", "provider": "grok" }
    },
    {
      "when": "The task is trivial mechanical work: rote renames, formatting sweeps, or small well-specified edits.",
      "use": { "harness": "cursor", "model": "composer-2.5-fast" }
    },
    {
      "when": "The task is big, ambiguous, or risky: multi-file features, risky refactors, or unfamiliar investigation.",
      "use": [
        { "harness": "claude", "model": "claude-opus-5", "effort": "high" },
        { "harness": "agy", "model": "gemini-3.8-flash-high", "effort": "high" },
        { "harness": "cursor", "model": "gpt-5.6-luna-high" }
      ]
    }
  ]
}

When a task lands, bin/fm-dispatch-resolve.sh sends the brief and the when clauses to Jev System One.

Jev matches the brief to the right rule in under 300 milliseconds.

Then a small shell step takes over. It queries our local meter (quota-axi --json) to rank the eligible models by available subscription quota (spendPriority).

Firstmate never reads the raw brief to pick a model. It runs one command and gets back a ready-to-dispatch profile:

dispatch-resolve:
  status: clear
  rule: "The task is big, ambiguous, or risky" (confidence: 0.94)
  profile: --harness agy --model gemini-3.8-flash-high --effort high

The model matches the intent. The local quota tool protects the wallet. Firstmate stays fast.

4. Guarding the Boss From Itself

The biggest risk to a supervisor agent is temptation. When an issue escalates to Firstmate, Firstmate often wants to “just quickly fix it” by running bash commands itself.

We built bin/fm-jev-guard.py as a pre-tool-use hook.

Whenever Firstmate issues a bash command, the hook checks the command:

  • If it is a safe read or an approved supervisor tool (bd, fm-send, herdr), it fast-passes in Tier 1 code.
  • If it is an ambiguous command, Jev checks it in Tier 2.

If Jev spots hands-on code editing or server mutations, it denies the command on the spot and tells Firstmate to delegate.

Firstmate cannot violate its own organizational boundary because its nervous system pulls its hand away from the hot stove.

The Rule for Agentic Engineering

When you build complex multi-agent systems, resist the urge to make the lead agent do everything.

  1. Protect the supervisor’s context window like gold. Every log line, terminal dump, and raw webhook you feed to the lead agent degrades its reasoning capacity.
  2. Split System 1 from System 2. Build fast, cheap, stateless classifiers for the reflexes. Save the expensive, stateful models for the executive decisions.
  3. If a check takes under three seconds, it belongs to the nervous system. The boss should only review verdicts, never inspect raw noise.