Agent Hub, under the hood

Agent Hub lets any AI client hand a task to any agent provider and get a verdict plus a diff back. It is configuration and plugins on top of the Paseo agent daemon, with no change to Paseo's own code. This guide is read from the code and config in the repository: what runs, in what order, and why.

Follow one taskSource on GitHub
Plugins, 0 core diffA gate plugin, a usage plugin and a routing wrapper on Paseo 0.15.2 (pinned by the installer).
Two doorsMCP at /mcp/agents, or the paseo CLI. Five clients tested as callers.
Counts onlyTokens and credits are recorded. Prompts and session ids never leave the machine in metrics.

1What it is and why

The problem it replaces

Before this, delegating work to a cheaper model meant a Claude session sat in the middle of every task. It read the task, called a home-built router, waited, read the result and judged it. That cost lead tokens on every delegated task, and it tied delegation to one client. The router itself was home-built too: a gateway with slots, a circuit breaker, budgets and a ledger. Usage was scattered over several tools, so nobody could see tokens per model in one place.

The goals (from the spec)

  • Any client, any provider. Claude Code, Codex, Qoder, OpenCode and Qwen Code can all be the caller. Codex, Claude, Qoder, Qwen Code, OpenCode, an office SGLang server and a laptop llama.cpp server can all be the worker. Nothing in the glue is specific to one client.
  • No lead in the middle. The caller dispatches straight to a provider. Zero Claude-lead tokens on the path.
  • Verdict and diff back. A gate checks the result on the daemon side, so it applies whoever sent the task.
  • One usage view. Tokens per model, provider, developer and day, plus credits where a provider bills in credits.
  • Laptop model 100% on the GPU. A Qwen3.5-9B model plus a 64k KV cache has to fit in 8 GB of VRAM, with no CPU or RAM offload.
  • Adopt, do not invent. v1 is a thin layer on Paseo: plugins, config and scripts. The Paseo trademark is not used, hence the name agent-hub.
  • Safe by default. Loopback bind, a password, full-access modes only inside a throwaway worktree, a secret scan on every result.
Old poolAgent Hub
A Claude lead reads, routes and judges every taskThe caller talks to the daemon directly; the gate plugin judges
Home-built router, slots, breaker, budgetsA routing table (route.mjs), a slot cap per provider, next-entry fallback
Edits happen in the caller's folderOne throwaway git worktree per task
Usage in separate ledgersOne record per turn, OTLP to Prometheus and Grafana, a per-session file for the statusline

2Architecture

The daemon is the only long-lived process. Everything else is a file it reads, a plugin it loads, or a CLI it launches. Dashed arrows are optional or asynchronous paths.

Claude CodeCodexQoderOpenCodeQwen CodeMCP doorPOST /mcp/agents, bearer secretCLI doorpaseo run | wait | logs --jsonroute.mjs (wrapper)task type to provider chainPaseo daemon, bound to 127.0.0.1:6767 (one per developer)agent managerrun, send, stop, labelsworktree per taskthrowaway git worktreeplugin hostagent.turn.before / .aftergate pluginsecret scan, diff size, path, command, re-prompt onceusage pluginrecord per turn, OTLP, side channelscodexclaude-cleanqoderqwen-codeopencodeqwen-laptopSubscription CLIsown login per developerOffice SGLangOpenAI-compatible, 27Blaptop-agent.mjsGPU guard + llama-server 9BUsage pipelineusage.jsonl + sessions/*.sum.jsonstatusline read pathOTLP to collectorPrometheus then Grafanahost pollers :9109Qoder credits, OpenCode, limit %providers: ACP or CLI, run inside the task worktreeusage plugin feeds the files and OTLP; pollers feed Prometheus

The pieces and where they live

PieceWhereJob
Paseo daemoninstalled by npm i -g @getpaseo/cli@0.15.2Runs agents, makes worktrees, hosts plugins, serves MCP and the web UI
Config writerscripts/hub.mjsconfigure, mcp add|remove, plugins, doctor, unconfigure
Routing wrapperplugins/routing/route.mjsTask type to ordered provider chain, slot check, fallback, gate request
Gate pluginplugins/gate/Hook on agent.turn.after; checks the diff, re-prompts once
Usage pluginplugins/usage-otel/Hook on agent.turn.before/after; records and exports usage
Laptop launcherdeploy/laptop/Pre-flight, lazy llama-server start, runtime GPU watchdog
Service wrappersdeploy/service/Task Scheduler (Windows) or systemd user unit (Linux)
Usage stackdeploy/usage/Collector, Prometheus, Grafana, host pollers
Shared serverdeploy/shared/One container per developer behind a login proxy

The two doors

MCP door. The daemon exposes POST /mcp/agents. doctor proves it refuses a call with no password (401) and answers tools/list with the bearer secret (more than 10 tools; a manual count in the lab found 40). The installer registers an agent-hub entry in each installed client's own config, in that client's own shape: type: http for Claude Code, httpUrl for Qwen Code, type: remote for OpenCode, a marked TOML block for Codex. The files are written directly so the secret never appears in a process argument list, and the original is backed up once to <file>.agent-hub.bak.

CLI door. paseo run, paseo wait, paseo logs --json. Any shell-capable client can use it with no MCP setup. route.mjs is built on this door.

Routing is a wrapper, not a daemon hook.The code says so: the daemon's agent.create.before hook has no labels and cannot spawn a replacement agent, so the routing table lives in route.mjs. A client that calls MCP create_agent directly picks its own provider. The gate and usage plugins still fire for that agent, because they sit on the turn hooks, not on the router.

3Life of a task, step by step

This is the path of one task through route.mjs. Solid arrows are calls, dashed arrows are replies or follow-ups.

Callerroute.mjsPaseo daemonProviderGate pluginUsage plugin1 type + prompt (or MCP create_agent)2 paseo run --provider ... --new-workspace worktree3 git worktree created4 start agent (ACP / CLI), send prompt5 turn completed6 agent.turn.after7 diff, scan, size, path8 first failure: re-prompt once9 update_agent: gate/* labels10 agent.turn.after11 get_agent_status (usage, labels)12 jsonl, sum.json, OTLP13 get_agent_status (poll) / paseo wait14 status + labels (verdict, diff stat)
  1. Call. The caller runs route.mjs <type> "<prompt>" --cwd <repo> (Windows: C:/abs/path; a Git-Bash /c/... path is rewritten to C:/...) [--gate CMD] [--provider P/M] --new-workspace worktree, or calls MCP create_workspace then create_agent.
  2. Routing. The type picks an ordered chain from the routes file (section 4). A provider already at its slot limit is skipped. Labels route/type, route/provider, dev, caller and session are attached to the agent. If --gate was given, the command is written to the gate plugin's own store, keyed by the working directory, before the agent exists.
  3. Worktree. --new-workspace worktree makes the daemon create a throwaway git worktree for the task. Full-access, bypass and yolo modes are allowed only when this flag is present; otherwise route.mjs drops the mode and records a note in its trace.
  4. Provider runs. The daemon starts the provider as an ACP agent or a CLI process inside the worktree: Codex, claude-clean, qodercli --acp, Qwen Code on the office server, OpenCode, or qwen-laptop (which passes through the GPU guard first).
  5. Turn completes. The daemon fires agent.turn.after with an outcome. Both plugins ignore any outcome that is not completed.
  6. Gate. The gate plugin runs the checks (section 5). On the first failure it sends the agent a follow-up message with the reasons; the agent works another turn and the hook runs again. On the second failure the status is FAIL.
  7. Verdict. The plugin mirrors the result into agent labels through the daemon's own MCP update_agent: gate/status (PASS, RETRY, FAIL or ERROR), gate/reasons, gate/attempts, gate/diff (for example "3 files, 41 lines").
  8. Usage. The usage plugin reads the agent's snapshot with get_agent_status, builds one record, fills gaps for Qwen Code and Qoder from their own files, appends it to disk and posts counts as OTLP (section 6).
  9. Caller polls. There is no wait tool over MCP, so an MCP caller polls get_agent_status and reads the labels; a CLI caller uses paseo wait. In the lab matrix an OpenCode caller took 3.6 minutes on an office-server worker and made 16 status polls.
  10. Diff. The caller reads the diff from the worktree or the web UI. route.mjs prints a JSON trace: provider used, agent id, status, and one entry per skipped or failed provider. Exit code 0 means a provider completed, 1 means every entry failed.
Paseo web UI diff view of a finished task: a three-line fix to calc.py
The daemon's web UI showing the diff of a finished task. Real capture from a throwaway demo daemon.

4Routing

Default order for code edits: Codex, then Claude, then Qoder Efficient (free, 10/10 on the hard set), then DeepSeek-Flash, then the office Qwen3.8-27B-NVFP cluster, then the single-GPU Qwen3.8-27B. Qoder is pinned to qodercli 1.1.81 with a private config directory.

The table is a JSON file: config/routes/routes.local.json (git-ignored), else the committed template, or the path in AGENT_HUB_ROUTES. route.mjs and the gate plugin read the same file.

Format

{
  "gateDefault": "<REPO_GATE_COMMAND>",
  "gates": [
    { "match": "<REPO_PATH_REGEX>", "cmd": "<REPO_GATE_COMMAND>",
      "maxLines": 400, "forbid": "^([.]env|[.]github/|.*[.]pem$)" }
  ],
  "slots": { "codex": 3, "claude-clean": 2, "qoder": 4, "qwen-code-2": 6, "qwen-code": 3, "qwen-laptop": 1 },
  "modes": { "codex": "full-access", "claude-clean": "bypassPermissions", "qoder": "yolo",
             "qwen-code": "yolo", "qwen-laptop": "yolo" },
  "waitTimeout": "15m",
  "routes": {
    "code-edit":      ["codex/gpt-6.1-terra", "codex/gpt-6.1-sol", "claude-clean/claude-sonnet-5-5", "qoder/efficient", "qwen-code-2"],
    "code-edit-easy": ["qwen-laptop", "qwen-code-2", "qoder/efficient", "codex/gpt-6-luna"],
    "summarise":      ["qwen-laptop", "qwen-code-2", "claude-clean/claude-haiku-5-5"],
    "test-scaffold":  ["qwen-laptop", "qoder/efficient", "codex/gpt-6.1-sol", "claude-clean/claude-haiku-5-5"],
    "review":         ["qwen-laptop", "qwen-code-2", "claude-clean/claude-haiku-5-5"]
  }
}

Each entry is provider/model as the daemon config names them; paseo provider models <id> lists them. The provider part is everything before the first /, and that is the key into slots and modes. The defaults come from the capability bench in section 11: gate pass first, then cost, then speed.

Latest aliases

An entry may be an alias resolved at dispatch and cached 10 minutes: codex/latest[-family] (Codex model cache, version sort, astra never chosen), claude/latest-opus|sonnet|haiku (the provider model list, not a table), qoder/latest-<family> and qoder/<tier>@latest (newest version in a family, read from the display names such as Qwen3.8-Max), and opencode/office@latest. The office Qwen launcher (deploy/office/office-agent.mjs) and the laptop agent read the served model id from GET /v1/models when they start an agent. node plugins/routing/route.mjs --resolve <alias> prints the mapping; just doctor shows the served ids, the laptop GGUF date and each CLI installed vs latest; just update updates the CLIs that are behind (Paseo only with --paseo).

What runRoute does, in order

  1. Chain. With --provider P/M the chain is that single entry. Otherwise it is routes[type]; an unknown type returns an error trace and exit 1.
  2. Busy check. For each entry it runs paseo ls and counts agents whose status is running and whose provider equals the entry's provider part. If the count is at or above slots[provider] (99 when unset), the entry is skipped with a trace line like busy 2/2.
  3. Mode. Order of precedence: the --mode flag, then modes[provider], then the global mode. A mode matching full-access, bypass or yolo is only passed when --new-workspace worktree was given.
  4. Labels and gate. Labels are set (only those with a value), and a caller gate is written to the plugin store.
  5. Run. paseo run --cwd ... --provider P/M --wait-timeout 15m [--new-workspace worktree] [--mode M] --label k=v ... "<prompt>" --json. A completed status ends the loop.
  6. Fallback. Any other status (error, timeout, refused) goes in the trace, the stray agent is stopped with paseo stop so it does not keep working, and the next entry is tried.
Two behaviours to knowA caller override is a chain of one, so an override has no fallback. And the slot count is read from paseo ls at decision time, so two callers racing can both see a free slot; for the laptop model the serial queue inside llama-server is the real limiter (section 7).

Example call

node plugins/routing/route.mjs code-edit "Fix the failing test in calc.py" \
  --cwd /path/to/repo --new-workspace worktree --gate "python -m pytest -q" \
  --session $SESSION_ID --client claude-code
{"used":"codex/gpt-6.1-terra","agentId":"...","status":"completed",
 "trace":[{"provider":"codex/gpt-6.1-terra","status":"completed"}]}

On Windows the npm shim paseo.cmd cuts multi-line arguments at the first newline, so route.mjs finds the shim with where and runs the CLI's JavaScript entry through node directly. PASEO_BIN overrides all of this.

5The gate in depth

The gate is a hook on agent.turn.after. It is a follow-up, not a veto: the daemon has already finished the turn, so the gate cannot undo it. What it can do is mark the result, and send the agent back to work once.

turn completedoutcome.kind == completedpick the commandcaller request > gates row > gateDefaultrun checks in the worktreehardened git, no labels readsecret regex on added linesadded + removed lines > maxLinesignored files scanned for secrets.gitignore editedforbid / allow path regexgate command exit != 0 (120 s cap)no reasonsstatus PASSreasons, attempt 1status RETRY + re-promptreasons, attempt 2status FAIL, back to callerState (attempts, status, caller command) is written to the plugin store; labels are only a mirror.

Why labels are not trusted

An agent runs with write access to its worktree and, through injectIntoAgents, can call the daemon's own MCP tools, including update_agent. So it can rewrite its own labels. The first version of the gate kept its state in labels. It was replaced: hook.mjs reads no agent label at all.

FactWhere it comes from
Gate commandThe caller's request in the plugin store, else the matching gates row, else gateDefault (ignored while it still starts with <, the template placeholder)
maxLines, forbid, allowThe gates row from the routes file (default 400 lines)
Attempts and status<gate dir>/state.json, keyed by agent id
Labels gate/*Written by the plugin, for display in get_agent_status only; never read back

The state store

The gate directory is AGENT_HUB_GATE_DIR, else <paseo home>/gate. The daemon and route.mjs must see the same value.

  • requests/<sha1>.json: written by route.mjs --gate before it creates the agent. The key is the SHA-1 of the working directory with backslashes turned to slashes, trailing slashes cut and lower-cased, so both sides compute the same name on Windows.
  • The first agent that finishes a turn in that directory claims the request: it is read and deleted in one step, and copied into that agent's entry in state.json. One request therefore binds to one agent.
  • state.json: written to a temp file and renamed, so a crash cannot leave half a file.

The checks

Run in the worktree after git add -N . (intent-to-add, so new files appear in the diff):

CheckRule
Secret scanRegex over added diff lines: AWS key ids (AKIA plus 16), PEM private-key headers, GitHub tokens (gh[pousr]_ plus 30), sk- keys (20+), and api_key / token / secret / password assigned to a quoted 16+ character string
Diff sizeAdded plus removed lines greater than maxLines fails
Hidden filesFiles ignored by git are listed with ls-files -o -i and scanned for secrets too, because an agent can hide a file behind .gitignore; editing .gitignore is itself a failure
Pathsforbid: no changed file may match. allow: every changed file must match. __pycache__ and .pyc are ignored
CommandRun through the shell in the worktree with a 120 s timeout; a non-zero exit adds the last 300 characters of its output to the reasons

Attempt logic

decide() is a three-line function. A pass is PASS. The first failure is RETRY and sends "Your work failed the gate: ... Fix it and finish." to the agent. The second failure is FAIL and the task goes back to the caller with the reasons. "gateRetry": false in the routes file turns the re-prompt off. If the gate itself throws, the labels say ERROR, never PASS: it fails closed.

Hardened git

The worktree is untrusted: a bad agent can write .git/config. Running git diff there must not execute anything it planted.

git -c core.fsmonitor=false -c core.hooksPath=<empty dir> -c diff.external= -c core.pager=cat \
    diff --no-ext-diff --no-textconv HEAD
# env: GIT_CONFIG_NOSYSTEM=1  GIT_CONFIG_GLOBAL=<empty file>  GIT_TERMINAL_PROMPT=0

The regex cap

forbid, allow and match are regex sources from the routes file. rx() rejects anything that is not a string or is longer than 200 characters, so a bad config cannot compile a huge expression.

The attack it resists

  1. Self-reported success. The agent sets gate/status=PASS or resets gate/attempts=0 to get unlimited retries. Nothing reads those labels, so it changes nothing.
  2. Swapping the command. The agent writes a label naming a harmless gate command. Commands come only from the routes file or the caller's request in a directory the agent has no reason to know.
  3. Hiding a secret. The agent writes a key into a git-ignored file. Ignored files are scanned, and the .gitignore edit is flagged.
  4. Running code through git. The agent plants core.fsmonitor, a hooks path, an external diff or a textconv driver. The gate overrides each, and ignores user and system config.
Limits, stated plainlyThe secret scan is a regex over text, so it does not read binary files and will miss a secret that does not look like the patterns. The gate command is trusted configuration: it runs with a shell. The gate marks a result; it does not revert it.

6Usage and cost tracking

Resilience: the plugin hooks run inside Paseo's 30 s RPC limit (the gate in the background, no await on the Qoder poller), MCP and OTLP calls time out after 5 s, an OTLP outage is logged once, and the usage stack starts on logon and just up (native Windows processes by default, no Docker: deploy/usage/native.ps1, files in %LOCALAPPDATA%\agent-hub\usage; USAGE_MODE=docker uses compose.yaml for servers); just doctor checks the active mode and fails when the collector, Prometheus or Grafana is down.

Every CLI reports usage differently, and two report none through the daemon. The usage plugin therefore combines what the daemon knows with each tool's own files, and everything ends in one pipeline.

Usage plugin, per turnfills Qwen / Qoder from their own filesClaude Code, Codex, Qwen Codenative OTLP metricsHost pollers on :9109Qoder credits, OpenCode, limit %SGLang, llama-server/metrics scrape (server-wide)usage.jsonl + sessions/<id>.sum.jsonOTel collectorallow-list, strip identityPrometheushub_tokens_total rulestatusline60 ms budgetGrafanaprovider and dev vars

Per CLI: how the numbers arrive

SourcePathWhat you get
Codex, ClaudeThe daemon's lastUsage in get_agent_status, read by the usage plugin each turninput, output, cached tokens, USD cost
Qwen CodeThe plugin reads the session's chat file under ~/.qwen/projects/*/chats/<session>.jsonl and sums each request's usageMetadatatokens exact per task; the daemon reports 0 for this CLI
QoderPer-message usage.credits from ~/.qoder/projects/*/<session>.jsonl (fractional). Fallback: account credits before and after the turn, from a pollercredits, not tokens
OpenCodeIts own OTel has no token attributes, so opencode_export.py runs opencode session list and opencode export <id> and sums assistant messagesopencode_tokens_total{provider,model,type,dev}
Office SGLang, llama-serverPrometheus scrapes /metricsserver-wide totals and running/queued requests, no per-developer split
Claude Code, Codex, Qwen Code (direct use)Native OTLP metrics straight to the collectorclaude_code_token_usage_tokens_total, codex_turn_token_usage_sum, qwen_code_token_usage_total

The Qwen Code and Qoder files are cumulative per session, so fillRecord() keeps a cursor file (cursor.json) and books only the delta since the agent's previous turn. A source that reports nothing is shown as "not captured" rather than as zero.

The record and where it goes

One JSON line per finished turn: timestamp, agent, session, provider, model, dev, calling client, task type, input/output/cached tokens, cost_usd, credits. A subagent's parent_session label wins over session, so subagent work rolls up to the parent. It is appended to usage.jsonl and sessions/<session>.jsonl, and folded into sessions/<session>.sum.json.

The OTLP body carries five counters (agent_hub.tokens.input|output|cached, agent_hub.cost.usd, agent_hub.credits) with the attributes provider, model, dev and client. The session id is left out on purpose: it would explode metric cardinality and identify a person's work. The prompt is never read.

The statusline read path, and its 60 ms budget

A statusline refreshes constantly and cannot wait for Grafana. bin/agent_hub_usage.py usage --session <id> --json opens one file, sessions/<id>.sum.json, and prints it: no JSON parsing in the fast path, only the stdlib, and heavy imports are deferred. Measured at about 42 ms. Calling the .py directly is faster than the .cmd wrapper, which adds about 45 ms of cmd.exe start-up. Without --json it prints a single line: hub codex 12345 | qoder 4000 | 0.31cr ~$0.05.

Claude Code statusline with a second line showing tokens per provider, credits and estimated cost for the session
The statusline's second line, fed by the per-session file.

The pipeline behind Grafana

  • Collector. A metrics pipeline only. There is no logs or traces pipeline, so prompts, subagent results and tool output are dropped on arrival. An allow-list keeps just the token and cost families. Identity attributes (user.email, user.id, account and organisation ids, session.id, conversation.id, host.name) are deleted. dev is set by the client, or filled with a default if missing. A deltatocumulative step turns the plugin's per-turn deltas into the cumulative counters Prometheus needs.
  • Prometheus. Recording rules join the sources into one series, hub_tokens_total{provider,model,dev,type}. Token types stay split (input, output, cacheRead) because vendors count cache differently; a single summed number across vendors would mislead.
  • Host pollers. pollers.py serves one text endpoint on :9109. Each poller refreshes on its own timer and the endpoint serves the cache, because opencode export plus the Qoder call can take more than 10 s and Prometheus times out at 10 s. hub_poller_up{poller} is 0 when a source failed, and the dashboard shows it as "not captured". Limit percentages (5-hour and weekly) come from a separate local usage monitor.
  • Qoder poller. Uses qoder_agent_sdk get_usage_info() and reuses the qodercli login; no secret is read. It reports credits used, remaining, used today and the reset time.
  • Grafana. Provisioned from usage.json. Panels: tokens today; Qoder credits used, remaining, per day and reset; tokens per provider, model and dev; token-type split; Claude/Codex limit % and resets; server slot use (running and queued, visible only, no target); server-wide tokens per minute; source health. Variables: provider and dev. Anonymous viewers are read-only (everyone sees everyone); analytics and update checks are off.
Grafana dashboard with tokens per provider, model and dev as bars, and a per-day stacked chart by provider
The dashboard with demo data.
Known limitsThe per-day panel shows the highest counter value reached that day, not a delta, so a counter that first appears with a value gives increase() no baseline; exact per-task deltas come from the plugin's own files. Qoder reports credits only, never tokens. SGLang counters carry no user label.

7The laptop model

The server runs with --cache-ram 0 (no host prompt cache), and the launcher never starts a second server while one is loading.

The laptop runs Qwen3.5-9B (UD-Q4_K_XL) through llama.cpp's llama-server, driven by Qwen Code over ACP. One rule shapes everything: the model must load 100% on the GPU. A model that spills to the CPU is slow, hot, and eats RAM that the developer needs, so the hub would rather refuse than degrade.

Layer 1: install time

hub.mjs configure asks nvidia-smi for total VRAM and registers the qwen-laptop provider only if it is at least 7500 MiB (override with LAPTOP_MIN_VRAM_MIB). The 9B model needs about 6.3 GB. No GPU, no provider.

Layer 2: the pre-flight (laptop-agent.mjs)

Every launch runs these checks in order. A failure exits with code 3 and a one-line reason on stderr, which the router sees as a failed provider and moves on to the next entry.

  1. GPU present. The NVIDIA display adapter must report PnP status OK (after a sleep the card can sit at Unknown or vanish), and nvidia-smi must answer. Otherwise: GPU missing -> provider disabled.
  2. Free RAM. At least 3 GB (LAPTOP_MIN_FREE_GB), checked only when the server is not already up.

--check runs only this stage; just doctor uses it and prints a WARN (not a failure) when the guard correctly refuses.

just doctor output: daemon, MCP and every provider check passing, laptop provider disabled by the GPU guard
just doctor on a machine where the guard refused the laptop model. That is correct behaviour, so it is a warning.

Layer 3: lazy start with one starter

Paseo probes each provider's status at start-up by sending only initialize. The launcher holds the model server back until the first session/prompt arrives on stdin, so a probe never loads 6 GB. When it does start, it takes an exclusive lock file (wx; stale after 180 s) because three parallel callers once started six servers. It also refuses if another process already holds more than 600 MiB of VRAM.

llama-server -m $LAPTOP_MODEL_PATH --jinja -ngl 99 -c 65536 -np 1 -fa on \
  --cache-type-k q8_0 --cache-type-v q8_0 --reasoning off \
  --temp 0.7 --top-p 0.8 --top-k 20 \
  --device CUDA0 --load-mode none \
  --host 127.0.0.1 --port 8089 --alias qwen35-9b --metrics --cache-ram 0
  • -ngl 99 puts every layer on the GPU; -c 65536 -np 1 is one 64k slot (the default since the final laptop benchmark; LAPTOP_CTX=32768 gives the old 32k). With -np 2 at 2 x 16k every request failed, because Qwen Code's own prompt is about 19k tokens. Extra concurrency is a queue inside llama-server, not a refusal.
  • --device CUDA0 selects the first CUDA device explicitly instead of letting the build pick a backend.
  • --load-mode none avoids memory-mapping the GGUF into system RAM. Measured: the working set fell from 7.1 GB to 1.1 GB and free RAM rose from 3.4 GB to 9.8 GB, with the model still 100% on the GPU.
  • --metrics exposes the Prometheus endpoint the usage stack scrapes. The server binds to loopback.

Layer 4: the runtime watchdog

A card can disappear while the server keeps running on the CPU. Every 15 s (LAPTOP_WATCHDOG_MS) judge() in gpu-guard.mjs looks at the live state:

SignalVerdictStrikes needed
PnP status is not OKcard lost1
nvidia-smi failsdriver or card lost1
Server pid not among GPU compute apps and under 1000 MiB of GPU memory in userunning on the CPU2 in a row
Server idle for 5 minutes and burning more than 60% CPUrunning on the CPU2 in a row

The pid check is deliberately lenient: on Windows (WDDM) the pid may not be listed, so "not listed" only counts when no model-sized GPU memory is in use either. On a verdict the watchdog stops the server by exact pid, kills the Qwen Code child and exits 3 with LAPTOP-REFUSED: GPU missing -> provider disabled (reason).

When the GPU is lost

The task fails with a clear reason, route.mjs records it in the trace and tries the next entry. The default chains put the office server and Qoder behind the laptop for exactly this. Measured on the target laptop (8 GB card): 7 of 7 easy tasks passed, 6.22 GB VRAM, about 48 tokens per second, roughly 7.3 GiB of dedicated VRAM usable by one process before spilling. A 64k context (needed by OpenCode, whose prompt alone is about 33k) uses 6.92 GB, which is why 32k is the default.

8Security model

The daemon can start processes with write access, so the defaults are conservative and each control is a line of code, not a policy document.

ControlWhereWhat it stops
Loopback bindconfigure sets daemon.listen to 127.0.0.1:<port>; the relay is disabledAnyone on the network reaching the MCP door
Password on the MCP doorA random 24-byte hex secret; only its bcrypt hash goes into the daemon config. doctor checks that a call without it gets 401Open /mcp/agents (with no password it answers anyone who can reach the port)
Owner-only filesagent-hub-secret and every client config holding the bearer are written 0600 on POSIX and with icacls (current user only) on WindowsOther local users reading the secret
No secret in process argsClient configs are written directly instead of through claude mcp add-style commands; daemon-run.ps1 removes PASEO_PASSWORD from the daemon's environmentThe secret showing in a process list, or being inherited by every agent the daemon spawns
Plugins read the secret filehubPassword() reads <paseo home>/agent-hub-secretHaving to export the password to agents
Full access only in a worktreeunsafeMode() in route.mjs drops full-access, bypass and yolo unless --new-workspace worktreeA bypass-permissions agent editing a real checkout
Clean Claude configThe claude-clean provider wraps claude --strict-mcp-config --mcp-config <empty>Worker agents inheriting the developer's MCP servers (and the memory they cost)
Secret-path hooks.claude/hooks/secret_path_guard.py blocks shell commands that name .env, *.pem, *.key, id_rsa* or credentials* (templates and samples allowed; fails closed on unparsable input); no_force_push.py blocks force pushesAn agent reading secrets with cat or curl where read-deny rules do not reach
Secret scan on resultsThe gate (section 5)A key committed into a diff
Public-repo scanjust scan greps tracked files for internal addresses, personal paths and secret patternsPublishing infrastructure details
Reversible installmcp remove deletes only the agent-hub entry; unconfigure disables MCP when it removes the passwordLeaving MCP open without auth after an uninstall

The telemetry stance

  • Counts only. Prompts are never read; the session id is not an OTLP attribute; identity attributes are deleted in the collector; the collector has no logs pipeline.
  • Qwen Code: metrics only, prompt logging off. Codex: log_user_prompt never set. Claude Code: prompt and tool-detail logging left unset.
  • OpenCode runs with OPENCODE_DISABLE_TELEMETRY=1, share: disabled, autoupdate: false, OPENCODE_DISABLE_MODELS_FETCH=1 and external skills off. Grafana analytics and update checks are off.
  • Our tools never call a server's admin endpoints. The office server's mutating routes (cache flush, weight updates and more) are open on its LAN by the server owner's choice; the hub only uses chat completions and reads /metrics.
  • Data rule: customer data may go to any configured provider; credentials never go into a prompt, and the gate's secret scan is the daemon-side enforcement.

9Install and operations

What setup.ps1 / setup.sh do

Both are idempotent. setup.sh --check (or --dry-run) reports without changing anything.

  1. Install or check Git, Node 20+, Claude Code, uv, just, gh.
  2. Install Paseo at the pinned version (0.15.2) with npm. The plugins declare "paseo": ">=0.15.0".
  3. Note which agent CLIs exist (codex, claude, qodercli, qwen, opencode). A provider is registered only for a CLI that is present; each developer logs in to their own.
  4. hub.mjs configure: write the daemon config (loopback, MCP on, injectIntoAgents on, bcrypt hash), the providers and wrappers. Host-specific values come from environment variables or config/hub.local.json (git-ignored); a provider whose input is missing is skipped with a line saying why.
  5. hub.mjs mcp add: register agent-hub in each installed client (-NoMcp / --no-mcp skips).
  6. Put plugins/usage-otel/bin on the user PATH for the agent-hub CLI.
  7. Install the service (-NoService / --no-service skips).

Service mode

Windows: a per-user Task Scheduler task, no admin. It has two triggers: at logon, and every minute. The task is set to MultipleInstances=IgnoreNew, so the every-minute trigger does nothing while the daemon runs and restarts it within a minute if it dies. The two-trigger design exists because the obvious setting, restart-on-failure, did not restart a killed daemon when tested. The task runs daemon-run.ps1, which sets the plugin environment (AGENT_HUB_MCP, AGENT_HUB_ROUTES, AGENT_HUB_OTLP, AGENT_HUB_POLLER_DIR), puts Git Bash ahead of System32's WSL bash.exe on PATH so hooks and gates run the right shell, and starts the daemon in its own hidden console and process group.

Linux: a systemd user unit (Restart=on-failure, RestartSec=5) plus loginctl enable-linger so it starts at boot without a login. On a host without a systemd user session (a container) the scripts print a skip and just up runs paseo daemon start.

Recipes

CommandWhat it does
just upEnable and start the scheduled task or systemd unit, or fall back to paseo daemon start
just downDisable the task and stop it, then paseo daemon stop. Disabling matters: otherwise the every-minute trigger would revive the daemon
just statusTask last-run info plus paseo daemon status
just pluginsSet pluginsEnabled in the daemon config and install the gate and usage plugins (daemon must be running)
just doctor [--deep]PASS/FAIL per check and per provider; just doctor --deep (also agent-hub doctor --deep) also runs one tiny task ("reply OK") on each provider and checks the agent's own line
just mcp-add / mcp-removeRegister or remove the agent-hub client entries
just uninstallService, MCP entries, providers, password hash and secret. Paseo and your agent CLIs stay
just test / just scanjust test runs the full suite (config-template check, node and python tests, hook tests); just scan scans for private hosts and secrets
# first time
pwsh ./setup.ps1          # Linux/macOS: sh ./setup.sh
just up
just plugins
just doctor --deep

Test overrides that never touch real configs: AGENT_HUB_HOME (daemon home), AGENT_HUB_PORT, AGENT_HUB_CLIENT_ROOT (every client config under one folder), AGENT_HUB_TASK (task name).

Troubleshooting

SymptomCauseFix
doctor prints WARN laptop: GPU missing; the laptop provider is not usedThe NVIDIA device is not OK in PnP (after sleep or a power change) or nvidia-smi fails. This is the guard workingRestore the GPU (restart the device or reboot); the router uses the next provider meanwhile. A heavy-run lock or low free RAM prints the same kind of warning with its own reason
The daemon stops with a Ctrl-C style exit when something else runsA stray console control event aimed at another console group reached the daemonAlready handled: daemon-run.ps1 starts the daemon in its own hidden console and process group. Start it with just up, not from a shared terminal
just down printed errors and exited 1 although the daemon stoppedPowerShell 5.1 with $ErrorActionPreference=Stop turns native stderr lines into terminating errorsFixed: Invoke-Paseo runs the CLI with errors set to Continue and only warns on a non-zero exit code
OpenCode hangs and never reaches the modelIt downloads a model catalog from models.dev at start-up; on a network where that host is unreachable the fetch blocks the whole runSet OPENCODE_DISABLE_MODELS_FETCH=1 (the installer sets it in the provider env). With it a reply came back in 6 s
OpenCode fails with context overflow on the laptopIts system prompt plus tools is about 33k tokens, over the 32k defaultUse a 64k context, or the Qwen Code harness. Keep global skills out with an empty XDG_CONFIG_HOME (done by the installer)
Agent shows a plugin as missing or gate labels never appearpluginsEnabled is off, or the daemon was not restartedjust plugins, then just down and just up
Multi-line prompts arrive cut after the first line on Windowscodex.cmd / qwen.cmd npm shims split argumentsPass the prompt on stdin, or run the CLI's JS entry with node (what route.mjs does)
A client cannot reach MCP by host nameThe daemon accepts only localhost and IP Host headers by defaultUse the IP form, or add the name to daemon.hostnames
just scan flags a fileAn internal address, personal path or secret pattern is trackedReplace it with a placeholder such as <OFFICE_QWEN_URL>
Known limitsThe hub was unreachable at 6 parallel clients in one test; this is under investigation, so keep parallel load below that until it is understood. The laptop GPU can drop off the bus after sleep: the GPU guard then refuses the laptop provider and routing falls back to the other providers. A reboot brings the GPU back.

10Multi-user: one container per developer

Paseo is a single-user daemon: its agents, logins and worktrees all belong to one account. Rather than patch user accounts into its core (estimated at 16 to 40 hours, plus a rebase burden on every release), the shared server runs one daemon per developer in its own container, behind one login proxy.

cd deploy/shared
node gen.mjs dev1 dev2 dev3        # writes compose.yaml, Caddyfile, .env.template, env/<dev>.env.template
docker run --rm caddy:2 caddy hash-password    # one hash per developer, into .env
docker compose up -d --build
  • Generated, not hand-written. gen.mjs emits the compose file, the proxy config and the env templates from a list of names.
  • Isolation. Each developer has a volume at /home/paseo (config, worktrees, CLI logins) and a network of its own on a fixed 10.79.n.0/24 range. A container cannot reach another one. One developer's logins never touch another's.
  • Login proxy. Caddy routes by host name (dev1.<domain>) to that developer's container and requires basic auth with that developer's bcrypt hash; the same URL plus /mcp/agents is the MCP door for that developer's clients. Wrong credentials, or one developer's credentials on another's host name, get 401. The proxy is the only published port and binds to loopback unless told otherwise.
  • First start. The entrypoint seeds the config inside the volume once (the office server as an OpenCode provider when its URL is set, MCP injection on, the web UI on) and runs the daemon in the foreground. A throwaway git repo is created so agents have somewhere to work.
  • Always on. restart: unless-stopped brings a crashed container back with its agents and config intact. Docker must start at logon and the host must stay awake.
  • Cost. About 0.4 GB idle and about 1 GB with one running agent per container, measured in the spike. RAM therefore grows with developers and agents.
The proxy is the only barrierInside a container the daemon has no password of its own. Add one as a second layer before exposing the proxy beyond a trusted network.

True in-process multi-user stays out of scope for v1. Per-container is simple to reason about: the isolation boundary is Docker's, not application code.

+Changes 05-11

  • Laptop watchdog false-idle kill fixed. The two laptop llama-server deaths during the benchmark (21:36, 21:45) were the hub watchdog judging a fresh agent idle and stopping the shared server. Idle now uses in-flight markers and shared last-use state, and CPU is not judged while the model loads (a5acf73, 3d9a87e).
  • Acceptance run, 18-way burst. 18 simultaneous tasks finished with no loss; slots are now Codex 3, Claude 2, Qoder 4, office cluster 6, office single GPU 3, laptop 1. agent-hub route retries a start up to 6 times with backoff and jitter, runs --gate itself in the real folder, and the gate fails closed outside a git work tree.
  • Plugin hooks no longer block. The gate plugin runs in the background and skips agents that are gone; the usage plugin no longer awaits the Qoder poller in the turn-before hook and polls the account only when the session transcript has no credits. Hooks now stay inside Paseo's 30 s RPC limit (2ebfef6).
  • OTLP 5 s timeout. MCP and OTLP calls from the usage plugin time out after 5 s, and an OTLP outage is logged once instead of on every turn.
  • Usage stack without Docker (06-11). On Windows the collector, Prometheus and Grafana run as native processes (deploy/usage/native.ps1, same pinned versions, configs, rules and dashboard, SHA-256 checked downloads into %LOCALAPPDATA%\agent-hub\usage, ports unchanged). USAGE_MODE=native|docker picks the mode; compose.yaml stays for servers.
  • Usage stack starts itself. Docker Desktop and the usage stack (collector, Prometheus, Grafana) come up on logon and on just up; just doctor now fails when the collector, Prometheus or Grafana is down (f8c7519).
  • Qoder pinned to 1.1.81. The hub uses qodercli 1.1.81 with a private config directory, because 1.1.83 ignores the tier model over ACP (served auto, no credits). Benchmarks check the pin before every cell.
  • Daemon password hash at bcrypt cost 4. The daemon bcrypt-checked the bearer token on every MCP request inside its single event loop; at cost 4 MCP calls stop saturating it.
  • Laptop server fixes. --cache-ram 0 (the host prompt cache had grown llama-server to 3.5 GB of RAM) and the launcher never starts a second server while one is still loading.
  • Routing order. Codex, then Claude, then Qoder Efficient (free, 10/10 on set B), then DeepSeek-Flash, then the office Qwen3.8-27B-NVFP cluster, then the single-GPU Qwen3.8-27B. Qoder Efficient is free: charged 0.00 credits per task (it records about 0.7).
  • Laptop context 64k. The laptop model now defaults to a 64k context (LAPTOP_CTX=32768 goes back): Qwen Code passes 4/10 hard edits at 64k against 1/10 at 32k, and the whole 8 GB card peaks at 7.5 GB with every layer on the GPU. OpenCode was worse at both sizes (1/10 at 64k, 0/10 at 32k).
  • Benchmark refreshed. Tables are A | B | C with a Performance column (0.5B + 0.2A + 0.2C + 0.1Speed), click-to-sort including Name, and the final laptop grid (Qwen Code and OpenCode at 32k and 64k).

Concurrency / slots

Proven on 5 November 2026 on a fresh daemon: 18 tasks started at the same instant (one-word reply on each provider, no laptop), then 9 at once. All finished, with no DAEMON_UNREACHABLE, no plugin hook timeout, 65 to 161 s each, free RAM 7.3 GB down to 4.6 GB.

ProviderSlotsProven in one burst
Codex33
Claude22
Qoder (Efficient, DeepSeek-Flash)44
Office Qwen Code, 2-GPU cluster66
Office Qwen Code, single GPU33
Laptop Qwen (one 64k slot)1tested alone

What limits it, in order: the daemon (one event loop; creating an agent takes 10 to 20 s once many start together), free laptop RAM (below 3 GB the laptop provider refuses to start), then the providers. The office servers could take more (cluster up to 8 requests, single GPU up to 4); do not go above these numbers without repeating the burst.

Retry. Paseo answers its 1.5 s status probe slowly while the daemon is busy, so a start can fail with DAEMON_UNREACHABLE or "Connection timed out" although nothing was started (upstream issue #6584). agent-hub route retries such a start up to 6 times (2, 4, 8, 16, 32 s plus jitter) after a random 0 to 2 s stagger. A start that created an agent is never retried.

Gate. agent-hub route --gate runs the gate itself, in the agent's real folder, with the same rules as the plugin hook. A first failure re-prompts the agent once and waits; the agent is frozen before the second check. Outside a git work tree the gate fails closed.

11Benchmarks

These are lab measurements taken on 5 November 2026 through the installed hub. They answer one question: which model, in which harness, passes which kind of task, how fast, and at what cost. The routing table in section 4 is derived from them. Models are listed by their latest version; older versions are kept only under "History". Every cell has finished; none is pending.

Method

Every run is paseo run --provider P/M --new-workspace worktree --json --no-wait, then paseo wait, then paseo inspect for usage, then the gate on the worktree, then paseo delete. A throwaway daemon, one try per cell unless a repeat is stated, a cap of 600 s (420 s on the laptop, 900 s on the office servers). Claude agents ran with a clean config directory. Every task's starting state was shown to fail its own gate before the run. A pass means the task's own gate passed; a start failure of the harness is dropped, not counted as a model fail. A pass after the cap still counts as a pass and is marked "late".

  • Set A: 7 small Python tasks (fix a test, add a function and test, rename across 3 files, summarise a log, an off-by-one, a new script, input validation). A bash gate each. Now run for every latest model.
  • Set B: 10 harder code-edit tasks; the gate is the fix commit's own tests. This is the "can it really edit code" set.
  • Set C: 3 tasks: c1 a log summary (required facts), c2 a test scaffold (tests pass on the original and kill 3 mutants), c3 a code review (names the planted bug and the fix). c2 is the hardest: a surviving mutant fails it.

Wall time is the median seconds per task. Tokens are the daemon's last-turn counters, so they under-count multi-turn runs; Qwen Code and Qoder expose none. Qoder is billed in credits, Claude in dollars including cache reads; Codex, the office servers and the laptop are flat-rate or local. Most cells are n=1 or 2, so differences of one task are noise.

Capability table: latest models (set A / set B / set C)

Performance = 0.5·B + 0.2·A + 0.2·C + 0.1·Speed (A, B, C = pass rates; Speed = fastest median in this table / this row median, so the fastest row gets 1.0; a row with no set B result shows pending (needs B) and sorts last; if B exists but A or C was not run, that set drops out, the other weights are rescaled and the cell is marked with an asterisk). Sorted by Performance, highest first, ties by set B. Partial rows count the cells done so far and are marked (partial). Click a column header to sort.

ModelHarnessSet A (7)Set B (10)Set C (3)Median sPerformance
Codex gpt-6.1-solCodex7/710/103/3820.98
Qoder Kimi-K3.1-ProQoder7/79/103/3870.92
Claude Sonnet 5.5Claude5/710/103/3800.92
Claude Haiku 5.5Claude7/79/103/3920.92
Codex gpt-6-astra *Codex6/710/103/31360.92
Qoder GLM-5.3Qoder6/79/103/3700.91
Qoder DeepSeek-FlashQoder7/710/102/3830.91
Qoder FastQoder6/710/102/3640.90
Codex gpt-6.1-terraCodex6/710/102/3670.90
Claude Opus 5.5Claude6/710/102/3700.90
Qoder EfficientQoder7/710/102/31790.87
Codex gpt-6-lunaCodex5/78/103/3730.83
Qwen3.8-27B-NVFP (2-node cluster)Qwen Code6/79/102/31090.81
Qoder Qwen3.8-FlashQoder7/78/102/3990.80
Qoder MiniMax-M3.1-FlashQoder7/76/103/31430.74
Qwen3.8-27B (single GPU)Qwen Code7/77/102/31150.74
Qoder Qwen3.8-MaxQoder6/75/103/32200.65
Qwen3.5-9B laptop, 64kQwen Code6/74/103/31250.62
Qoder GLM-5.3-FlashQoder7/73/103/31320.60
Qoder DeepSeek-V4-ProQoder6/74/102/31320.55
Qwen3.5-9B laptop, 32k (default)Qwen Code7/71/103/3760.53
Qwen3.5-9B laptop, 64kOpenCode7/71/103/31010.51
Qwen3.5-9B laptop, 32kOpenCode4/70/101/36250.19

* Codex gpt-6-astra: benchmark only; not in routing unless the owner approves. Claude cost per task: Sonnet $0.235, Opus $0.530, Haiku $0.020 (from the set B/C runs).

Harness comparison for the same model

Performance = 0.5·B + 0.2·A + 0.2·C + 0.1·Speed (A, B, C = pass rates; Speed = fastest median in this table / this row median, so the fastest row gets 1.0; a row with no set B result shows pending (needs B) and sorts last; if B exists but A or C was not run, that set drops out, the other weights are rescaled and the cell is marked with an asterisk). Sorted by Performance, highest first, ties by set B. Partial rows count the cells done so far and are marked (partial). Click a column header to sort.

The same Qwen3.8-27B served by an office server, driven by three different harnesses (all 20 cells per harness and host ran; the median is for set B):

ModelHarnessSet A (7)Set B (10)Set C (3)Median sPerformance
Qwen3.8-27B (single GPU)OpenCode7/79/102/31670.83
Qwen3.8-27B-NVFP (2-node cluster)Qwen Code6/79/102/31090.82
Qwen3.8-27B-NVFP (2-node cluster)Codex6/78/102/31210.77
Qwen3.8-27B (single GPU)Qwen Code7/77/102/31150.75
Qwen3.8-27B-NVFP (2-node cluster)OpenCode6/76/102/31520.65
Laptop Qwen3.5-9B, 64kQwen Code6/74/103/31250.63
Qwen3.8-27B (single GPU)Codex7/76/101/32330.60
Laptop Qwen3.5-9B, 32kQwen Code7/71/103/3760.55
Laptop Qwen3.5-9B, 64kOpenCode7/71/103/31010.53
Laptop Qwen3.5-9B, 32kOpenCode4/70/101/36250.19

Reading it: for the small laptop model the harness matters a lot (Qwen Code 4/10 against OpenCode 1/10 on identical tasks). On the large office model the harnesses are close and the cost is latency: a set B task takes 7 to 12 minutes there. Set C's c2 fails for every harness on both hosts, so that one is a task-side weakness, not a harness one.

Qoder tiers (qodercli 1.1.81, credits are exact)

Performance = 0.5·B + 0.2·A + 0.2·C + 0.1·Speed (A, B, C = pass rates; Speed = fastest median in this table / this row median, so the fastest row gets 1.0; a row with no set B result shows pending (needs B) and sorts last; if B exists but A or C was not run, that set drops out, the other weights are rescaled and the cell is marked with an asterisk). Sorted by Performance, highest first, ties by set B, then credits per task (cheaper first). Partial rows count the cells done so far and are marked (partial). Click a column header to sort.

Only valid runs are counted: the assistant model in the record must equal the requested tier. All nine tiers have finished set B (10 hard edits, 420 s cap).

Qoder tierSet A (7)Set B (10)Set C (3)Median sPerformanceCredit multiplierCredits charged per task
Kimi-K3.1-Pro7/79/103/3870.921.00x7.22
GLM-5.36/79/103/3700.910.80x8.34
DeepSeek-Flash7/710/102/3830.910.10x0.59
Fast6/710/102/3640.900.80x5.63
Efficient7/710/102/31790.870.00x0.00 (records ~0.74)
Qwen3.8-Flash7/78/102/3990.800.10x0.78
MiniMax-M3.1-Flash7/76/103/31430.740.10x1.54
Qwen3.8-Max6/75/103/32200.650.50x14.22
GLM-5.3-Flash7/73/103/31320.600.10x0.63
DeepSeek-V4-Pro6/74/102/31320.550.50x2.93

Credits charged per task: verified against Qoder billing 05-11: charged = recorded for paid tiers (the multiplier is already in the recorded number); Efficient records ~0.74 but is not charged. Credit multiplier: the "x Credit" label of each model in the qodercli 1.1.81 ACP model list. Set A: "running (k of 7 done)" or "pending" means not finished; nothing is estimated.

The Flash tiers cost under one credit per task, and DeepSeek-Flash passed all 10 hard edits for 0.59 credits per task, so it is the cheap Qoder lane for code edits (Fast also passes 10/10 but costs 5.6 credits per task). Qwen3.8-Max (5/10 for 14.2 credits), DeepSeek-V4-Pro (4/10), MiniMax (6/10) and GLM-5.3-Flash (3/10) are not routed.

History: superseded versions

ModelSet BSet CMedian sWhy superseded
Codex gpt-6-sol9/102/3116gpt-6.1-sol is newer
Codex gpt-5.6-sol9/103/385gpt-6.1-sol is newer
Codex gpt-5.6-terra8/103/3152gpt-6.1-terra is newer; partial run
Codex gpt-5.6-luna, Qoder Kimi-K2.8-Previewnot runnot run-a newer version exists; skipped on purpose
Qwen Code on Qwen3.8-27B, first bench (600 s cap)1/10n/a730cap too short; re-run at 900 s

The routing this produced

  • Hard code edits: Codex terra (20 of 20 over two runs), then sol, then Claude Sonnet, then the cheap Qoder tier DeepSeek-Flash, then the free lanes: Qwen Code on Qwen3.8-27B-NVFP, then Qwen3.8-27B (Qwen Code for every Qwen model, never Codex or OpenCode on the office models). Gate first, then cost, then speed.
  • Easy edits, summaries, reviews: the laptop 9B first (free), then the office Qwens and Haiku (summaries and reviews never run on Qoder: no enforced read guard there). Edits are limited to one small file with one visible test.
  • Test scaffolds (c2): avoid Opus and Codex terra for this task; the laptop 9B, Qoder Efficient and Codex sol passed it.
  • Qwen3.8-27B-NVFP (2-node cluster) (9/10 via Qwen Code) goes before Qwen3.8-27B (7/10, all inside the 15-minute cap); both are long-timeout lanes. Final ordering for hard edits: Codex terra, Codex sol, Claude Sonnet, Qoder DeepSeek-Flash, Qwen Code on Qwen3.8-27B-NVFP, Qwen Code on Qwen3.8-27B.

Laptop engine choice (set A, 7 tasks, one try)

SetupPassWall, all 7VRAMFree RAM
Ollama + Qwen Code, 32k7/7418 s6.48 GB2.2 GB
llama-server + Qwen Code, 32k (first choice, now 64k)7/7199 s6.22 GB4.9 GB
llama-server + OpenCode, 64k7/7223 s6.92 GB3.6 GB

Does the 9B need more context? (set B, laptop)

At 32k the 9B passed 1 of 10 hard edits; at 64k it passed 4 of 10. Three of the extra passes had prompts of 40k to 50k tokens, which cannot fit in 32k, so the small window was a real limit. The cost is memory: a 64k run peaks near 7.3 to 7.5 GiB of GPU memory (the whole card, including the desktop), under the 8 GB card but with little headroom, so 64k is now the laptop default (set LAPTOP_CTX=32768 to go back). Qwen Code beat OpenCode on the same tasks by 4 to 1.

How the findings changed the hub

Laptop prompt cache (--cache-ram 0)

llama-server keeps finished prompts in a host-RAM cache so a repeated prefix is cheap. With Qwen Code's 19k-token prompt that cache grew the server to 3.5 GB of system RAM and drove free RAM under the 3 GB floor, even though the model was fully on the GPU. laptop-agent.mjs now starts the server with --cache-ram 0: the per-slot KV cache on the GPU still gives prefix reuse inside a task, only the extra host copy is gone. It affects memory, not output.

The load guard

Benchmarks and heavy callers run behind a guard that checks, before every task, that CPU is under 85%, the CPU performance counter is above 50%, and free RAM is at least 3 GB. If not, it waits 60 s and checks again instead of starting the task. This is what keeps a benchmark from lagging the developer's machine, and it is the same rule the laptop pre-flight uses. The desktop alone can hold about 630 MiB of GPU memory, so the "GPU busy" threshold is configurable (LAPTOP_BUSY_MIB, default 600).

The bearer check and the load test

Under many clients, MCP calls went from about one second to 10 to 20 seconds, although nothing was busy. The cause is in the daemon: it bcrypt-checks the bearer token on every /mcp/agents request, inside its single event loop, so requests are served strictly one after another. At bcrypt cost 10 one check takes about 127 ms (cost 12, the daemon's own default, about 470 ms); a three-call task plus 300 ms status polling from six clients is about 20 requests a second against a capacity of about 9, so the queue only grows. The daemon password is a 192-bit random secret, where bcrypt cost buys nothing, so hub.mjs configure now hashes it at cost 4 (about 5 ms) and re-hashes any older, higher-cost hash. Measured with a fake instant provider so the hub, not a model, is the thing under test:

TestCost 10Cost 4
MCP, 6 clients, median / p959.1 s / 11.7 s3.0 s / 3.3 s
MCP, 10 clients, median / p9515.5 s / 20.3 s4.7 s / 5.7 s (30 of 30 ok)
Liveness probe p95 (6 / 10 clients)650 / 842 ms28 / 33 ms
CLI, 10 clients, median13.0 s7.6 s (rest is process start-up)
List only, 10 clients, median9.3 s0.5 s

Two smaller findings from the same test: each idle agent keeps a process alive (about 45 MB), so a harness must kill the agent after each task or RAM drains (64 leftover agents took about 3 GB); and the daemon logs ws_slow_request for workspace creation under load (git inspection), which slows but never fails.

Qoder: a private config directory and a version pin

qodercli --acp loads the user's MCP servers and ignores --strict-mcp-config, --mcp-config and --setting-sources, so every Qoder task started the user's other MCP servers (a Java process using about 1.3 cores each). The provider now runs qodercli --acp --config-dir ~/.paseo/hub/qoder-home, a private directory with empty settings and a link to the real login. Proof: zero extra Java processes per task. Separately, qodercli 1.1.83 ignores the requested tier over ACP and serves "auto" with no credits recorded, so the hub pins 1.1.81 and just update must not bump it until a release honours the tier again. Runs served as "auto" are excluded from every number above.

Done-bar

The acceptance spec has four conditions. Here is what the repository's measurements show for each, and what they do not.

BarResult
A1: 5x5 matrix: each of 5 clients sends a task to each of 5 providers25 of 25 cells pass. A cell passes only when the worker's file exists in the worktree with exactly the expected text; the client's own verdict line was not trusted. Clients that polled to their own cap reported "running" for agents that had finished
A2: gate pass: 7/7 laptop tasks and at least 9/10 on the code-edit set7/7 on the laptop (set A). Set B at 9/10 or better: Sonnet, Codex terra and sol (10/10), Haiku, Qoder, Codex 5.6-sol and 6-sol (9/10). Not met: the 27B office model (7 to 8/10) and the laptop 9B (not meant for set B)
A3: cost per delegated task, zero Claude-lead tokensThe target is the old Haiku-lead figure of $0.0113 per code-edit task (total cost including cache reads; Sonnet alone was $0.2282 at 4/10). A Codex-dispatched task has no Claude lead at all, so its Claude cost is zero by construction. A full live cost run through the hub is not recorded in the repository
A4: usage view: every source live or "not captured"Verified end to end on a lab stack: Claude Code, Codex and Qwen Code land in Prometheus with model labels, OpenCode (34,617 tokens in one check), Qoder credits per day, SGLang and llama-server scrapes, limit %; a marker string placed in every prompt appeared 0 times in the metrics, the Prometheus data or the Grafana database

12Design decisions and rejected options

The method was to research what already exists first, then test the candidates on a real laptop with a time box. Each row below was tried or read, not guessed.

OptionVerdictWhy
PaseoAdoptedApache-2.0; runs natively on Windows; a worktree per task; every agent CLI we use works; a diff view; an MCP endpoint and a CLI; plugin hooks. Gaps are filled by plugins, so the core stays untouched and upgrades are a version bump plus the test matrix
A2A protocolRejectedNo coding CLI speaks it natively; only community adapters exist. Direct CLI-to-CLI calls (codex exec, qwen -p, opencode run) give a better harness today. codex mcp-server has been removed
LiteLLM / Bifrost gatewayRejectedA limit proxy was ruled out. Subscription CLIs cannot be routed through a proxy without breaking their login. Two LiteLLM PyPI releases (1.82.7 and 1.82.8) shipped credential-stealing malware, so any use would need a vetted pin. Per-user usage comes from the usage plugin instead
AionUiRejectedNo worktree per task (all three agents edited the one folder in place); one shared admin account; recent builds need a vendor sign-in and have no binaries on GitHub; Qwen Code through its UI ignored our endpoint
ForgeRejected on WindowsIts gate never ran there: bash resolves to the WSL launcher, so the review gate looped. A fix needs a source patch or WSL/Docker. 29 stars; a fork estimated at 60 to 120 hours. Agents, worktrees, diff and REST/MCP did work
ghost-infer, MoE expert offloadRejectedThe laptop model must load 100% on the GPU. Offloading experts to RAM breaks that rule by design. The project was also 8 days old with one author and only the author's own benchmarks
Bigger MoE models on the 8 GB cardExcludedQwen3-Coder-30B, Qwen3.6-35B-A3B, 24B and 27B dense models do not fit without offload. A 9B dense model is the largest class that fits. A 30B coder passed 1 of 7 on the laptop at 13 times the wall time
EXL3 / ExLlamaV3RejectedNo Windows support, no 8 GB or Qwen3.5 evidence
Vibe KanbanRejectedSunsetting
Ollama as the laptop engineReplacedSame pass rate, but 2.1 times slower on the same tasks and it dipped free RAM to 2.2 GB
Routing as a daemon hookWrapper insteadagent.create.before has no labels and cannot spawn a replacement agent. Move it into a plugin if the hook grows
Multi-user inside the daemonDeferredContainer per developer (section 10)

13FAQ

Does the gate stop a bad change from landing?

No. It is a follow-up on a finished turn. It marks the result PASS, RETRY, FAIL or ERROR and re-prompts once. The caller decides what to do with a FAIL, and the work is in a throwaway worktree, not your checkout.

Can I use the hub without route.mjs?

Yes. Call MCP create_agent or paseo run yourself and name the provider. You lose the slot check, the fallback and the caller-supplied gate command; you keep the repo default gate and the usage records.

Where do real hosts and keys live?

Outside the repo. Templates hold <PLACEHOLDER> values only, just test fails on a literal URL in a template, and real values go in git-ignored *.local.* files or environment variables. Agent CLI logins stay in each developer's own home.

What does the daemon pin protect against?

Paseo ships every few days and the plugin hook API is new. The installer pins the daemon version, each plugin declares a minimum version, and the plan is a rebase job per release that runs the 5x5 matrix before a human approves.

Why does a Claude agent use a "clean" config?

A default Claude agent inherits the developer's MCP servers and plugins and costs about 2 GB for its process tree. claude-clean starts it with an empty MCP set.

Why only one laptop slot?

One 9B model with a 64k context uses about 7.5 GB of an 8 GB card (6.2 GB at 32k). Two slots either failed (2 x 16k cannot hold the client's own 19k prompt) or pushed VRAM past the safe limit and slowed both tasks. Extra callers queue in llama-server instead.

Why are tokens for Qwen Code and Qoder missing from the daemon?

The daemon reports 0 for those CLIs. The usage plugin reads each tool's own session file and books the difference since the previous turn. Qoder bills in credits, so its rows show credits.

Can a developer see another developer's usage?

On the shared dashboard, yes by design: counts per provider, model and developer, never prompts. Each developer's daemon, logins and worktrees are separate.

How do I undo the install?

just uninstall removes the service, the agent-hub MCP entries (the originals are in .agent-hub.bak files), the providers, the password hash and the secret. Paseo and your agent CLIs stay.

How do I add a new task type?

Add a key under routes in routes.local.json with an ordered list of provider/model entries, and optionally a slots or modes row for a new provider. No code change.