e2e-headless

A headless end-to-end test setup that runs a local SSH server and simulated command-line agents. SSH is a way to operate another computer securely, while headless means the test runs without a visible app interface.

In plain words
What is it for?
Use it to test host setup, SSH connections, terminal sessions, agent detection, session capture, seeded development hosts, and simulator behavior.
Why use it?
It lets developers test remote-host behavior without using a real remote machine or changing personal SSH keys. The harness provides repeatable sessions and captures what simulated agents type.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/multiplex-term/multiplex/e2e-headless
Clone the repo
git clone --depth 1 https://github.com/multiplex-term/Multiplex
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.05300
Opus 5 $0.00000 $0.02650
Sonnet 5 $0.00000 $0.01060
Haiku 4.5 $0.00000 $0.00530

Measured 2d ago against content hash eac4f814e085, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

e2e-headless scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/e2e-headless.md · 311 lines

How it starts

The opening of the file, as written. The whole thing — 311 lines — stays where its author put it; the contents beside it link to each section on GitHub.

End-to-end verification (headless, no real remote needed)

Tools/dev-sshd/harness.sh runs a user-mode sshd on 127.0.0.1:2222 (own keys under Tools/dev-sshd/state/, never touches ~/.ssh):

./Tools/dev-sshd/harness.sh start   # keys + sshd + writes state/seed.json
./Tools/dev-sshd/harness.sh demo    # tmux sessions: main, scratch, deploy, agent
./Tools/dev-sshd/harness.sh stop

The agent session fakes CLI agents: window cc sets the ✳ Claude Code OSC title, cx runs exec -a codex cat, pi sets π - harness + exec -a pi cat; all run cat, so tmux capture-pane -t agent:0 -p shows what a chip typed.

DEBUG-only env vars (the simulator shares the Mac's network; pass with the SIMCTL_CHILD_ prefix through xcrun simctl launch <UDID> app.multiplexterm.multiplex):

  • MULTIPLEX_SEED_HOST=<path to seed.json> — imports a ready devbox host (idempotent, stable UUID). ⚠ Idempotence is per install: simctl uninstall wipes hosts.json but NOT the Keychain mirror, so the next launch seeds a new devbox AND re-adopts the old record (two identically named hosts). Prefer terminate + relaunch over reinstall. Optional seed keys: workingDirs / sessionScripts / newSessionTmuxConf / agentLaunchModels feed the picker/script/conf/model paths; secondaryBackends: ["herdr"] imports a MIXED host (two probes on one connection, both backends' tiles); passphrase stores the key passphrase in the Keychain so an encrypted privateKey proves the sealed-key connect path (probe logs Accepted publickey, no prompt); "enabled": false proves the never-dials promise against a silent state/sshd.log; "backgroundKeepAlive": true starts the host opted into background keep-alive (nothing can tap that switch headlessly).
  • MULTIPLEX_AUTO_ATTACH=main,scratch — opens a terminal per entry via the real Attach route; + inside an entry groups sessions as tabs of one window. Fires once per process. MULTIPLEX_AUTO_ATTACH_HOST=devbox names the host — without it the first host wins (on a device with synced real hosts that is NOT the seed).
  • MULTIPLEX_AUTO_TMUX_COPY=1 — sends Copy Mode after attach; proof: #{pane_in_mode} becomes 1.
  • MULTIPLEX_AUTO_TMUX_CLOSE=pane|window — runs the confirmed close action through the direct SSH control path. Disposable sessions only; verify host-side.
  • MULTIPLEX_AUTO_MERGE=1 — merges every terminal window into the first through the real surrender/adopt path (moved tabs keep connections).
  • MULTIPLEX_AUTO_DROP=<local path> — drops that file into the first tab (SFTP upload + typed path, the real drag path).
  • MULTIPLEX_AUTO_ACTION_URL=multiplex://open?… — submits the URL through the exact onOpenURL → router seam once per process; the headless widget stand-in (simctl openurl's first-run confirmation can't be clicked headlessly, and idb HID taps died with Xcode 27).
  • MULTIPLEX_AUTO_BIND=<multiplex://b/…> / MULTIPLEX_BIND_AUTOPIN=<6 digits> — drive Bind Host headlessly: submit a payload through the real parse → confirm → handshake seam / answer the first machine heard with that PIN. Stage the other side with harness.sh bind (prints the PIN) or bind --print-only (prints the payload URL; transcript in state/bind.log). Proof is host-side: a multiplex:bind:<id>:<device> line in state/authorized_keys, then Accepted publickey in sshd.log. MULTIPLEX_BIND_PASSPHRASE=<text> presets KEY PASSPHRASE so a headless bind stores its key sealed; MULTIPLEX_BIND_BACKEND=<comma list> presets the pane's Backend selection, so the minted host record carries it (proof: the deck tile probes herdr, not tmux). The FIRST entry is the default that mints, and every entry is shown — herdr is the old single-backend meaning unchanged, tmux,herdr binds a MIXED host straight from the pane. ⚠ These are DeckWindow tasks — a restored terminal-only scene never runs them; simctl uninstall + simctl keychain <udid> reset first (or the mirror re-adopts the old host and the free host limit blocks the bind).
  • MULTIPLEX_AUTO_ADD_HOST=bind|manual — opens Add Host on either road for layout capture (deliberately bypasses the free-tier add gate).
  • MULTIPLEX_PRO_LOCKED=1 — free-tier mode, never persisted; with MULTIPLEX_AUTO_ATTACH=agent + the debug.agentchip hook it proves exactly ten slash-chip sends.
  • MULTIPLEX_DECK_SIZE=<w>x<h> / MULTIPLEX_TERM_SIZE=<w>x<h> (visionOS) — scene default window sizes for screenshot runs (the sim can't drag-resize).
  • MULTIPLEX_AUTO_PAYWALL=1 — the real locked paywall with a deterministic $19.99 storefront preview (simctl launches don't inherit Xcode's StoreKit session).
  • MULTIPLEX_AUTO_SETTINGS=1|theme|licenses / MULTIPLEX_AUTO_FAQ=1 — open those sheets for headless capture (theme pushes the theme editor, licenses the Open Source Licenses page).
  • MULTIPLEX_AUTO_WHATS_NEW=1|log — open the release-notes launch card / the full record behind its FULL NOTES chip. The launch gate itself is unreachable headlessly (it fires only for an install carrying a PREVIOUS version's defaults), so this is the layout road; the gate is pinned by DeckWindowUIKitTests instead. ⚠ Both screens are DeckWindow presentations — a restored terminal-only scene shows nothing — and the notification-permission alert iOS raises on a fresh install sits over the middle of the sheet with no headless way to dismiss it.
  • MULTIPLEX_AUTO_HOST_SETTINGS=1|models|backend|directories — opens the first host's edit sheet (regression-checks the Observation environment across the sheet boundary — a missing HostStore is a fatal error); models scrolls to the Agent launch models section, backend to the tmux/herdr Backend section, directories to the New session defaults working-directories editor (shown for BOTH backends — the herdr mint roots a session's world with these; only the tmux options editor stays tmux-scoped).
  • Attention alerts need Pro AND the attention.alertsEnabled switch; both live in the app container's defaults, and simctl spawn <UDID> defaults write <bundle-id> lands in a domain the sandboxed app never reads — pass the container plist path as the domain instead (… defaults write <container>/Library/Preferences/app.multiplexterm. multiplex.plist MultiplexProUnlocked -bool true, same for attention.alertsEnabled; container via simctl get_app_container … data). A stale false there logs alert dropped … locked (category attention) exactly like the Pro gate. Proof of a live edge: log stream --level debug --predicate 'category == "attention"' shows alert posted for <session> on the probe tick after the agent's title drops its spinner (Grok Build, 2026-08-16: a sleep 20 turn against this Mac's tmux).
  • MULTIPLEX_KEYCHAIN_TIP=locked|unlocked|missing — forces the keychain verdict. The sign-in-screen gate still applies: inject a needle first (e.g. tmux send-keys -t agent:cc 'Select login method:' Enter).
  • MULTIPLEX_APP_LOCK=1|held — start behind the app-lock veil (never persisted). 1 keeps the real authenticator; held refuses every attempt so the veil can be captured. Shipping toggle: Settings → App lock (AppLockStore).
  • MULTIPLEX_FORCE_SHELL=1|0 — force the single-window shell on/off. Default: iPhone always shell, iPad only when UIWindowScene.isFullScreen, visionOS never. Logged under category shell.
  • MULTIPLEX_SIDE_PANEL=0 — DEBUG-only legacy road: terminal-confirmed ▤/⌗ viewers dock as tabs instead of side panels. Pass SIMCTL_CHILD_MULTIPLEX_SIDE_PANEL=0 to preserve older recipes.

Read the full file on GitHub · 311 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 311 lines · 0 tokens per session scan A eac4f814e085

Subscribe to this mod's changes

e2e-headless is an agent published in the GitHub repository multiplex-term/Multiplex (10 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,300 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.