Skip to content

About

Self-hosted command center for AI coding agents (Claude Code, Codex CLI, GitHub Copilot CLI) — live dashboard, orchestration, and an MCP server for programmatic fleet control.

Topics

Resources

Contributing

Stars

34 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,347 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentPulse

CI License: MIT Version Bun Self-hosted Wiki Website npm

Open-source, self-hosted dashboard to monitor, orchestrate and remotely control Claude Code and Codex CLI sessions, and observe Copilot CLI and OpenCode, across all your machines.

If you run multiple Claude Code, Codex CLI, Copilot CLI, or OpenCode sessions across different terminal tabs, you know the pain: which tab is doing what? AgentPulse gives you a live dashboard that shows every active session, what it's working on, and a scrollable chat history of everything you've said to each agent.

AgentPulse dashboard showing a grid of live Claude Code, Codex CLI, Copilot CLI and OpenCode sessions, each with its status, project, session name and tool-use count

The AgentPulse dashboard: every running Claude Code, Codex CLI, Copilot CLI and OpenCode session in one grid, marked Working, Waiting, Idle or Error.

What AgentPulse is

AgentPulse has two major modes:

  • Observability -- watch Claude Code, Codex, Copilot CLI, and OpenCode sessions in real time, with prompts, responses, progress, notes, and session history in one dashboard (Copilot CLI and OpenCode are observed only -- AgentPulse can't launch or steer them)
  • Orchestration -- launch and manage sessions from AgentPulse itself with templates, supervisors, headless tasks, interactive sessions, retries, host routing, answering a managed Codex session's command and file-change approvals from the dashboard (see Answering Codex approvals), and continuing a Claude Code session you started by hand as a fork, with its approvals answered the same way (see Continuing a Claude Code session)

Plus an AI Labs layer that's very new and explicitly experimental -- see the Labs section below.

You can run AgentPulse as:

  • observability only -- hooks + dashboard, no supervisor/control plane
  • full local orchestration -- hooks + dashboard + local supervisor for launch/control on the same machine
  • remote dashboard -- relay local events to a remote AgentPulse instance

Use cases

  • Monitor multiple Claude Code sessions at once. One live grid instead of a dozen terminal tabs, with each session's state, last prompt and full history. Guide
  • See agents on every machine in one place. A relay on each laptop, desktop or server forwards events to one dashboard, with a filter by machine. Guide
  • Check on and control Claude Code from your phone or another computer. Watch any session remotely, and launch, prompt, stop or retry the ones AgentPulse started. Guide
  • Self-host it for yourself or a team. Docker or Kubernetes, SQLite or PostgreSQL, behind Authentik, Authelia, oauth2-proxy, Pomerium or Cloudflare Access. Guide
  • Let your agents manage your other agents over MCP. Claude Code or Codex CLI can list, search, launch and steer sessions through the @craze0/agentpulse-mcp server. Guide

Not sure whether you need monitoring or orchestration? See observability vs. orchestration for AI coding agents.

How it works

Your terminal tabs                          AgentPulse dashboard
┌─────────────────┐                        ┌──────────────────────┐
│ Claude Code (1) │──── hook events ──────>│  bold-falcon: active │
│ fixing auth bug │                        │  "fix the auth bug"  │
├─────────────────┤                        ├──────────────────────┤
│ Claude Code (2) │──── hook events ──────>│  zen-owl: active     │
│ writing tests   │                        │  "add unit tests"    │
├─────────────────┤                        ├──────────────────────┤
│ Codex CLI       │──── hook events ──────>│  warm-crane: idle    │
│ (idle)          │                        │  last: 5m ago        │
├─────────────────┤                        ├──────────────────────┤
│ Copilot CLI     │──── hook events ──────>│  quiet-otter: active │
│ (observed only) │                        │  "review the diff"   │
├─────────────────┤                        ├──────────────────────┤
│ OpenCode        │──── plugin events ────>│  calm-heron: idle    │
│ (observed only) │                        │  last: 2m ago        │
└─────────────────┘                        └──────────────────────┘

Each session gets a random memorable name (like bold-falcon) so you can match the dashboard to your terminal tabs at a glance. Click any session to see a live chat-style timeline of your prompts and the agent's tool usage.

Quick start

Easiest local install: 1 command

macOS / Linux:

This installs AgentPulse locally with Bun + SQLite, starts the web app and local supervisor as services, and configures Claude Code + Codex hooks automatically.

curl -fsSL https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.sh | bash

Windows:

irm https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.ps1 | iex

It needs curl and git, plus python3 for the supervisor and hooks. If it can't find a Bun 1.3.12 or newer it installs a pinned one, which also needs unzip and shasum or sha256sum. Anything missing is listed up front with the command to install it, and nothing is installed until it's there. To put Bun somewhere of your choosing (supply it again on a re-run; with a BUN_INSTALL other than ~/.bun, only $BUN_INSTALL/bin/bun is considered, not PATH):

curl -fsSL https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.sh | BUN_INSTALL=/opt/bun bash

When it finishes, open http://localhost:3000 and start a new Claude Code or Codex session.

Docker install: 1 shell line

If you prefer Docker, this starts the container, waits for health, and configures hooks:

docker run -d -p 127.0.0.1:3000:3000 -v agentpulse-data:/app/data -e DISABLE_AUTH=true --restart unless-stopped --name agentpulse ghcr.io/jstuart0/agentpulse:0.12 && until curl -fsSL http://localhost:3000/api/v1/health >/dev/null 2>&1; do sleep 1; done && curl -fsSL http://localhost:3000/setup.sh | bash

Security note: -p 127.0.0.1:3000:3000 binds the host port to localhost only. The older -p 3000:3000 form would publish on all host interfaces, exposing the auth-disabled server to your LAN. Use the 127.0.0.1: prefix whenever DISABLE_AUTH=true.

Done. Open http://localhost:3000 and you have:

  • live session observability
  • local launch/control via the supervisor
  • Claude Code + Codex hooks already configured

Why localhost? Claude Code and Codex block HTTP hooks to remote/private IPs as a security measure. Only localhost / 127.0.0.1 is allowed. This keeps things simple -- one Docker container on your machine, no networking to configure. If port 3000 is taken, use any free port:

docker run -d -p 127.0.0.1:4000:3000 -v agentpulse-data:/app/data -e DISABLE_AUTH=true -e PUBLIC_URL=http://localhost:4000 --restart unless-stopped --name agentpulse ghcr.io/jstuart0/agentpulse:0.12
curl -fsSL http://localhost:4000/setup.sh | bash

What you'll see

AgentPulse session detail view with a chat-style timeline of the user's prompts to Claude Code and the agent's tool calls shown inline

Session detail: a chat-style history of your prompts to one agent, with its tool calls inline.

  • Dashboard -- grid of all sessions with status, project name, session name, duration, and tool use count. Each session is in exactly one operational state: Waiting (the agent finished a turn, or has an outstanding permission prompt, and is waiting on you -- "Mark as seen" clears it), Error (the session failed and hasn't been dismissed -- "Dismiss error" clears it), Working (the agent is actively working right now), or Idle (nothing is waiting and the agent isn't working). Status cards above the grid filter by state; a "What do these states mean?" popover repeats this explanation in the UI
  • Session detail -- click a session to see a chat-style timeline with your prompts as blue bubbles and tool usage inline
  • Unsent prompts -- a prompt you typed in a session's box and haven't sent is kept in your browser (in plain text, in localStorage) for up to 7 days, per person and per session, so it survives switching sessions and reloading. It says "Unsent draft, saved ..." with a Discard draft button (and an Undo for a few seconds), drafts over 20,000 characters are kept only while the page is open, and Sign out removes every draft this browser holds
  • Projects -- first-class projects with cwd-based session resolution; sessions stamp themselves with the right project on ingest, templates inherit project defaults (cwd, agentType, model) with per-field overrides, and a /projects page lets you create / edit / delete them. Saving a template under a new directory auto-creates the project for you
  • Session templates -- save reusable Claude Code and Codex session setups, link them to a project for live-inheritance defaults, preview normalized launch specs, and route launches to the right host
  • Orchestration -- launch headless or interactive sessions from AgentPulse, track launch status, retry, stop, and manage sessions through the local supervisor
  • Search -- full-text across session names, prompts, plans, notes, and event payloads. SQLite uses FTS5 (BM25-ranked); Postgres uses ILIKE. Clicking an event hit jumps to the matching event in the timeline and applies a brief amber flash
  • Inbox -- single /inbox view that aggregates every open approval (HITL, Ask-driven actions, alert-rule firings), stuck / risky session warnings, and recent failures. Approve / decline inline; snooze noisy items
  • Real-time updates -- everything updates live via WebSocket, no refreshing needed
  • Random session names -- each session gets a name like brave-falcon so you can tell them apart
  • CLAUDE.md editor -- view and edit your agent instruction files from the dashboard
  • Setup page -- generates hook config you can copy-paste, or use the one-liner above
  • MCP server -- let Claude Code, Codex CLI, or any MCP-compliant agent observe and orchestrate your fleet directly (list/inspect sessions, search, launch agents, steer live sessions, decide inbox items). Ships from a checkout via agentpulse mcp serve, or standalone via the @craze0/agentpulse-mcp npm package -- no checkout required. See below.
  • AI Labs (experimental) -- optional AI layer that watches sessions, classifies health, proposes next steps with human-in-the-loop approval, plus an Ask command surface that lets you launch / edit / search / summarize / alert in natural language. Each feature is behind its own Labs toggle. See below.

MCP server

AgentPulse can be driven by an external AI coding agent over the Model Context Protocol: read tools (sessions, search, digest, AI intelligence) plus orchestration tools (launch agents, prompt/stop live sessions, decide HITL/inbox items), gated behind a scoped API key.

From a checkout:

agentpulse mcp install --mint my-agent          # observe-only (read-only), the safe default
agentpulse mcp install --mint my-agent --orchestrate  # adds launch/steer/decide -- read the security notes first

Without cloning this repo -- the standalone @craze0/agentpulse-mcp npm package:

npx @craze0/agentpulse-mcp install --mint my-agent

Either way, install prints ready-to-paste Claude Code and Codex CLI config. See docs/MCP.md for the full tool catalog, client setup, and a security section covering what a manage-scoped key can do and why Codex CLI does not honor Claude Code's confirmation prompt.

AI Labs (experimental)

AgentPulse Ask assistant answering a natural-language question about live Claude Code and Codex sessions

The Ask assistant: ask about, launch or search your agent sessions in plain language.

Heads up: the AI layer is new, shipping under explicit Labs framing. Every feature is toggleable under Settings → Labs. Contracts, UI, and defaults may change. Disable any toggle if it gets in your way -- nothing else in AgentPulse depends on it.

When enabled, AgentPulse can use an LLM provider you choose (Anthropic, OpenAI, OpenRouter, Google, or any OpenAI-compatible endpoint like Ollama / LM Studio / vLLM) to do the following. All AI work is human-in-the-loop by default: the watcher proposes, you approve or decline, and the runtime records every step as an auditable event.

Capabilities

  • Session watcher -- wakes when a turn ends (a Stop, or a managed session's own turn end) or a session ends, waits ten seconds for a follow-up, and then does up to two things for that session, each with its own switch:

    • Notify writes a two-line status note for you -- finished, looks stuck, or waiting for you -- from what happened since the last note, and puts it in the inbox and (optionally) Telegram. It never sends anything to the agent.
    • Continue asks the provider for the next prompt and opens a request for you to approve. A watcher can send it only into a session AgentPulse launched; for any other session it is a suggestion to copy.

    Secrets are redacted before anything reaches the provider. New watchers start with Notify on and Continue off (Settings → AI watcher changes that). Every note starts with a fixed line saying the text after it came from session content AgentPulse doesn't control.

  • Per-session config -- provider, the two modes, policy (ask_always / ask_on_risk / auto), daily spend cap, the most automatic sends, optional custom system prompt, and the notification channel, all from the session detail AI tab. auto sends only three fixed nudges (retry the failed step, run the tests, summarize status), asks you to confirm it first, and is paused until you turn "Pause automatic prompt sending" off in Settings.

  • Auto-enable on Ask-initiated sessions -- when Ask launches a session, a watcher row is attached at correlation time (enabled, ask_on_risk policy, default provider). Five silent-skip branches keep this from ever failing a launch: not Ask-initiated, AI inactive, user opt-out, watcher already configured, or no default provider. Settings → AI watcher has a toggle (default on) to disable.

  • Session intelligence classifier -- deterministic heuristic flags sessions as healthy / blocked / stuck / risky / complete_candidate with a one-sentence reason. Shows as a chip on dashboard cards. Optionally feeds back into watcher decisions.

  • Ask command surface -- conversational interface (web + Telegram) that turns natural language into approval cards. Every state-mutating intent goes through the same ai_action_requests atomic-claim approval pipeline, so concurrent web + Telegram approvals can't double-execute. Examples:

    • "open a Claude session for agentpulse" — queues a launch request
    • "add a project myapp at /tmp/myapp" — multi-turn drafting walks you through missing fields
    • "resume brave-falcon with: refactor the auth module" — new launch in the same cwd with the new prompt; the inbox card shows "Resume of brave-falcon" so the approver sees the parent
    • "pin brave-falcon" / "add a note to slate-bear: needs review" / "rename auth-worker to auth-refactor" — non-destructive direct execute, with the resolved session name embedded in the reply
    • "stop the auth session" / "archive completed sessions on agentpulse" / "delete template auth-setup" — destructive actions go through approval; bulk targets are previewed (cap 50, "+N more" footer)
    • "alert me when any session on agentpulse fails" / "alert when the agent mentions a security concern" — creates a project-level alert rule (constrained or freeform) with per-rule daily token budget
    • "set up a Telegram channel called personal" — creates a pending notification channel and returns the enrollment code
    • "summarize session brave-falcon" / "why did session amber-wolf fail" — bounded-transcript Q&A with provenance footer; cached for 15 minutes per (session, normalized question) and invalidated by new events
    • "show me failed sessions" / "what happened today" — read-only NL search and digest; both heuristic-only (no LLM call), so they're fast and free
    • "which sessions are waiting" / "what needs attention" — answered from the same operational state as the dashboard's status cards (waiting, or error for needs attention). The project digest and the bulk actions ("archive completed sessions…") still use the lifecycle states (active, completed, failed): they have no waiting or needs-attention filter.
    • Models that think first: every model call that produces an answer or a decision asks the provider to skip its reasoning phase. If a model still returns no answer text (for example it spent its whole output budget on reasoning), Ask shows an error instead of the model's partial reasoning. Query expansion is an optional extra: after one failed attempt it is skipped for two minutes, so a slow or busy provider costs one failed call, not one per question.
    • A separate provider for quick calls: in Settings, AI, "Use for quick calls" on a provider sends the short helper calls (Ask routing and intent checks, query expansion, alert-rule checks) to it first. A model that is busy with a long call, such as a session summary, answers nothing else until it finishes, so on a single server those short calls queue behind it and time out; a small model on its own server keeps them quick. Answers and summaries always use the default provider. The quick provider gets a short limit of its own (AGENTPULSE_AI_FAST_PROVIDER_TIMEOUT_SECONDS, 5 seconds). If it fails or times out, the call is made again on the default provider with the full limit, and the quick provider is left alone for a minute. Unset (the default) means every call uses the default provider.
    • Follow-ups: a message that points back at the conversation ("what did it change?", "and the other one?", "what else") starts from the sessions the previous answer was built from, up to two. They rank above a weak match for the new message and below a strong one, and when the message names a new subject they are dropped. A short question with no back-reference is treated as new.
    • Vector search stays current by itself: a background pass runs every minute, embedding events that arrived since the last one (hook-delivered events included) in small batches with a short pause between them, so a large backlog is worked off without slowing hook ingest. If the embedding provider is down, passes back off (a minute, doubling to 5 minutes, each retry first a single probe request) and the index catches up when it returns; no restart is needed. A full pass from the oldest event repeats every six hours.
    • Limits: at most two Ask turns run at once, across the web and Telegram together (AGENTPULSE_ASK_MAX_CONCURRENT). A turn that finds both slots taken waits up to 30 seconds in a short line, then is refused: the web answers 503 with Retry-After, the streaming web reply sends an error frame, and Telegram replies that Ask is busy. A message over 8,000 characters is refused (400 message_too_long on the web, a reply on Telegram), pinned sessionIds must be at most 20 strings of at most 128 characters (400 invalid_session_ids), and a request body over 256 KiB is 413. When vector search is on, semantic matching covers the newest 50,000 vectors of the active model within a 4-second budget; older events are still found by keyword search (see AGENTPULSE_VECTOR_SCAN_MAX_ROWS and AGENTPULSE_VECTOR_SCAN_MAX_MS).
  • Operator inbox -- single /inbox view that aggregates open HITL requests, Ask-driven action requests, stuck / risky sessions, and recently failed proposals across every session and project. Approve / decline inline, snooze noisy failed proposals for 1h / 4h / 24h / 7d, or batch decline.

  • Project digest -- /digest rolls up the last 24 hours of activity grouped by working directory: active / blocked / stuck / completed counts per repo, top plan completions, notable failures. Cached daily, manual refresh available.

  • Project alert rules -- per-project rules that fire when sessions transition (status_failed, status_completed, status_stuck, no_activity_minutes) or when a freeform LLM-evaluated condition matches an event. Evaluation runs in WatcherRunner's 60-second sweep with re-entry guard and first-run backfill (so a new status_stuck rule on a project with thirty already-stuck sessions doesn't notification-storm). Freeform rules carry their own daily token budget so cost stays bounded.

  • Template distillation (API only) -- POST /api/v1/ai/templates/distill generates a reviewable SessionTemplateInput draft from a successful session, with provenance metadata.

  • Launch recommendation (API only) -- POST /api/v1/launches/recommendation returns an advisory agent + model + host suggestion based on prior completions at the same cwd. The existing launch validator is still the resolver of record.

  • Risk classes + ask_on_risk (API only) -- configurable list of risk matchers (destructive command patterns, credential references, recent test failures) that escalate a proposed continue to HITL regardless of policy. See GET /api/v1/ai/risk-classes.

  • Guarded auto policy -- dispatch without HITL only when the session is managed, the supervisor is connected, no risk class matched, and the dispatch-filter accepts the prompt. Every other case still routes to HITL. Everything is auditable via ai_continue_sent events.

  • Spend + kill switch -- per-user daily spend cap, per-rule cap for freeform alert rules, a global kill switch in Settings that immediately pauses all watchers, and HITL / action requests carry optional timeouts that auto-expire if ignored.

  • Session summary (off by default) -- an on-demand, checkable summary of any session: outcome, what changed, what was validated, what is unfinished, a handoff to paste into another agent. See Session summary.

  • Summary spend -- money set aside for a session summary in progress counts toward "Today's spend" until the summary settles at its real cost; after a hard crash it stays counted until the server's local midnight. A call that cannot have been billed (the connection never opened, or the provider answered with a 4xx) costs nothing; a call whose outcome is unknown (a timeout, a gateway cut-off, a connection dropped mid-call) is charged its worst case, and the daily cap is checked against the worst case of the prompt actually sent. Three such failures within the breaker window (27 minutes at the default call limit; see Session summary) pause that caller's new summary requests (they answer busy) for 5 minutes, then longer on each repeat, until a call succeeds.

  • Local-model thinking suppression -- when the configured provider is OpenAI-compatible (Ollama, vLLM, llama.cpp), classifier calls send reasoning_effort: "none" so qwen3 and similar reasoning models return clean JSON instead of burying the response in chain-of-thought. Anthropic / OpenAI / Google / OpenRouter providers receive prompts unchanged.

  • Observability -- every wake emits a structured JSON log line prefixed with ai_metric (watcher run queued / completed, HITL resolution latency, classifier distribution, etc.). Pipe them into Loki / Datadog / Splunk / Elastic. Optional OTLP forwarding via AGENTPULSE_OTEL_ENDPOINT. A /api/v1/ai/diagnostics endpoint returns a point-in-time queue and flag snapshot for in-dashboard viewing.

Enable it

AI is gated by two build-time env vars and a runtime toggle:

# Compile AI in at boot
AGENTPULSE_AI_ENABLED=true

# 32+ character random string used to encrypt provider credentials at rest.
# Required whenever AGENTPULSE_AI_ENABLED=true; AgentPulse refuses to start otherwise.
AGENTPULSE_SECRETS_KEY=<your-random-string>

# Optional: forward ai_metric log events to an OTLP-compatible collector
AGENTPULSE_OTEL_ENDPOINT=https://otel.example.com/v1/metrics

Once those are set, open Settings → AI watcher, add a provider (an API key, or a local Ollama / LM Studio URL -- no key needed), then flip AI enabled on. AI work does not start until you also enable the watcher per-session from the session AI tab.

Labs flags

Each AI surface has its own Labs toggle under Settings → Labs:

Flag Default Effect when off
inbox on Hides the /inbox nav link
digest on Hides the /digest nav link
aiSessionTab on Hides the AI tab in session detail
intelligenceBadges on Hides the health chip on dashboard session cards
aiSettingsPanel on Hides the entire AI watcher section in Settings
askAssistant on Disables the Ask command surface (/ai/ask and Telegram inbound) — falls back to read-only dashboard
templateDistillation off Experimental, API-only for now
launchRecommendation off Experimental, API-only for now
riskClasses off Experimental, API-only for now
sessionSummary off Hides the Summary tab and the Summary entry points; the routes answer session_summary_disabled. Nothing is sent to your provider until you ask for a summary. See Session summary
telegramChannel off Forward HITL requests to a Telegram chat with inline Approve / Decline buttons (requires TELEGRAM_BOT_TOKEN + TELEGRAM_WEBHOOK_SECRET)

Direct URLs (/inbox, /digest, etc.) stay reachable when a flag is off -- toggling a flag hides it from the nav, not from bookmarks.

Telegram HITL (experimental, labs.telegramChannel)

When enabled, the watcher can forward its Notify reports and its HITL requests to a Telegram chat instead of (or in addition to) the in-app inbox. A request gets Approve and Dismiss buttons, and Approve appears only when the session can take a prompt and the message shows the exact text that would be sent. Useful for approving continuations from your phone while an agent is running somewhere else.

Telegram is a third-party service. By default a message carries only the session name, the verdict or decision, and a generic reason (minimal). Full detail adds the note and the suggested prompt, redacted of secrets and with home paths shortened; set it per channel in Settings, and it is never available for a group chat.

Enable it:

  1. Create a bot with @BotFather and get the bot token.
  2. Generate a webhook secret (openssl rand -hex 24) and set both env vars:
    TELEGRAM_BOT_TOKEN=<token from BotFather>
    TELEGRAM_WEBHOOK_SECRET=<≥24 random chars>
  3. Restart AgentPulse. Open Settings → Labs and flip telegramChannel on.
  4. A new Telegram HITL channel section appears in Settings. Click Set webhook once — it points Telegram at PUBLIC_URL/api/v1/channels/telegram/webhook.
  5. Click Generate code. Copy the /start <code> shown and DM it to your bot from a private chat (a group can't be tied to one person). The code is single-use and expires after 15 minutes. The bot confirms the link, and from then on only that Telegram account's taps and messages are accepted. Only a channel enrolled in a group needs re-linking (from its row in Settings) to approve or ask from Telegram; one enrolled in a private chat keeps working. In team mode, channels that belong to nobody (created before ownership was recorded) also refuse approvals until an admin re-links them.
  6. On any session, open the AI tab and assign that channel in the watcher config.

From then on, any HITL that watcher opens for that session is sent to Telegram. Tapping Approve routes through the same path as the in-app button and really types the prompt into the session: the ai_hitl_response and ai_continue_sent events fire identically, just naming Telegram as the actor.

Rate limits keep a busy fleet from flooding the chat: one routine report per session per ten minutes, at most three "stuck" or "waiting for you" reports per session per hour, and 30 messages an hour across everything. A message over a limit is skipped in Telegram and still appears in the inbox.

Safety notes:

  • The bot token is instance-wide; every chat that's enrolled via /start shares the same bot. The chat id itself is encrypted at rest with AGENTPULSE_SECRETS_KEY.
  • The webhook route validates Telegram's X-Telegram-Bot-Api-Secret-Token header against TELEGRAM_WEBHOOK_SECRET on every request (a constant-time comparison, done before the body is read), so a lucky guesser still can't forge approvals. A body over 1 MiB is refused with 413.
  • A Telegram question whose turn fails gets a fixed reply; the error detail goes to the server log, not to the chat. Some launch set-up failures (creating or cloning a project from an Ask message) still include the underlying error message in the reply; see the Known limitations in CHANGELOG.md.
  • Every inbound update (taps, Ask messages, action buttons) is checked against the enrolled private chat and the enrolled Telegram user before anything runs, and an approval is also cross-checked against the HITL row's channel_id. A callback carries only the request id and the action; the prompt and its hash always come from the server.
  • In team mode a channel belongs to the person who created it. Channels that existed before ownership was recorded belong to nobody and refuse approvals until an admin re-links them.
  • Delivery failures never block the in-app HITL path. If Telegram is down or slow, approve/decline still works from the dashboard or /inbox.

Session summary (experimental, labs.sessionSummary)

A Summary tab on each session that summarizes it on request: what it set out to do, what changed, what was checked and how that ended, what is unfinished, the next actions, and a handoff you can copy into another agent. It is never automatic: nothing is sent to your provider until you press Summarize this session.

Turn it on. AI enabled with a default provider (see Enable it), then Settings → Labs → Session summary, or press Turn on on a session's AI tab. In team mode only an admin can change Labs flags.

What is sent to the provider. The session's prompts, agent replies, notes, current task, plan summary, commands and file paths. Known secret patterns (API keys, tokens, passwords in URLs, private keys, auth headers, and the rest of the watcher's redaction rules) are masked before anything leaves. Command output is sent only for a test or build that failed, and then only its first and last 300 characters after masking. A command that reads a credential file is withheld whole. Session summaries use the built-in redaction rules only; rules you add in Settings are used by the redaction preview, not by summaries.

What it costs. Each summary is one provider call, plus one repair call if the first answer is unusable. The most it can cost, and the most with a repair, is shown under the button before you press it, and counts against the same daily AI cap as the watcher and Ask (500 cents by default). A new summary of the same session can start 30 seconds after the last attempt began. A free or local provider records no cost.

How long one call may take. Each model call (the first, and the repair if there is one) gets AGENTPULSE_SESSION_SUMMARY_TIMEOUT_SECONDS: default 360, range 30 to 1800. The repair call gets the full limit again, not what is left of the first. The limit covers connecting, the wait for the first byte and reading the answer, so a provider that stops sending mid-answer also times out. A slow local model (for example a local Ollama model) on a large session can need minutes: one call with a roughly 18,600-token prompt took about 213 seconds in testing, and the largest prompt a summary sends can take about 305 seconds. If a call hits the limit, the Summary tab names the current model and limit and says the setting can be raised; whoever runs the server sets the variable and restarts. A provider answering with a 5xx is reported as a provider error, not as a timeout.

The limit sets the other time bounds. A summary that is still generating after the lease, 2 × the limit + 60 seconds (780 seconds at the default), is shown as failed (interrupted), and a new request can then start; the same bound is how long a stuck row (a crash, a hung call) blocks. On SQLite a restart recovers such a row at boot; on Postgres it is recovered only when the lease lapses, 13 minutes at the default and 61 at the maximum. With two generation slots, two hung runs can hold both for that long. Use the same value on every replica: replicas that disagree can start a duplicate run of the same summary (and spend twice) or let retention delete a row another replica is still generating.

How it is checked. The model cites numbered events from the session. The server checks each cited event exists and what kind it is and how it ended, drops the ones that don't, and marks a claim with no confirming citation "Agent's claim only". A test or build the session ran that failed cannot be shown as passed (the result becomes "unknown", marked adjusted), nor can a pass stand when an edit came after it. A summary whose text looks like it carries instructions for whoever pastes it shows a "check before pasting" notice and relabels the copy buttons.

Limits.

  • "Observed" means a hook reported the event happened. It does not mean anyone checked a claim.
  • A cited event is checked for existence, kind and result, not for whether it proves the sentence that cites it.
  • "Agent's claim only" marks what nothing recorded confirms. Absence of that mark is not proof.
  • The check-before-pasting notice is a heuristic tripwire, not a control. Read a handoff before you paste it into an agent. It does not catch: commands in inline code whose verb is outside its list (find -delete, tar, ln), writes done by redirects, interpreter scripts and source/eval, bare hosts whose top-level domain isn't on its list, prose instructions with no code in them, loopback GET requests that have side effects, git pointed at a plain remote name, and PowerShell syntax (not parsed).
  • A summary is a snapshot. When the session moves on, a notice says how many events came after it; Update makes a new one.
  • Summaries are on demand. Nothing summarizes in the background.
  • Spend is one shared daily cap. A failure that may have been billed (a timeout, a gateway cut-off, a dropped connection) is charged the per-call maximum. Three of those within the breaker window (10 minutes, or two leases and a minute when that is longer: 27 minutes at the default call limit) make that caller's new requests answer busy for 5 minutes, then longer on each repeat. Once such charges reach a quarter of the daily cap, summaries are refused for everyone until local midnight, so one member who can make the provider time out can switch summaries off for everyone for the rest of the day.
  • The request limit (6 a minute per caller), the two generation slots, the breaker and the daily ceiling live in each server process; with more than one replica they loosen, and a restart clears them.
  • A summary is visible to everyone who can read the session. Team mode shares reads, so that is everyone on the instance with dashboard access. Observe-only API keys can't read it.
  • Stored summaries are deleted by the event-retention pass when retention is on; otherwise they stay until the session is deleted.
  • The Windows / PowerShell hook paths were never executed in this project's tests, so a summary of a Windows session depends on hook code that hasn't been tested here.

Safety posture

  • HITL by default -- Approve really sends: for a session AgentPulse launched, approving a request (in the app or in Telegram) types the prompt into the agent. Nothing the watcher writes is sent without a person, except the auto policy's three fixed nudges. auto needs you to confirm it from the dashboard, never fires while the agent is asking a question or a permission prompt is open, is limited to six sends an hour per session and 20 overall, stops at the per-session total you set, and is paused until you turn "Pause automatic prompt sending" off. Every send and every refusal is written to an append-only audit table that is not removed with the session.
  • Keep manage keys out of agent environments -- a key that can manage can approve proposals. Give agents ingest-scoped keys only. With DISABLE_AUTH on, every control that is normally "signed-in person only" (confirming auto, un-pausing, re-linking a channel) is available to any caller.
  • Dispatch filter -- every prompt (watcher-proposed or user-approved) is screened against a deny-list of destructive / injection-flavored patterns before dispatch.
  • Redactor -- the watcher's transcripts and session summaries are scrubbed of common secret patterns before being sent to your provider, with a dry-run preview available. Ask and Q&A send no extra redaction of their own; they read stored text, which is already masked at ingest (see Secrets in stored text below).
  • Prompt injection hardening -- user transcripts are embedded in an explicit <transcript> UNTRUSTED block with instructions for the model to treat the contents as data.
  • Kill switch -- flipping the single kill-switch setting pauses every watcher instantly; no per-session unwinding needed.
  • Secrets in stored text -- text an agent sends is masked on the way in, for every agent type, before it is written. A key pasted into a prompt, a command or a tool's output is replaced by a marker such as [REDACTED:anthropic_api_key] in the event's content, tool input, tool response and raw payload, and in a session's native name, model, branch, task, plan and managed thread titles. Masked text is what search, embeddings, the AI features, team-mode readers, REST, the WebSocket and MCP see. What is masked is what the built-in redaction rules recognise (key and token formats, Authorization and Cookie headers, URL passwords, PEM private keys, .env-style and YAML secret assignments, and JSON, object and --flag secret values); there are no per-install rules at ingest. Limits:
    • A text over 1,000,000 characters keeps its first and last 499,968 characters around [REDACTED:over_limit]. A tool result is scanned only as far as the part that is stored (the first 4,096 characters plus a margin).
    • Work is sliced and capped per sender. A sender (an owner's keys together, an ownerless key, a supervisor or a session) with more than 8 Mi characters waiting (32 Mi in all; many owners together can still fill it) has its events stored as [REDACTED:redaction_backlog] with their ids and names. Nothing is stored in the clear to keep up. GET /api/v1/health reports ingestRedaction counters.
    • Rows written before an upgrade are not rewritten.
    • Not masked: cwd and transcript_path (the takeover and the exclude rules compare them as written), a person's own manual rename, notes and CLAUDE.md, YAML values that contain $ ; , ( |, JSON values under 6 characters, keys such as pwd or dsn, base64- or URL-encoded keys, a secret split by invisible characters, an id or name that fits the plain-id grammar and that no rule recognises, a quoted value with an early space that runs past 4 KiB (masked to its first word only), a PEM body over 16,000 characters (its tail is kept), and a quoted secret over 4,096 characters that straddles the cut of a tool result.
    • A hook whose session_id is not a plain id of at most 200 characters (A-Za-z0-9_.:#-) is dropped before anything is stored (still answered 200, counted as sessionIdRefused).
    • A turn whose last message or pending tool call holds a mask (a Cookie or Authorization-parameters line included) is sent to a person by the watcher instead of being judged by the text next to the mask; a benign false positive costs one review.
    • Duplicate suppression of hook deliveries hashes the body as it arrived, so a low-entropy secret could be guessed from a copy of the database.

Install paths

1. Local service with Bun + SQLite

Recommended for most OSS users. No Docker, no Kubernetes. This is the full single-machine setup: dashboard, hooks, and local supervisor/control plane.

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.sh | bash

Windows:

irm https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.ps1 | iex

What it does:

  • checks its prerequisites up front and names anything missing, with the package-manager command to install it, before it installs or writes any file (it may first remove group and other write permission from its own ~/.agentpulse directories, which a umask of 002 leaves group-writable): curl, git, python3 (when the supervisor or the agent hooks will be set up, so not with --skip-supervisor --skip-hooks, nor with --disable-auth false and no --api-key, which skips both), and, only when it has to install Bun, unzip and shasum or sha256sum
  • uses a Bun 1.3.12 or newer that's already there (~/.bun, or on your PATH), as long as it is owned by you or root, isn't writable by anyone else (Homebrew's, in macOS group admin, is fine) and sits on a path of letters, digits and / . _ + - @. If it's a symbolic link, the directory of each link and of the target, and every directory above each, must meet the same rule. Otherwise it installs the pinned Bun 1.3.12 release, checked against its SHA-256, into ~/.agentpulse/bun, or into $BUN_INSTALL/bin if you set BUN_INSTALL. It doesn't edit your shell rc files, so bun isn't added to your interactive PATH; the services are given the path of the Bun that was chosen. To pick the location, run curl -fsSL … | BUN_INSTALL=/opt/bun bash (supply it again on a re-run; any BUN_INSTALL other than ~/.bun that holds an unusable Bun is refused)
  • clones AgentPulse to ~/.agentpulse/app at the latest release tag (not a branch), installs with a frozen lockfile, and builds the app. --ref <branch-or-tag> follows that ref instead (--ref main for the development branch); such an install is never updated by agentpulse update
  • writes ~/.agentpulse/bin/agentpulse, a small script that runs AgentPulse's own commands with the Bun the installer chose. It never edits your shell rc files; add export PATH="$HOME/.agentpulse/bin:$PATH" yourself to type agentpulse from any shell. It refuses to run as root
  • stores SQLite data in ~/.agentpulse/data
  • starts AgentPulse as a local service
    • macOS: launchd
    • Linux: systemd --user when available
  • writes ~/.agentpulse/supervisor.json (mode 0600, holds the supervisor credential — see AGEN-21 in the changelog)
  • starts the local supervisor service on the same machine
  • configures Claude Code + Codex hooks automatically when auth is disabled or an API key is provided
  • gives you local live-session control without extra manual setup on the same machine

Useful options:

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.sh | bash -s -- \
  --port 4000 \
  --public-url http://localhost:4000 \
  --data-dir "$HOME/.agentpulse/data"

Windows:

iwr https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.ps1 -OutFile "$env:TEMP\install-local.ps1"
powershell -ExecutionPolicy Bypass -File "$env:TEMP\install-local.ps1" -Port 4000 -PublicUrl http://localhost:4000 -DataDir "$HOME\.agentpulse\data"

If you want auth enabled from the start:

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.sh | bash -s -- \
  --disable-auth false \
  --api-key ap_your_key_here

Windows:

iwr https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.ps1 -OutFile "$env:TEMP\install-local.ps1"
powershell -ExecutionPolicy Bypass -File "$env:TEMP\install-local.ps1" -DisableAuth:$false -ApiKey ap_your_key_here

If you only want observability and do not want the local supervisor/control plane:

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.sh | bash -s -- --skip-supervisor

Windows:

iwr https://raw.githubusercontent.com/jstuart0/agentpulse/main/scripts/install-local.ps1 -OutFile "$env:TEMP\install-local.ps1"
powershell -ExecutionPolicy Bypass -File "$env:TEMP\install-local.ps1" -SkipSupervisor

That observability-only mode still gives you:

  • live session monitoring
  • prompts, responses, and progress in the dashboard
  • notes and instruction-file editing
  • remote viewing if you later use the relay path

Installing only a supervisor, for a server that runs elsewhere (Linux or macOS):

curl -fsSL https://agentpulse.example.invalid/install-local.sh | AGENTPULSE_SUPERVISOR_ENROLLMENT_TOKEN=<token> bash -s -- --supervisor-only --server-url https://agentpulse.example.invalid

Create the enrollment token on the Hosts page. The token goes on the bash side of the pipe, as a variable: the installer never takes it from the command line, and without the variable it asks for it at a hidden prompt. This installs the checkout, the supervisor service, the shim and the updater, and no server and no database. A plain http:// server URL works on a trusted network, with a line saying the link isn't encrypted: anyone on that network can read what this host and the server say to each other, and could hold the host back from an update or move it early to a newer signed release, but can't supply code (code always comes from GitHub, pinned by commit).

Updating a local install

~/.agentpulse/bin/agentpulse update, run on the machine that runs the server (or, for --supervisor-only, on that host), moves a release-tracking local install to the latest release:

  • It checks the signed release list (taken from the server's stored copy, or from the project's release site when the server can't be reached; not at all when the server reports AGENTPULSE_UPDATE_CHECK=off, see Version check), refuses anything it can't verify, and never moves to a withdrawn, older or previously failed version (--to vX.Y.Z names one; --allow-downgrade is the explicit flag for going older).
  • It stages the release beside the running copy (bun install --frozen-lockfile --ignore-scripts, then the build; a release with no bun.lock, or one that isn't a plain file, is refused as install_failed before anything is installed, because Bun's frozen install succeeds without a lockfile), starts that copy once on a throwaway copy of the database, and only then waits for the supervisor to be idle, stops the services, swaps the directories and starts the new ones. The previous copy stays as ~/.agentpulse/app.previous.
  • It refuses a checkout with changes (dirty_tree) or stray files (untracked_files). Build output, node_modules, .env* files, .DS_Store, __pycache__ and .claude/ are tolerated; the .env* files are copied to the new copy unchanged.
  • The supervisor must be idle (no session running, no open approval, no terminal) for a minute. The update waits up to 10 minutes (--wait: 2 hours), then drains for at most 2 minutes, during which a new launch or prompt on that host is refused with "This host is updating AgentPulse" and Stop keeps working.
  • If the new copy doesn't answer its health check (or its database identity changed), it puts the previous copy back, restarts what was running and never tries that version again. Events the server was sent while it was down are not recorded.
  • A SQLite update that adds a migration first takes a snapshot of the database in ~/.agentpulse/update-snapshots/ (the newest two are kept; they hold deleted-session data until replaced). agentpulse update rollback then restores it and goes back to the previous copy, losing what was written since. A Postgres install is never updated across a migration: back up the database, then re-run install-local.sh yourself.
  • agentpulse update status says what this machine knows. A run that was cut short (a crash, a power cut) is finished or undone first by the next agentpulse update.
  • It needs a service manager (launchd or systemd --user; with loginctl enable-linger on a server) and refuses in a container or a Kubernetes pod. The git it runs ignores your own git config, so set HTTPS_PROXY in the environment if you need a proxy.
  • Disk: besides the running copy it keeps app.previous, stages a second tree while it works, keeps a failed copy after a rollback until the next update, and (SQLite, when a migration is crossed) up to two database snapshots, so plan for about three copies of the checkout plus two databases. The updater's log (~/.agentpulse/logs/updater.log) rotates at about 1 MiB and keeps one older file.
  • It finds where the server listens from PORT and HOST in the checkout's .env.local (then .env), falling back to what the installer recorded; it never probes a public server URL over plain http.
  • What it does not do: it doesn't manage the relay, the statusline or the exclude check (a relay can refresh its own files if you let it: see Letting the relay refresh itself); it identifies the server's stop by the service label and the loopback port only; it doesn't check loginctl enable-linger. Re-running install-local.sh on an existing install follows the newest release tag read from the git remote without the signed release list, so on an existing install prefer agentpulse update. The real launchctl and systemctl calls are covered by stub runners in tests, not exercised against live services.
  • On Windows there is no updater: re-run install-local.ps1 (it follows releases too, and never moves a checkout that has commits the release doesn't).

Automatic updates (opt-in, off by default)

~/.agentpulse/bin/agentpulse update auto on [--allow-migrations] [--window HH:MM-HH:MM] lets this machine update itself. Run it in your own terminal. It asks you to type a phrase with a random part that changes every run (enable 3fa9c1, or allow migrations 3fa9c1 with --allow-migrations), refuses without a terminal, and refuses, naming the variable, when it sees one an agent session sets (Claude Code, Codex, OpenCode, Copilot, or any AGENTPULSE_* variable but the one the shim sets). The choice is a file on this machine (~/.agentpulse/update-consent.json); no server setting, web control, API key or MCP tool can turn it on, so a server can't update a machine whose own operator never agreed. agentpulse update auto off removes it.

What that guards, and what it doesn't. Any agent that runs commands as your account (Claude Code, Codex, Copilot CLI, OpenCode, a script) can do what you can, so this is a tripwire, not a boundary: an agent that scrubs its environment, or runs the command through a login shell that resets it, passes the variable check; one that drives a terminal reads the random phrase off the prompt as you would; and one with your file permissions can write update-consent.json and install the timer itself. A parent-process walk was considered and left out because the process table is as reshapable by the agent as its environment.

  • It installs a timer through launchd (dev.agentpulse.updater) or systemd --user (agentpulse-updater.timer) that runs agentpulse update --auto every six hours, with a PATH of fixed system directories plus the directories of the Bun and the git it found (not your whole PATH). On a server, loginctl enable-linger <user> keeps a systemd user timer running when nobody is logged in.
  • A scheduled run applies a release only if it is signed and fresh, stable (never a pre-release), newer than what is installed, not withdrawn, not one that failed here before, and at least 24 hours old (a security fix skips the wait). It runs only inside the window, and it won't cross a database migration unless you allowed migrations (a Postgres migration is never crossed). It waits up to 30 minutes for the supervisor to be idle and otherwise tries again on the next run; that, a closed window and the 24-hour wait are "not yet", not failures.
  • A failure holds the next scheduled run back 1 hour, then 6 hours, then 24 hours (the hold is written before the services are stopped, so a crash can't turn into a loop); agentpulse update by hand is never held back, and a successful one ends the hold. A version that failed after the install was touched (a rollback, a service that wouldn't stop, a snapshot that failed, or an update cut short) is never tried again. agentpulse update status shows the last outcome and when the hold ends, and an admin sees both on the Updates card in Settings. If the release list can't be fetched or verified (a blocked feed), that counts as a failure, so a security release can reach this machine up to 24 hours late in that case; update by hand if you know one is out.

2. Local Docker container

Best if you already use Docker locally.

docker run -d -p 127.0.0.1:3000:3000 -v agentpulse-data:/app/data -e DISABLE_AUTH=true --restart unless-stopped --name agentpulse ghcr.io/jstuart0/agentpulse:0.12
curl -fsSL http://localhost:3000/setup.sh | bash

Security note: -p 127.0.0.1:3000:3000 binds the host port to localhost only when DISABLE_AUTH=true. Use this form for local-only Docker; the older -p 3000:3000 shorthand publishes on all host interfaces.

Docker image tags and updates

The examples use :0.12, a release line. Replace it with the version you want. A container never updates itself: AgentPulse tells you a newer release exists (see Version check), and you move the tag.

Tag Moves? Notes
X.Y.Z (for example 0.12.3) Never The exact release. Recommended for production.
X.Y (for example 0.12) Yes, to the newest 0.12.z Recommended if you want patch fixes without a manual edit.
X Yes, to the newest 0.y.z Takes new minor releases, which can include database migrations.
latest Yes Always the highest stable release. Don't use it for anything you rely on.
sha-<12 hex> Never One build of one commit.

X.Y, X and latest move only for the highest stable release, so a backport to an older line never takes latest. A pre-release (X.Y.Z-rc.1) gets only its own tag and a sha- tag. The agentpulse-backup image used by the Kubernetes manifests carries the same tags.

Back up the volume first. Stop the container, then copy the data volume:

docker stop agentpulse
docker run --rm -v agentpulse-data:/data -v "$PWD":/backup alpine tar czf /backup/agentpulse-data-$(date +%F).tgz -C /data .

After a release that adds a database migration, an older image can refuse to start on the migrated database. Rolling back an image is therefore not a guaranteed undo: the rollback is to restore that backup (into the volume, with the container stopped) and start the older tag.

Updating by hand:

docker pull ghcr.io/jstuart0/agentpulse:0.12.3
docker stop agentpulse && docker rm agentpulse
# run again with the same options, the new tag, and the same -v agentpulse-data:/app/data

With the compose files. docker-compose.yml builds from your checkout. To run the published image, add the override file, which sets only the image (and a Watchtower label) and needs AGENTPULSE_TAG:

AGENTPULSE_TAG=0.12.3 docker compose -f docker-compose.yml -f docker-compose.image.yml pull
AGENTPULSE_TAG=0.12.3 docker compose -f docker-compose.yml -f docker-compose.image.yml up -d

(The override needs Docker Compose 2.24 or later; it unsets the base file's build.) The agentpulse-data volume stays in place.

Checking the image. The signed release list that drives the update notice doesn't cover container images. Both images carry a build-provenance attestation; verify one with the GitHub CLI before you run it:

gh attestation verify oci://ghcr.io/jstuart0/agentpulse:0.12.3 --repo jstuart0/agentpulse

Limits. Images are linux/amd64 only (on Apple silicon Docker runs them under emulation, or use the Bun install). The image has no HEALTHCHECK, so docker ps shows no health state and an orchestrator that restarts unhealthy containers needs its own probe of GET /api/v1/health (by IP or localhost: see Opening an auth-off server by name). Migrations run at start, so a container can be briefly unhealthy while an update applies.

Getting told about a new image

Pick one. All of them only notice or pull; none can back up your volume or undo a migration, so the first three suit a pinned X.Y.Z/X.Y that you move on purpose.

  1. Diun (recommended): notifies, never changes a container. It watches the registry for new tags and messages you. Run it next to your containers and label AgentPulse:

    services:
      diun:
        image: crazymax/diun:latest
        command: serve
        volumes:
          - diun-data:/data
          - /var/run/docker.sock:/var/run/docker.sock:ro
        environment:
          - DIUN_WATCH_SCHEDULE=0 */6 * * *
          - DIUN_PROVIDERS_DOCKER=true
          # Add a notifier, for example DIUN_NOTIF_TELEGRAM_TOKEN / DIUN_NOTIF_TELEGRAM_CHATIDS.
      agentpulse:
        image: ghcr.io/jstuart0/agentpulse:0.12.3
        labels:
          - diun.enable=true
          - diun.watch_mode=all
          - diun.include_tags=^\d+\.\d+\.\d+$$
    volumes:
      diun-data:

    watch_mode=all watches every tag in the repository and the regex keeps only plain X.Y.Z tags (no pre-releases, no sha- tags). The $$ is how compose writes a literal $; in a plain Diun file write $. For Kubernetes, Diun's Kubernetes provider works the same way with diun.enable annotations on the deployment.

  2. Compose on a timer. A cron job or systemd timer that runs the two docker compose ... pull and up -d commands above with the tag you've decided on. Nothing moves until you change AGENTPULSE_TAG.

  3. Podman. Add --label io.containers.autoupdate=registry to the container (or AutoUpdate=registry in a Quadlet unit) and enable podman-auto-update.timer. With a pinned X.Y.Z tag it never moves; with X.Y it takes patch releases. Podman restarts the container on the new image and rolls back if the new one fails to start under systemd.

  4. Watchtower (automatic pulls, use with care). containrrr/watchtower is archived; its maintained successor is nickfedor/watchtower. Scope it to AgentPulse with its label so it touches nothing else, and use an X.Y tag so it can only take patch releases:

    AGENTPULSE_TAG=0.12 docker compose -f docker-compose.yml -f docker-compose.image.yml up -d
    docker run -d --name watchtower --restart unless-stopped \
      -v /var/run/docker.sock:/var/run/docker.sock \
      -e WATCHTOWER_LABEL_ENABLE=true -e WATCHTOWER_CLEANUP=true \
      -e WATCHTOWER_POLL_INTERVAL=21600 \
      nickfedor/watchtower

    Mounting the Docker socket gives the container root on the host. Anyone who can run code in Watchtower, or who can make it run something, owns the machine. Watchtower takes no backup, so a patch release that migrates your database is applied with no restore point. Prefer Diun.

3. Remote dashboard + local hooks

Best if you want to monitor sessions from other devices while your agents still run on your laptop/workstation.

Use the relay installer:

curl -fsSL --proto '=https' https://your-server.example.com/setup-relay.sh | bash

That installs a local relay on localhost:4000, configures hooks automatically, and forwards events to your remote AgentPulse server. The key needs the Hook ingest and Observe (read-only) scopes — see Option B below.

Advanced: Remote dashboard + local hooks

If you want to access AgentPulse from any device on your network (phone, tablet, another machine) while still collecting events from your local agents:

Architecture:

Your Mac                                    Your server / k8s cluster
┌──────────────────────┐                   ┌──────────────────────────┐
│ Claude Code / Codex  │                   │  AgentPulse (remote)     │
│   hooks → localhost  │                   │  https://pulse.mynet.com │
│                      │                   │  Forwardauth IdP (SSO)   │
│ local relay          │─── hooks ────────>│  SQLite or Postgres      │
│   forwards events    │                   │                          │
└──────────────────────┘                   │  Browse from any device  │
                                           └──────────────────────────┘

Option A: Local with LAN access (auth enabled)

Never combine -p 0.0.0.0:3000:3000 with -e DISABLE_AUTH=true. That combination exposes all mutation APIs to anyone on the network with zero credentials. If you need LAN access, use the auth-enabled config below. If you need DISABLE_AUTH for local convenience, use -p 127.0.0.1:3000:3000 so the port is not published on network interfaces.

Run AgentPulse on your machine, bind to 0.0.0.0 so other devices on your LAN can view the dashboard. Auth is required — create a local admin via the bootstrap env vars:

docker run -d -p 0.0.0.0:3000:3000 -v agentpulse-data:/app/data \
  -e HOST=0.0.0.0 \
  -e AGENTPULSE_LOCAL_ADMIN_USERNAME=admin \
  -e AGENTPULSE_LOCAL_ADMIN_PASSWORD=<strong-password> \
  --restart unless-stopped --name agentpulse ghcr.io/jstuart0/agentpulse:0.12
( ap_key=$(if [ -t 0 ]; then s=$(stty -g 2>/dev/null) && stty -echo 2>/dev/null || { echo "Can't hide the key while you type it, so it won't be asked for here. Use the scripted form in the docs instead." >&2; exit 1; }; trap 'echo >&2; exit 130' INT TERM HUP; trap 'stty "$s" 2>/dev/null' EXIT; fi; printf 'AgentPulse API key: ' >&2; IFS= read -r k; if [ -t 0 ]; then echo >&2; fi; printf %s "$k") && case "$ap_key" in '') echo "No API key entered; nothing was installed." >&2; false;; *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-]*) echo "The API key can only contain letters, digits, '.', '_' and '-'; nothing was installed." >&2; false;; *) export AGENTPULSE_KEY="$ap_key"; curl -fsSL http://localhost:3000/setup.sh | bash;; esac )
# Dashboard: http://localhost:3000 (local) or http://your-ip:3000 (LAN)

The default config requires login via the dashboard. DO NOT add -e DISABLE_AUTH=true on any network you do not fully control.

The prompt reads the key with input hidden and hands it to the installer without it ever appearing in the command text — so it never lands in shell history or ps. It hides input with stty -echo rather than read -s, which dash — the sh on Debian and Ubuntu — doesn't have; it also works in bash and zsh. The whole snippet runs in a subshell, so the key never stays in your shell or its environment, and Ctrl-C at the prompt cancels it and restores your terminal. It refuses to ask if it can't hide what you type, and a blank answer or a key with characters outside letters, digits, ., _ and - installs nothing and says why, rather than running curl unauthenticated. For a scripted/non-interactive install, AGENTPULSE_KEY=ap_YOUR_API_KEY curl -fsSL http://localhost:3000/setup.sh | bash also works, but that form is visible in shell history; curl ... | bash -s -- --key ap_YOUR_API_KEY works too, and is visible in both shell history and the process list — prefer the read form when you're at an interactive terminal.

Option B: Remote server with local relay (recommended for k8s/VPS)

Run AgentPulse on a server you can access from anywhere -- your phone, tablet, another machine. Check on long-running agent tasks while you're away from your desk. See if that 30-minute refactor finished, whether an agent hit an error, or what all your sessions are working on -- without being at your computer.

Multiple machines can report to the same dashboard. Run the relay setup on your MacBook, your Linux build server, a cloud VM -- every agent session across all your machines shows up in one place. One dashboard to rule them all.

One command sets up everything, no repo clone needed:

curl -fsSL --proto '=https' https://your-server.example.com/setup-relay.sh | bash

It asks for the API key on the terminal (input hidden), which keeps the key out of your shell history and the process list. For unattended installs, set AGENTPULSE_KEY or pass --key ap_YOUR_KEY instead; a re-run reuses the saved key. The dashboard's Setup page has this command ready to copy, with a Mint relay key button.

That single command:

  • Checks unzip and a checksum tool (shasum or sha256sum) before it asks for the key, if it will need to install Bun, and names what's missing. It then checks the key with the server, and writes no file if the key is missing a scope (it may first remove group and other write permission from its own ~/.agentpulse directories, which are left group-writable by a umask of 002)
  • Runs the relay on your Bun if it's 1.3.12 or newer, looking in this order: $BUN_INSTALL (or ~/.bun), then your PATH. A Bun that is group-writable or owned by someone else is skipped, apart from Homebrew's on macOS (group admin). For a symbolic link, that includes every directory it leads through, and each one's parents up to /. Otherwise it installs the pinned, checksum-verified 1.3.12 release privately into ~/.agentpulse/bun (your own Bun and shell profile are left alone). Older Bun releases don't apply file modes, which the relay relies on to keep its state private.
  • Needs a HOME whose path holds only letters, digits, spaces, UTF-8 text and / . _ + - @ (non-ASCII text needs iconv to be checked), because the service files hold it.
  • Installs the relay at ~/.agentpulse/relay.ts, with its settings in ~/.agentpulse/config.json (mode 600; the key never appears in a process list, the plist or the unit)
  • Installs the Claude Code statusline at ~/.claude/statusline-agentpulse.sh and turns it on if you don't already have a statusLine (otherwise it prints the line to add)
  • Runs the relay as a macOS LaunchAgent or a Linux systemd user service that starts on login
  • Configures Claude Code + Codex hooks to point at localhost:4000, and Copilot CLI hooks too if copilot is detected on PATH or ~/.copilot exists
  • Installs the OpenCode plugins too if OpenCode is found (see OpenCode below; the plugins post to the relay)
  • Removes the obsolete ~/.agentpulse/codex-hook.sh if an older install left one

Your agents send events to localhost:4000 (allowed by Claude Code), the relay forwards them to your remote server. Open the dashboard from any device to monitor your agents in real time. Re-run the same command anytime to update the relay and statusline; the key, port and Codex-names policy from the last run are kept unless you pass new ones.

The relay key needs Hook ingest + Observe. The relay posts hooks (Hook ingest) and reads your session list to sync session names and CLAUDE.md files (Observe (read-only)). Manage is optional: it only lets the relay upload CLAUDE.md edits back to the dashboard. In Settings → API Keys, create the key with "Hook ingest" and "Observe (read-only)" checked; scopes can't be edited later, so mint a new key rather than changing an old one. The installer refuses a key without Observe. Pass --allow-missing-observe to install anyway: hooks are forwarded, but name and CLAUDE.md sync stay off.

The server needs PUBLIC_URL. /setup-relay.sh fills in the server's address from PUBLIC_URL (the first entry, if it's a comma-separated list) and never from the request's Host header. Without PUBLIC_URL, or with a localhost one (as in docker-compose.yml and .env.example), the server only serves the relay installer to requests from its own machine; everyone else gets a 503 saying to set it. The Kubernetes manifests already set it. The installers are built into the server, so what it serves always matches the server's version.

Codex thread names (--codex-names). The relay keeps Codex's session_index.jsonl and the dashboard in step, under one of two policies:

  • codex (the default): Codex's own thread names show on the dashboard. A name you set on the dashboard is written into Codex too, and generated names fill Codex threads that have no name yet.
  • agentpulse: dashboard names are canonical. Every Codex session's dashboard name is written into Codex, replacing its own titles, and renames made in Codex don't come back. "Use agent name" isn't offered for those sessions. Any key that can rename sessions can retitle your Codex threads this way.

Switch by re-running the installer with --codex-names agentpulse or --codex-names codex (it's saved as codex_name_policy in config.json). A Codex name that's already been replaced stays replaced after you switch back. To protect Codex from a runaway loop, the relay writes a given session's name at most 3 times an hour: a 4th rename of the same session within an hour reaches Codex up to 60 minutes late (the dashboard shows it at once, and the relay reports push_suppressed).

Checking on the relay. curl -s http://localhost:4000/api/v1/relay/diagnostics reports:

  • auth: the key's scopes, and which required ones are missing
  • sync.codexNames / sync.claudeMd: status, last error and last success (plus the active policy and any suppressedIds)
  • drift.relay / drift.statusline: ok when your copy matches the server's, outdated when it doesn't (re-run the installer), unknown when the server couldn't be asked, and missing when the statusline isn't installed
  • agents.codex_cli.status: hooks_not_firing when the relay has evidence Codex has been active (a foreign name change in session_index.jsonl since the hooks were installed) but no Codex hook has ever reached the relay -- almost always the un-trusted-hooks gap on Codex 0.145+ (run /hooks in Codex once), or a headless/non-interactive Codex session where nothing ever ran /hooks to trust them in the first place. Absent when there's no such evidence yet, so it can't false-positive on a Codex install that simply hasn't been used since setup.
  • queue: hooks waiting to be forwarded

When something needs your attention (a key missing Observe, an outdated relay or statusline, hooks_not_firing), the relay writes one line to ~/.agentpulse/status, and the statusline shows it as a dim · agentpulse: … hint -- e.g. · agentpulse: codex hooks not firing — run /hooks in Codex to trust them.

Manage the relay (macOS):
  Stop:    launchctl unload ~/Library/LaunchAgents/dev.agentpulse.relay.plist
  Start:   launchctl load ~/Library/LaunchAgents/dev.agentpulse.relay.plist
Manage the relay (Linux):
  Stop:    systemctl --user stop agentpulse-relay
  Start:   systemctl --user start agentpulse-relay
Both:
  Logs:    tail -f ~/.agentpulse/logs/relay.log
  Config:  cat ~/.agentpulse/config.json

Letting the relay refresh itself (opt-in)

Off by default. bun ~/.agentpulse/relay.ts update auto on (use the Bun path the installer printed if bun isn't on your PATH) lets this relay replace its own files, only these three: relay.ts, ~/.claude/statusline-agentpulse.sh and ~/.agentpulse/exclude-check.sh. Agent config files (hooks in ~/.claude, ~/.codex, ...) are never touched; re-run the installer for those. Run it in your own terminal: it asks you to type a phrase with a random part that changes every run, refuses without a terminal, and refuses when it sees an agent-session variable (the same tripwire, and the same limits, as the app's update auto on above). update auto off and update auto status do what they say. The choice is the clients part of ~/.agentpulse/update-consent.json on this machine; the app part, if you set it, is left exactly as it is.

  • One-time re-install. A relay installed before this can't do it. Re-run the relay installer once: it installs ~/.agentpulse/relay-launch.sh and points the launchd or systemd unit at it. The relay refreshes itself only when the launcher started it (AGENTPULSE_RELAY_LAUNCHER=1); one you start by hand never does.
  • What it needs to hold. Every hour, with nothing sent but two plain GETs to your own server (no key, cookie or custom header; no redirect is followed; https, or a loopback address, only): the server's /api/v1/health?manifest=1 and /setup-relay.sh. The signed release manifest must verify against the key built into the relay and not be stale or older than one the relay already accepted; your server's version must be a newer, signed, stable release that isn't withdrawn and isn't below the manifest's minimum; and every file your server serves must hash to that release's digest. Anything else writes nothing.
  • Which files change. The relay, the statusline and the exclude check are each replaced only if the copy on disk is a plain file of yours that is byte for byte a copy an earlier release shipped; a link (a development checkout), a file you edited, or a newer one is left alone, and the relay log says which. The server's own version is only a hint: if the signed manifest lists a newer security release, nothing is applied until your server has caught up. Each new file is written beside the old one (.new), tried in a throwaway home with a scrubbed environment (the relay checks it excludes what it should; the shell files must parse and behave), and only then renamed into place. If any check fails, nothing is replaced, the version is remembered as refused (relay-update-state.json) and not tried again.
  • If the new relay doesn't start. The old relay is kept as relay.ts.prev (and the statusline and exclude check it replaced as statusline-agentpulse.sh.prev and exclude-check.sh.prev, so a rollback never leaves the three at different releases) and the relay exits so the launcher starts the new one. A crash halfway through the swap, which leaves no relay.ts, is repaired the same way at the next start. The new relay removes relay-pending.json once it is listening on 127.0.0.1 and its own /health answers within 30 seconds, whatever your remote server is doing. If it hasn't done that after two starts, the launcher puts relay.ts.prev back and that version isn't tried again.
  • Limits. A healthy update can be rolled back for good if two unrelated restarts land inside the 30-second confirm window; that version is skipped until the next release. A relay that hangs before it binds its port isn't counted as a failed start. relay-launch.sh is never updated by the relay, so a launcher fix needs a re-run of the installer.
  • Where it doesn't help. A statusline or exclude check from a release that has left the manifest's list of 30 is left alone; a machine with no relay never refreshes those two; hooks written into agent configs are yours to re-install when a release changes them. Nothing here has been run against a real launchd or systemd service in this repo's tests (the units are stubbed); exit(0) being restarted by KeepAlive / Restart=always is the documented behaviour and is checked by hand on a real machine before relying on it.

Reset or uninstall the relay. Everything the relay keeps lives in ~/.agentpulse/:

Path What it is
config.json Server URL, API key, port, codex_name_policy
installed.json When the installer last wrote the agent hooks
relay.ts, logs/ The relay and its logs
relay-launch.sh What the service unit runs: starts the relay and puts the previous one back if a refreshed one fails to start twice
relay.ts.prev, exclude-check.sh.prev, ~/.claude/statusline-agentpulse.sh.prev, relay-pending.json, relay-update-state.json, relay-update-refused.json, update-consent.json Self-refresh: the previous relay, a refresh waiting to be confirmed, what the relay has accepted or refused, and your consent
bun/ The pinned Bun 1.3.12 that the relay and the local install use when no usable Bun (1.3.12+, owned by you or root, not writable by others) was found
status The one-line hint the statusline shows (absent when all is well)
local-sessions.json Sessions this relay forwarded hooks for (the only ones it syncs CLAUDE.md for)
codex-pull-state.json Which Codex names were already sent to the dashboard
codex-pushed.jsonl Every name the relay wrote into Codex's session_index.jsonl
hook-queue/ Hooks waiting to be forwarded
cache/ A checksum of each Claude name the statusline already sent to the dashboard (not the name itself)

Plus the service (~/Library/LaunchAgents/dev.agentpulse.relay.plist or ~/.config/systemd/user/agentpulse-relay.service) and ~/.claude/statusline-agentpulse.sh.

  • Reset (clear sync state, keep the install): stop the relay, delete status, local-sessions.json, codex-pull-state.json, cache/ and hook-queue/ (unsent hooks are lost), then start it again.
  • Uninstall: stop the relay and delete the service file, all of ~/.agentpulse/ and ~/.claude/statusline-agentpulse.sh. Deleting ~/.agentpulse/ also removes a local install's app, data and Bun that live there (app/, data/, bun/), so back up data/ first if you ran install-local.sh on the same machine. Remove the statusLine entry and the AgentPulse hooks from ~/.claude/settings.json, and ~/.codex/hooks.json if nothing else uses it.
  • Keep codex-pushed.jsonl unless you're uninstalling. It's how the relay tells its own writes in Codex's index from Codex's. Without it, under the codex policy the relay would read the names it wrote earlier as Codex's own and send them back to the dashboard as agent names.

Option C: Kubernetes with forwardauth SSO (Authentik / Authelia / oauth2-proxy / Pomerium / Cloudflare Access)

See deploy/k8s/ for full manifests including Traefik IngressRoute with split auth (hooks bypass SSO, dashboard is forwardauth-protected). The IngressRoute has separate rules so /api/v1/hooks uses API key auth while everything else goes through your forwardauth IdP.

The homelab example uses Authentik; other providers work via env config — set FORWARDAUTH_PROVIDER and the FORWARDAUTH_HEADER_* vars to match your IdP's headers. See deploy/k8s/FORWARDAUTH.md for provider-specific setup instructions.

Configuration

Authentication

By default, AgentPulse generates an API key on first start (printed in server logs). Pass it to the setup script — prefer the hidden-prompt form, which keeps the key out of both ps and shell history:

( ap_key=$(if [ -t 0 ]; then s=$(stty -g 2>/dev/null) && stty -echo 2>/dev/null || { echo "Can't hide the key while you type it, so it won't be asked for here. Use the scripted form in the docs instead." >&2; exit 1; }; trap 'echo >&2; exit 130' INT TERM HUP; trap 'stty "$s" 2>/dev/null' EXIT; fi; printf 'AgentPulse API key: ' >&2; IFS= read -r k; if [ -t 0 ]; then echo >&2; fi; printf %s "$k") && case "$ap_key" in '') echo "No API key entered; nothing was installed." >&2; false;; *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-]*) echo "The API key can only contain letters, digits, '.', '_' and '-'; nothing was installed." >&2; false;; *) export AGENTPULSE_KEY="$ap_key"; curl -fsSL http://localhost:3000/setup.sh | bash;; esac )

Works in dash, bash and zsh. For a scripted/non-interactive install, AGENTPULSE_KEY=ap_YOUR_KEY curl -fsSL http://localhost:3000/setup.sh | bash also works, but is visible in shell history.

For local use where you don't need auth, set DISABLE_AUTH=true (as shown in quick start).

Opening an auth-off server by name

With DISABLE_AUTH=true the server answers 403 bad_origin to any /api request whose Host isn't localhost, an IP address (for example 192.168.1.5:3000), or a name listed in PUBLIC_URL, and to any request a browser marks as cross-site. Both refusals carry a message ("AgentPulse refuses requests from other websites." for the second). Opening it by a name such as http://mybox.local:3000 therefore shows a "This address isn't allowed" page until you fix it:

  • Put the name in PUBLIC_URL on the server and restart it: PUBLIC_URL=http://mybox.local:3000. Separate several with commas.
  • Or open it by IP address or localhost.

Things that stop working until then, because they reach the server by a name:

  • Hook shims, the OpenCode plugin, the relay and the supervisor with a --url or AGENTPULSE_SERVER_URL that uses the name. The installers and agentpulse setup check this and say so. A relay keeps events queued but drops a queued file after 24 hours or 10,000 files; a supervisor's offline outbox ages out after 24 hours.
  • Monitors that probe by service name (http://agentpulse:3000/api/v1/health). Probe by IP or localhost, or add the name to PUBLIC_URL. /health is gated too.
  • The Telegram webhook, if you set it through a name that is now refused. Add the name to PUBLIC_URL, or open the dashboard at an accepted address and press Set webhook again.
  • An address with an IPv6 zone ([fe80::1%25en0]) is refused. Use a global or unique-local address.
  • Requests with Origin: null (a file:// page, a sandboxed or data: frame, a redirect-tainted request, some browser extensions) are refused.

Running the Vite dev server? Its own allowedHosts setting is the rebinding protection on port 5173. Never set it to true.

This is for servers on a network you control. A page on your own machine (localhost, 127.x.x.x, [::1]) is accepted only on the server's own port, or on the Vite dev server's port 5173 when NODE_ENV isn't production. For another local dev origin, list it in PUBLIC_URL. The Origin's scheme must also match the request's: an http:// Origin against an https:// request URL is refused. The scheme is read from the request URL, never from X-Forwarded-Proto, so a server behind a TLS-terminating proxy should list its public https:// name in PUBLIC_URL.

Remote server

If AgentPulse runs on a different machine, install the relay (see Option B). It runs on that machine, keeps your key out of agent config, queues events on disk when the server is unreachable, and applies your exclude rules before anything is sent:

curl -fsSL --proto '=https' https://your-server.example.com/setup-relay.sh | bash

Set PUBLIC_URL on the server to its public address: the relay installer takes the server URL from it, never from the request.

Database

SQLite (stored at ./data/agentpulse.db) is the default. Zero-config, single-file, handles home-lab and small-team scale comfortably.

PostgreSQL is supported as of v0.4.0 for production and multi-replica deployments. Set DATABASE_URL=postgres://user:password@host:5432/dbname and AgentPulse uses Postgres instead of SQLite. See Production / multi-replica with Postgres below.

Limitations in this release: vector search (event_embeddings) remains SQLite-only (pgvector port is a follow-up); search on Postgres uses ILIKE rather than tsvector (adequate for moderate event volumes; tsvector migration is a follow-up for high-volume deployments). There is no SQLite→Postgres data migrator — Postgres installs start fresh.

Security headers

AgentPulse ships a Content-Security-Policy-Report-Only header (as of 0.3.0). This surfaces CSP violations in POST /api/v1/csp-report (structured JSON log) without blocking anything. Enforcement mode (Content-Security-Policy) will follow in a future release once reports are clean in production.

All environment variables

Variable Default Description
PORT 3000 Server port
HOST 127.0.0.1 Bind address. The published Docker image overrides this to 0.0.0.0 via ENV HOST=0.0.0.0; bare bun run start binds localhost only.
PUBLIC_URL http://localhost:3000 Public URL (used in setup script). Comma-separated. With DISABLE_AUTH=true its names are also the only non-IP names the API answers on, and its origins the only ones accepted for live updates beyond the request's own.
DATA_DIR ./data Base directory for local SQLite storage
SQLITE_PATH ${DATA_DIR}/agentpulse.db Override the SQLite database file path
DISABLE_AUTH false Skip all authentication. The API still refuses Hosts other than localhost, an IP address or a PUBLIC_URL name, and cross-site browser requests (403 bad_origin).
AGENTPULSE_ALLOW_SIGNUP false Allow open signup on an empty instance. Set true to enable the first-run signup flow. Once any user exists, signup is blocked regardless.
AGENTPULSE_MODE (unset) solo or team. Fixes the instance mode and stops the UI changing it; any other value stops boot. Unset: the mode is chosen in Settings (solo until an admin switches). See Teams.
AGENTPULSE_ADMIN_SSO_SUBJECTS (unset) Comma-separated identity-provider subjects (stable uids, never usernames) that are admins. Needs the uid header configured; see deploy/k8s/FORWARDAUTH.md.
AGENTPULSE_SESSION_CREATE_LIMIT 120 Team mode: new sessions one person (or one key with no owner) may create per minute. A positive whole number. Counted in memory, per server process.
AGENTPULSE_SKIP (unset) Set in an agent's environment to 1, true, yes or on to keep that run from being reported. A client-side setting; see Excluding directories.
AGENTPULSE_CODEX_RESUME_WINDOW_HOURS 24 Supervisor, Codex observer: a Codex rollout file written to within this many hours is followed wherever it sits under ~/.codex/sessions, so a session resumed from an older date directory is picked up (within a few minutes of its first write). A file seen this way for the first time is followed from its first line written in the last 15 minutes (or from its end if no recent timestamp is found in its last 256 KiB); older history is not replayed. 0 turns it off. The exclude rules apply as for any other rollout file.
AGENTPULSE_RELAY_LOCAL_URL http://localhost:4000 Where agentpulse exclude check looks for the local relay.
FORWARDAUTH_TRUST_SECRET Shared secret for the forwardauth header trust gate (k8s SSO deployments). Generate with openssl rand -hex 32. See deploy/k8s/FORWARDAUTH.md. Legacy alias AGENTPULSE_AUTHENTIK_TRUST_SECRET accepted for one release.
FORWARDAUTH_PROVIDER authentik Forwardauth provider label. Appears in the dashboard UI and /auth/me response. Only "authentik" triggers the Authentik sign-out URL; other values render the provider name and return signOutUrl: null.
FORWARDAUTH_HEADER_USERNAME X-Authentik-Username Header carrying the authenticated username from the upstream IdP.
FORWARDAUTH_HEADER_EMAIL X-Authentik-Email Header carrying the authenticated email address.
FORWARDAUTH_HEADER_GROUPS X-Authentik-Groups Header carrying group memberships.
FORWARDAUTH_HEADER_NAME X-Authentik-Name Header carrying the user's display name.
FORWARDAUTH_HEADER_UID X-Authentik-Uid Header carrying the unique user identifier.
FORWARDAUTH_HEADER_VERIFY X-Authentik-Verify Header used to carry the trust secret from Traefik to AgentPulse.
FORWARDAUTH_HEADER_STRIP_PREFIX X-Authentik- Prefix of IdP identity headers stripped before forwardauth runs.
AGENTPULSE_SSO_SESSION_DURATION_MS 28800000 (8 h) Lifetime in milliseconds of the ap_session cookie minted by the forwardauth session bridge. Local-auth sessions use a separate 30-day TTL and are unaffected.
LOG_LEVEL info debug, info, warn, error
AGENTPULSE_TELEMETRY on Set off to disable anonymous telemetry
DO_NOT_TRACK Set 1 to disable telemetry (standard)
AGENTPULSE_TELEMETRY_MODE inferred Telemetry install class override: self_hosted_real, production, dev, test, or ci
AGENTPULSE_TELEMETRY_TEST Set 1 to force this install to report as test
AGENTPULSE_UPDATE_CHECK on Set off (or false, 0) to stop the daily check for a newer release. Separate from telemetry: DO_NOT_TRACK and AGENTPULSE_TELEMETRY don't turn it off. See Version check.
AGENTPULSE_AI_ENABLED false Compile the AI Labs layer in at boot. Off = zero AI services, routes, or UI (non-AI install footprint is identical to pre-AI).
AGENTPULSE_SECRETS_KEY Required when AGENTPULSE_AI_ENABLED=true, and for mobile push (it encrypts each phone's relay send token; without it phones can't register). 32+ random chars; encrypts credentials at rest (AES-256-GCM).
AGENTPULSE_PUSH_RELAY_URL The push relay for the companion app, e.g. https://relay.example.com. https only (plain http only for loopback outside production). Push is off unless this and AGENTPULSE_SECRETS_KEY are both set.
AGENTPULSE_OTEL_ENDPOINT Optional OTLP metrics endpoint. When set, ai_metric log events are also forwarded as OTLP.
AGENTPULSE_VECTOR_SCAN_MAX_ROWS 50000 Vector search only (SQLite). Most vectors one Ask semantic scan reads, newest first. Range 1,000 to 5,000,000; out-of-range values are clamped.
AGENTPULSE_VECTOR_SCAN_MAX_MS 4000 Longest one Ask semantic scan runs, in milliseconds, pacing included. Range 250 to 60,000.
AGENTPULSE_VECTOR_SCAN_CPU_SHARE 0.3 Share of CPU all concurrent semantic scans together may use. Range 0.05 to 1; 1 turns pacing off.
AGENTPULSE_ASK_MAX_CONCURRENT 2 Ask turns that may run at once, web and Telegram together, per process. Range 1 to 8.
AGENTPULSE_ASK_ANSWER_TIMEOUT_SECONDS 180 Ask: the time limit of the model call that writes the answer (streamed or not), and of a per-session Q&A answer, in seconds. Range 30 to 1800; out-of-range values are clamped.
AGENTPULSE_AI_HELPER_TIMEOUT_SECONDS 20 The time limit of the short helper calls, in seconds: the Ask intent classifiers, Ask query expansion and the alert-rule yes/no check. Range 5 to 300. Raise it if your model must load before it answers.
AGENTPULSE_AI_FAST_PROVIDER_TIMEOUT_SECONDS 5 The time limit of the attempt on the provider chosen for quick calls (Settings, AI), in seconds. Range 1 to 60. On failure the call is repeated on the default provider with the full helper limit.
AGENTPULSE_WATCHER_TIMEOUT_SECONDS 90 The time limit of each watcher model call (the Notify note and the Continue decision), in seconds. Range 10 to 1800; out-of-range values are clamped.
AGENTPULSE_SESSION_SUMMARY_TIMEOUT_SECONDS 360 Session summary: the time limit of one model call, in seconds, per call (the repair call gets the full limit too). Range 30 to 1800; out-of-range values are clamped. The summary lease is 2 × this + 60 seconds (780 at the default), and the failure breaker window scales with it. Set the same value on every replica. On Postgres a stuck summary is recovered only at the lease.
AGENTPULSE_MANAGED_SESSION_MAX_SILENCE_HOURS 72 Hours of silence after which a supervisor-launched session stops being exempt from the inactivity sweep, even while its host is heartbeating, and completes. The next hook reopens it. Range 1 to 720.
DATABASE_URL "" (SQLite) Postgres connection string. When set to a postgres://... URL, AgentPulse uses PostgreSQL instead of SQLite. Example: postgres://agentpulse:password@host:5432/agentpulse?sslmode=require. Leave unset or empty for SQLite.
AGENTPULSE_PG_POOL_MAX 10 Maximum Postgres connection pool size. Integer in [1, 100]. Tune based on your Postgres server's max_connections and replica count.
AGENTPULSE_LEGACY_INIT (unset) SQLite existing-install migration behaviour. Set to "false" to boot an existing SQLite install through Drizzle migrate() (opt-in; it reconciles the migration ledger first and refuses to start, with a message, if the schema and the ledger disagree). Unset keeps the legacy initializeDatabase() path for existing SQLite installs, which also records the ledger. See deploy/k8s/README.md, "Moving an existing SQLite install to Drizzle migrate".
TELEGRAM_BOT_TOKEN Instance-wide Telegram bot token (get one from @BotFather). Required to enable the Telegram HITL channel.
TELEGRAM_WEBHOOK_SECRET Shared secret Telegram echoes back on every webhook callback. ≥24 random chars. Required when TELEGRAM_BOT_TOKEN is set.

Telemetry classification defaults:

  • CI=true reports as ci
  • prerelease/dev builds report as dev
  • stable production builds report as self_hosted_real
  • set AGENTPULSE_TELEMETRY_MODE=test or AGENTPULSE_TELEMETRY_TEST=1 for local/test deployments so they do not pollute real-world usage counts

Version check

The server looks for a newer release once a day. It makes one GET of a signed release manifest from a fixed HTTPS address (the project's GitHub Pages site). The request carries no cookie, no query string, no custom header, no installation id and no server address, so it says nothing about you beyond what any web request does. A response over 32 KiB, a redirect or a non-HTTPS address is refused. A failed check is silent: it backs off (1 hour, 6 hours, then 24 hours), writes at most one short log line a day, and never changes /api/v1/health's status. An airgapped server shows no banner and no error.

The manifest is signed with a key whose public half ships in the code. A server that can't verify it (including every install until the first signed release) shows a quiet "Can't verify updates. Update by hand." and nothing red. When it verifies, an admin sees an "Update available" badge in the top bar, or a red banner for a security release, a withdrawn version or a version that is no longer supported; everyone else sees only the red ones. Settings > Updates shows the running and latest versions, how to update for how this server is installed, and a Check now button (admins, once a minute; with DISABLE_AUTH=true only from localhost).

Nothing updates itself. The check only tells you.

  • In a container or Kubernetes pod the Updates card shows the commands for your install kind and nothing runs by itself; see Docker image tags and updates.
  • Turn it off with AGENTPULSE_UPDATE_CHECK=off. DO_NOT_TRACK=1 doesn't turn it off, because this request identifies nothing. Off covers this machine's updater too: when the server answers and says its check is off, agentpulse update (by hand or scheduled) doesn't fetch the release list and doesn't update, and ends with update_check_off; turn the check back on, or update by hand (install-local.sh). If the server can't be reached, the updater reads the release list from the same fixed address as the server would, and a server whose check is on but that holds no verified list yet is treated the same way.
  • GET /api/v1/health carries update and GET /api/v1/capabilities carries the full status (state may be a name a newer server adds; treat anything you don't know as unknown). GET /api/v1/health?manifest=1 also returns the verified envelope.
  • The MCP tool get_update_status reads the same status.

Teams

AgentPulse runs in one of two modes. Solo is the default and behaves as it always has: every signed-in user sees and can do everything, and nothing about ownership is enforced. Team adds people, admins and owner checks on top. Switching never deletes anything; sessions, keys and hosts keep the owner they were recorded with, and solo mode simply hides the labels.

Team mode needs authentication. It can't be turned on while DISABLE_AUTH=true, and the server refuses to boot that way.

Switching

  • From Settings. An admin opens Settings → Team → Set up team mode. Every API key that has no owner and can manage needs a decision first: keep it as an admin service key, give it an owner, or revoke it. The decisions and the switch happen together or not at all. Switch back to solo mode is in the same place and asks again next time.
  • From the environment. AGENTPULSE_MODE=team (or solo) fixes the mode and the UI can't change it. A value that is neither is refused at boot. With team, the server also refuses to start unless someone can sign in as an admin (AGENTPULSE_LOCAL_ADMIN_USERNAME with AGENTPULSE_LOCAL_ADMIN_PASSWORD, an existing admin, or a subject in AGENTPULSE_ADMIN_SSO_SUBJECTS). Keys with no owner and manage scope are not asked about in this case: they act as members until an admin keeps or assigns them in Settings, so automation that used one for settings or key management gets 403 admin_required. Boot logs a warning naming such keys by prefix.
  • SSO-only installs can't switch from the UI until AGENTPULSE_ADMIN_SSO_SUBJECTS lists at least one admin and the server has restarted. List stable uids (your identity provider's uid header, see deploy/k8s/FORWARDAUTH.md), never display usernames: an identity provider can hand a username to someone else.

What team mode is not

Everyone who can sign in sees every session. Team mode attributes work to people. It does not make anything private.

  • Any member can open any session, and read its prompts, events, notes, names, hosts and launch outcomes. The owner filter in the dashboard is a view, not access control.
  • Any member can prompt, stop or retry any managed session, and can launch on any host, including hosts other members enrolled. A launch carries its prompt and environment to that host's supervisor. A launch that names no host runs on the first host that can run it, which may be another member's machine: name your own host to keep the prompt and environment on your machines.
  • A host's owner (their supervisor, and anyone holding that host's credential) can read, write to and close sessions launched on that host by anyone, because the agent runs on their machine. Owning a host controls who may rotate or revoke it, not who may launch on it.
  • Live updates go to every signed-in browser, whatever its owner filter says. Every observe-scoped API key reads everything too. A respond-scoped key's live feed is narrowed to the sessions it can read (its owner's, unowned ones, or all for an admin), but that is feed scoping, not isolation: the REST reads it can also make are shared across the team like any other key's, so it is not a way to keep another member's sessions private.
  • Open tabs keep session names and directories in the browser's local storage, per signed-in user.

What team mode does enforce: deleting, archiving, renaming, pinning a session, and editing its notes or stored CLAUDE.md, need the session's owner or an admin (a session nobody owns is open to any signed-in member). Revoking a key needs its owner or an admin. Rotating or revoking a host needs its owner or an admin. Marking a session as seen counts for its owner or an admin. Every setting except the theme, plus the AI, Telegram, labs and search administration routes and scratch-workspace cleanup, is admin-only. User management and the mode switch need a signed-in human admin; an API key can never do them, whoever owns it.

Who owns what

  • A session's owner is whoever's API key reported it, decided when the session is first created. This is attribution by key possession, not authentication of a person: anyone holding your key reports as you. The first write wins; later events never change the owner. A session launched from the dashboard is owned by whoever launched it. An admin can change an owner on the session page.
  • Use your own key on each machine. A key you mint is owned by you, and so are the sessions it reports. A key minted by a member (on the Setup page or in Settings), or by a key that member owns (agentpulse mcp install --mint), belongs to that member.
  • Service keys have no owner (shared automation, CI). An admin marks one when minting it. A service key that can manage and is kept as an admin service key acts as an admin in team mode; any other service key acts as a member. Sessions reported only by a service key show as "Service key"; sessions nobody owns show as "Unassigned". An admin can hand every unassigned session to one person.
  • In team mode, once an owned session exists, hook events for it from a key that belongs to someone else are dropped (still answered 200) and counted. Events are accepted from the owner's keys, the key the session was first reported with, keys owned by the owner of the host the session runs on, and, for a launched session whose host has no recorded key yet, a service key.

After switching to team: hosts

Every host (supervisor) that existed before the switch has no owner. Hook events for a session launched from the dashboard on a host are accepted only from a key owned by that host's owner, or from a service key. So give each existing host an owner (Hosts page → Change owner, or PATCH /api/v1/admin/supervisors/:id), or keep the key that machine reports with as a service key. Until then, hook events for dashboard-launched sessions from that host are ignored. Enrollment tokens with no recorded creator are deactivated by the switch; enroll again as a signed-in member.

Offboarding

Disable the person in AgentPulse (Settings → Team, the person's row). Removing them at the identity provider is not enough: their API keys and any host they own keep working until they are disabled here. Disabling ends their sign-ins, deactivates their API keys and enrollment tokens, revokes the hosts they own, and closes their open dashboard connections. The dialog shows an "Also revoke their N hosts" box (on by default, and only when the person owns hosts); unchecked, the hosts stay enrolled, still owned by the disabled person, and can still run launches. The API takes the same choice as revokeHosts: false. Their sessions stay, still owned by them. Re-enabling does not restore revoked keys or hosts. The last active admin can't be disabled or demoted, nor can an admin whose role comes from AGENTPULSE_ADMIN_SSO_SUBJECTS.

People

  • SSO users get an account the first time they sign in. They are members unless their uid is in AGENTPULSE_ADMIN_SSO_SUBJECTS.
  • An admin can add a local account (Settings → Team). AgentPulse generates a password, shows it once and makes the person replace it at first sign-in; until they do, their API keys get 403 password_change_required everywhere except hook ingestion, which keeps accepting events (this is true on solo installs too). An admin can reset a local account's password the same way; that ends the account's sign-ins.
  • Changing a password is limited to 5 failed current-password attempts per account per 15 minutes.

The dashboard in team mode

  • Mine | Everyone switch. It opens on Mine if you own any session, otherwise Everyone, and remembers what you pick.
  • Owner select: Everyone, you, each person, service keys, unassigned.
  • Group by Project, User or Agent.
  • Status cards, the tabs (Active, Completed, Archived and All, which leaves archived sessions out) and their badges all follow the owner you've selected, and are counted by the server, so the numbers stay correct beyond the rows loaded. On a very large install the status counts come from a bounded scan: when the response says truncated (the dashboard notes it on the status cards) they are approximate.
  • The Inbox is not narrowed by Mine | Everyone or the Owner select: it lists items across every session.
  • Show scratch workspaces now applies to every count, not just the grid; while it is off, the number of scratch sessions left out is shown beside it. This applies in solo mode too.
  • Desktop notifications in team mode fire only for your own sessions, whichever filter is on. Solo mode notifies for every session.
  • Which machine. A session shows "on " when a supervisor launched it, or when its relay or the Codex observer reported a machine name. That name is the sender's own claim and is shown to everyone who can see the session; AgentPulse never uses it to decide who may do what. Hooks posted straight to the server, without a relay, show no machine.

Limits

In team mode one person (or, for a key with no owner, one key) may create at most 120 new sessions a minute (AGENTPULSE_SESSION_CREATE_LIMIT). The rest are dropped with the usual 200 and counted as sessionCreationLimited on /health. Minting API keys is limited to 10 a minute per person. Solo mode has no creation limit.

With DISABLE_AUTH=true, the whole API (and live updates) answer only on localhost, an IP address, or a name listed in PUBLIC_URL, and refuse requests that a browser marks as coming from another website. This protects against pages that resolve to your machine (DNS rebinding) and against any site posting to your local server. See Opening an auth-off server by name.

Counters on /health

/health is public. In team mode its counters include foreignKeyDropped (events dropped because the key belonged to someone else), ingestKeyBound, sessionCreationLimited and skipHeaderDropped (deliveries skipped by AGENTPULSE_SKIP). They are aggregate counts, but they do reveal that team mode, and exclusion, are in use.

Excluding directories from AgentPulse

Members and solo users alike can stop sessions in chosen directories from being reported. Rules live on each machine, in ~/.agentpulse/exclude, one absolute directory per line (~/ is expanded; blank lines and lines starting with # are ignored). A rule covers the directory and everything under it. No wildcards, no . or .. segments, at most 500 rules.

agentpulse exclude add ~/scratch     # validates, then writes the file
agentpulse exclude list
agentpulse exclude check [dir]       # is this directory excluded, and who enforces it

exclude check exits 0 for excluded, 1 for not excluded and 2 when the rules file is invalid.

The server never learns what is excluded. The rules stay on the machine. They are not visible to admins or other members. The one thing a host's supervisor reports is a flag that its exclude file (or its saved exclude state) is invalid.

Fails closed

If the rules file can't be trusted, whatever applies the rules sends nothing. The file is invalid when: it or ~/.agentpulse is not owned by you, or is writable by group or others; the file is a symlink or hardlink or not a regular file; it can't be read; it's over 64 KiB; or a line isn't a plain absolute path (relative path, wildcard, ./.. segment, NUL byte, more than 500 rules). The message names the line and the fix. Recreating the file with agentpulse exclude add is always safe.

Skipping one run

AGENTPULSE_SKIP=1 (also true, yes, on, any case) in the environment of an agent stops that run's events from being reported. Claude Code's hook configuration forwards the variable as an X-AgentPulse-Skip header; the server answers 200 and drops those deliveries. The other senders read the variable directly, as the table says.

Who applies the rules

Sender What applies your rules
Codex CLI, Copilot CLI The hook command checks the rules before anything is sent. If the rules file can't be read or trusted, nothing is sent. AGENTPULSE_SKIP=1 skips one run.
Claude Code through the relay The relay on that machine checks the rules before anything is stored or passed on, and sends nothing while the rules file is invalid. AGENTPULSE_SKIP=1 skips one run.
OpenCode The AgentPulse plugin inside OpenCode checks the rules before anything is sent and sends nothing while they're invalid. AGENTPULSE_SKIP=1 skips a run on 1.x; a running 2.x background service doesn't see it, so set it where the service starts or stop the service. --pure (1.x) turns the plugin off.
Sessions AgentPulse launches, and the Codex observer The supervisor on that machine applies the rules. A launch into an excluded directory is refused. The supervisor doesn't see AGENTPULSE_SKIP; the directory rules cover these.
Claude Code straight to the server Path rules are not applied, and a broken rules file doesn't stop it. Use the relay, or set AGENTPULSE_SKIP=1. With the skip variable the request still reaches the server, which discards it.

An old relay or supervisor doesn't apply rules at all. Update or reinstall it; agentpulse exclude check reports a running relay that predates exclude rules as not enforcing.

How to notice

  • agentpulse exclude check prints a per-sender verdict.
  • While the file is invalid, the hooks write an empty marker file, ~/.agentpulse/exclude.invalid.
  • The statusline (where installed) says not reported (excluded), not reported (AGENTPULSE_SKIP), or that the rules are invalid and which senders are paused.
  • The Hosts page shows a warning on a host whose supervisor reports its exclude file as invalid.
  • A machine that only runs Codex, Copilot or OpenCode in direct mode has none of the last two: use the marker file and exclude check, and run it after any hand edit of the file.

Limits and gaps

  • OpenCode. On Windows the plugin reads %USERPROFILE%\.agentpulse, not HOME, and sends nothing while a rules file or the invalid marker exists, whatever the rules say. On every platform, a one-shot opencode run sends nothing at exit while a rules file or marker exists, so a turn end whose POST hadn't started when the process exits can be lost. A direct-mode key file is checked for being a plain file in the right format; its permissions are the installer's ACL, which the plugin can't read.
  • Rules apply to new events. A session reported before a rule existed stays at its last state on the dashboard until the periodic sweep ends it: after 5 minutes without activity it goes idle, and after 30 it's completed; a session still marked as working is cleared after 60 minutes of silence. Delete it yourself to remove it sooner. A managed session whose directory becomes excluded is reported once as completed and the dashboard stops tracking it while the agent may still be running.
  • A skipped request has already left the machine; it is only kept out of the database. The skip header and the rules are honoured by the client, and the server can't enforce them against a modified client.
  • A launch the host refuses because the directory is excluded reads the same as a refusal for a directory outside the host's trusted roots, and the reason goes only to the host's own log. The wording of such a refusal still differs depending on whether the host has an exclude file at all, and the server's own request-time trusted-roots check is unchanged. So a member who can launch on a host, and watches for refusals, can learn which directories under that host's trusted roots are excluded. A host whose exclude file is invalid refuses every launch.
  • The Hosts page shows every member a warning on a host whose supervisor reports its exclude file (or its saved exclude state) as invalid. That is the only thing about exclusion the server keeps, and it says nothing about which directories.
  • Codex asks you to re-approve its hooks after you re-run setup, because the hook command changed.
  • Transcripts the agents keep on disk are not touched.
  • Windows (PowerShell) support is written but has never been executed on Windows. Don't rely on it.

Supervisor offline behaviour

When the supervisor can't reach the server, the agents it launched keep running and the reports it would have sent are kept on the host, then sent in order when the server is back.

  • It stays up. A supervisor that holds a managed Codex session, a headless Claude session or a live interactive terminal doesn't exit because its heartbeat fails. It logs server unreachable for Ns; keeping N managed sessions running; ... once per outage and tries a heartbeat every 10 seconds. It exits, for launchd or systemd to restart it, only when the heartbeat has been stale for more than 90 seconds (three heartbeat intervals, if that is longer) and it holds none of those. There is no limit on how long it waits. Reports that are still queued don't keep it alive; they are on disk and the restarted supervisor sends them. A supervisor run by hand, or on Windows (where the scheduled task has no restart-on-failure), sends them once it is started again.
  • What is kept. Session state reports and session events, in ~/.agentpulse/supervisor-outbox/ (a directory per session, private to your account). Launch status and control results aren't kept: a stale one would overwrite a newer one. The queue is bounded: an entry of up to about 4 MiB (twice the server's 2 MiB request limit), 8 MiB and 2,000 entries a session, 64 MiB and 256 sessions in all, 24 hours of age. Past a bound, older state reports are merged, then the oldest events in a session are replaced by one "events were lost" entry; the first state report of a session is kept so the session is still created when it is sent. A full disk loses events, never the agent.
  • What is sent. On reconnect, after a short random wait so a fleet doesn't arrive at once, the queue is sent oldest first, at most about 33 requests a second per host. Each events batch carries a delivery id, so a batch the server already stored isn't stored twice (see below for an older server). Events keep the time they happened (occurredAt) as well as the time they were stored.
  • Interactive terminals. The terminal bridge no longer holds the supervisor's credential and doesn't connect to the server. It writes each report (start, each prompt you type, exit) to ~/.agentpulse/interactive/<id>/reports/ (at most 2,000 files and 8 MiB), and the supervisor sends them through the same gate as every other report. Prompts typed while the terminal isn't echoing (a password prompt) aren't captured. If the supervisor is down, the files wait on disk.
  • Exclude rules still apply. Queued and spooled reports are judged again when they are sent. If a rule now covers a session, its queue is deleted unsent and the session gets the one closing report; while the rules file is invalid, nothing is sent and the queue is held. Content from a directory you excluded while the supervisor was down was on disk, private to your account, until then.
  • What you see. The Hosts page says "Catching up" while a host is sending what it saved, "Back online" with how many events were sent and how many were lost afterwards (for a day), and, while a host is offline, that its running sessions' events are kept on the host. A session's timeline shows the time an event happened and marks events that reached AgentPulse more than a minute later ("arrived 7m late"); rows stay in the order they were stored, so times can run backwards across such a run. Events dropped to stay in bounds appear as one "events were lost" row.
  • A revoked or rotated credential. The supervisor treats it as revoked only when the server says so in its own words twice, at least 10 seconds apart. It then stops its Codex and headless Claude processes and exits. Interactive terminals are left open. Over plain http:// to an address that isn't this machine, the supervisor never acts on a rejection (anything on the network path could forge one), so a revoked host there keeps running and logs it once. A rejection that a proxy rewrites into something else isn't recognised while agents are running; the queue is retried as ordinary back-pressure.

Upgrade the server first, then the supervisors. A new supervisor talking to an older server still works, but the older server ignores the delivery id and the replay marker, so a replay is de-duplicated only against the newest 50 stored events of the session, and the events carry no occurrence times.

Known gaps.

  • Occurrence times come from the supervisor's clock. A host with a wrong clock shows "arrived late" on every event, or, beyond a window of 25 hours back and 5 minutes ahead, has no occurrence time and shows the time the event was stored.
  • A host with no exclude rules now keeps ~/.agentpulse/supervisor-gate-state.json once it launches an interactive terminal session. If that file or ~/.agentpulse stops being private to your account, the supervisor stops reporting and launching until it is repaired (the same repair as for the exclude file, see Fails closed) and the Hosts page shows its exclude-file warning.
  • A spool file is never dropped for its age: if the supervisor sent one and crashed before removing it, then stayed down for longer than the server keeps a delivery receipt (72 h), the file is sent again and its events are stored twice. Accepted: dropping a report after a long outage loses real work (a terminal state included), a duplicate costs a few repeated rows, and the rule everywhere in the outbox is that a possible duplicate beats a certain loss.
  • A live events batch over the server's 2 MiB request limit is refused with a 413 and is lost, not queued: the supervisor doesn't count it. One very long event of non-Latin text can reach that size (the length cap counts characters, not bytes).
  • The lost count is an upper bound for events that had already been tried, and after a supervisor restart it can be a lower bound.
  • A host's "events waiting" figure can fall without a matching number sent if you exclude a session's directory while the host is connected but backing off.
  • Rolling a supervisor back to a version without this feature leaves the spool of a terminal launched under the new version unsent: the older supervisor doesn't read it. If you then upgrade again, such a terminal that is still open stays unfollowed, because the older version drops the record that it was an interactive launch when it next saves its state. Close it and launch a new one.
  • A terminal opened before the supervisor was updated keeps reporting directly until you close it. If the bridge script was updated without restarting the supervisor, the terminal prints a warning on stderr (bridge.json has no launchNonce) and its reports are not accepted: restart the supervisor and launch a new session.

Answering Codex approvals

When a Codex session that AgentPulse launched asks to run a command or change files, the session page shows what it wants and you can accept or decline there. Only managed sessions can be answered (a Codex AgentPulse launched, or a Claude Code session continued as a fork, below; not a Codex you started yourself), and only by a signed-in person: an API key can read and decline but never accept.

  • What you're shown. The whole command (wrapped, never cut) or each file's diff, the working directory, and Codex's reason. Files outside the working directory are listed first and marked. Anything the server had to change before showing it (a secret it redacted, hidden or lookalike characters, runs of blank space, an over-long command, a missing diff) makes the request decline-only, with the reason. Accept and decline both ask you to confirm, and the confirm button arms after a short pause so a double click can't answer.
  • Time and default. A request waits 20 minutes, then is declined. Nothing is queued: if the host is offline, or AgentPulse can't reach it, the card says so and offers no answer, and the request is declined at its deadline. An accept must reach the host within a minute of your click, or the host declines instead.
  • What Stop means here. Stop is not instant. After Stop is accepted by the server no accept is issued, and pending requests close. An accept that was issued before you pressed Stop may still run, for a few seconds at most, and the card says "may have run" until the host reports. Stop doesn't undo a command that has already started.
  • https is required. The supervisor answers approvals only when the server's address is https, or this machine. Over plain http:// to another machine every request is declined on the host, and the session page says so.
  • When the page says Codex's approvals are declined automatically. unsupported means the Codex on that host isn't one AgentPulse has been checked against (its approval protocol has a shape this version doesn't know, or it's older than 0.163, or it's on the blocked list), so its requests are declined without being shown. Update AgentPulse, or if you've just updated Codex, wait for a release that lists it. A host that shows "update the supervisor" is running a supervisor from before this feature.
  • Release note: managed Codex now runs over stdio. Earlier versions started codex app-server with a local WebSocket listener that any process on the machine could connect to; it could have answered an approval. Upgrade your supervisors, and kill any codex app-server --listen process left behind from an older one.
  • What hasn't been measured. All of this was exercised against Codex 0.163.0 on macOS. Linux and Windows hosts, a Codex with its own config.toml approval settings, Codex's streamed patch updates (never seen in the recorded runs), answering from a phone (no phone client can answer yet; a phone gets the notification and sees the session waiting), and a screen reader (the card was driven in an emulated browser only) have not been tested, so don't rely on them.
  • Using MCP. list_pending_approvals and decline_approval are available to manage keys, deliberately without an accept. See docs/MCP.md.

Taking over a Codex session you started by hand

A Codex session you ran yourself (in a terminal, or codex exec) shows up as observed: you can read it, but not send it prompts. Once it has ended, open it and choose Take over, then the machine it ran on. That machine's supervisor resumes the same conversation, and from then on prompts, Stop and approvals work from the dashboard. It runs under untrusted / workspace-write (commands and file changes ask you first), and those limits stay with the session.

  • Wait about 5 minutes after you exit it. A session heard from more recently is refused as still active; one that crashed mid-turn becomes available about an hour after its last activity.
  • If Codex's background service still holds it, the takeover says so. That service outlives the terminal, and in two test runs on 0.163 with a non-TUI client it let go after 30 minutes (a real terminal session hasn't been measured); to free it sooner, run codex app-server daemon stop on that machine, which interrupts anything else running through it.
  • A project with a .codex/config.toml in its directory, or in a folder above it up to the git root, is refused: its settings can run commands without asking you.
  • A session whose process was lost when its supervisor restarted shows Resume session instead. Codex only, a signed-in person only (API keys can't), and the supervisor on the machine must be updated.

Continuing a Claude Code session you started by hand

A Claude Code session you ran yourself shows up as observed. Open it and choose Continue in a new session, then the machine it ran on. AgentPulse does not write to your session. That machine's supervisor starts a fork: a new session that carries the same conversation forward (claude --resume <id> --fork-session), shown as <name> (continued). Your original stays exactly as it was and you can keep using it in a terminal; the two don't share what happens next. A fork has the six tools Bash, Read, Write, Edit, NotebookEdit and WebFetch, and, unless you turn an option on (below), no subagents, no MCP servers and no slash commands. Anything that would write a file, fetch a page or run a command asks you first on the session page, with the same accept or decline cards as Codex (read-only commands such as ls and cat run unasked, as they do in Claude Code itself). End session stops the fork; you can fork the original again. Stop turn ends what Claude is doing and keeps the session open; it is in the prompt box in place of Send while a turn runs.

  • It needs a login the supervisor can use. Claude Code run by the supervisor does not use the login claude uses in a terminal (on 2.1.318 on macOS, a keychain login is "Not logged in" headless). If the supervisor has none, Continue says so and starts nothing: give the supervisor's environment a subscription token (claude setup-token, set as CLAUDE_CODE_OAUTH_TOKEN) or an API key (ANTHROPIC_API_KEY), then restart it. AgentPulse never stores, reads or sends either; Claude Code reads it. The steps are in Claude login for the supervisor.
  • Two modes, picked from the login, and the page says which applied. With ANTHROPIC_API_KEY in the supervisor's environment the fork runs restricted: your own allow rules, hooks and user CLAUDE.md are ignored, so every Write, Edit, NotebookEdit, WebFetch and Bash asks. With any other working login (a claude setup-token token and an apiKeyHelper are the usual ones) it runs ask: your own settings apply, so a tool your rules already allow runs with no card, and your hooks run. A fork never takes either mode on a guess; a login AgentPulse hasn't measured gets ask.
  • Project CLAUDE.md, hooks and .mcp.json are not loaded in either mode, and none of your user MCP servers.
  • A fork can't run Bash commands in the background. A dev server or a long build stops at Claude Code's own Bash limit instead of carrying on after the turn; run those in your terminal.
  • What the timeline shows. A fixed line per tool call ("Write: ran, you approved it", "Bash: ran without asking", "stopped when you stopped the turn", and so on), never the command, path or URL. The card shows those while it waits, and only the owner or an admin can read it. The tool count is hidden for a fork. Each call's row records how it ended (ran, failed, declined, refused, stopped) and, for a failed Bash command, the exit code Claude printed; the Summary counts an observed tool call without storing its command, and the session classifier counts only calls that actually failed.
  • If the fork's process is lost (a supervisor restart, a crash) the session shows Resume session. An approved command that was already running can outlive the supervisor until it finishes; Resume says "still running" until then.
  • Only a signed-in person can continue a session or accept an approval; an API key can't. Claude Code 2.1.318 up to, not including, 2.2.0 is the tested range; another version is refused with the range named.
  • Not measured. Only macOS, Claude Code 2.1.318 and 2.1.319, and the API key and apiKeyHelper logins on a throwaway home were run end to end. A subscription token, Bedrock, Vertex, Linux and Windows hosts, and a person's own settings.json hooks were not.

Stop turn

While a continued session's turn runs, the prompt box shows Stop turn in place of Send (on a phone the overflow menu has it too, above End session). It ends what Claude is doing and the session stays open: the process, the conversation and the session keep going, and the next prompt runs. Nothing is signalled; Claude's own interrupt is used. A command it was running is ended by Claude, and anything it left in the background keeps running, as with any stop.

  • The turn's open approval cards close as "stopped" and can't be answered.
  • A Stop turn pressed before the prompt reached Claude cancels the send and puts your text back in the box.
  • A stopped turn is not an alarm: the session reads IDLE, the timeline line isn't amber, and the watcher sends no "didn't finish" note.
  • If Claude doesn't stop within 30 seconds, the stop fails and says so; try again or end the session.
  • A signed-in person or a manage API key (MCP: stop_session_turn), the session's owner or an admin in team mode, 6 a minute. Only continued sessions can be stopped this way.
  • Upgrade the server first, then the supervisors: a supervisor that predates it is refused with host_upgrade_required.
  • Not measured: a stop landing between the prompt being written and Claude's first reply (the canary slows the pre-send checks to reach the cancel branch and records the other as a normal interrupt), nested subagents, Linux and Windows.

Tool details

The owner of a continued session (and, in team mode, an admin) can open what each tool call ran: a Details control on a call's line in Progress, and Show what ran under a turn's "Ran without asking you" line in Conversation. You see the input and output, with anything that looks like a secret hidden, each cut to 16 KB.

  • Kept 7 days (sooner if event retention is shorter). Visible only to a signed-in person who owns the session or is an admin: not to API keys or MCP (every key is refused human_required).
  • Needs AGENTPULSE_SECRETS_KEY on the server. The text is encrypted at rest with it; without it the feature is off and the lines show names and outcomes only. Migration 0022 adds the table; see deploy/k8s/README.md.
  • Excluded places. Nothing is kept for a call that touched a path an exclude rule covers (~ and $HOME spellings included), or for any Bash command, helper start or MCP call while a rule covers a place under the session's directory or the command names a rule's path. A Bash, helper or MCP result that names a rule's path is left out, and so is a helper's result unless every call that helper made was kept. A rule you add later does not remove what was already kept (it stays for 7 days). A command can still reach an excluded place by a route its text doesn't name (a variable of another name, a glob) when no rule lies under the directory; the exclude rule governs reporting, not what the command runs.

Subagents (off by default)

In the continue dialog, under "Options for this session", Allow subagents lets Claude hand parts of a turn to built-in helpers. It is chosen per continued session and stays as chosen for that session's life; to change it, continue again.

  • The helper's commands, file changes and fetches wait for you the same way Claude's own do. Each card says "Asked by a subagent". The helper's words are never shown as Claude's.
  • Starting a helper is itself a card ("Claude asks to start a helper (general-purpose)") showing the whole prompt the helper would be told. Only the general-purpose helper that ships with Claude Code can be approved. A helper you defined yourself (an agent file in your Claude settings) and a helper that starts another helper can only be declined: an agent file's own hooks run with no card, and isolation: worktree moves the helper out of the directory the cards describe (measured on Claude Code 2.1.319).
  • Helpers run in the foreground only. A helper can't outlive the turn: if one tries (a background run), the host ends the session and says so ("A subagent kept working after the turn ended"); Resume it to keep going. A Bash command a helper starts stops at Claude's Bash limit, as the fork's own does.
  • Stopping the turn stops the helper (an interrupt was measured to stop a running helper).
  • Helpers use more of your Claude usage.
  • Only on a Claude Code version AgentPulse measured it on (2.1.319 so far), in a team only on a machine you own, and only where the supervisor advertises claude_fork_subagents. The control says which of those is missing. In a team, only the machine's owner who allowed subagents can prompt the session, resume it, or approve a helper's start afterwards.
  • Residuals: the built-in type is recognised by name, so an agent file that reuses the name general-purpose is not told apart from the built-in one (unmeasured; the helper still asks before every tool call). The helper's tool calls are asked about, but under the ask login your own allow rules and hooks apply to them as they do to Claude's (see Claude login for the supervisor). The other built-in types (claude, Explore, Plan, statusline-setup) are not offered.

Fork MCP servers (off by default)

A continued session can start MCP servers, but only the ones you list for it. Turn on Include my fork MCP servers in the continue dialog (chosen for the life of that session). AgentPulse never reads Claude's own ~/.claude.json, your plugins or your account's connectors for this: the file below is the whole list.

The file is ~/.agentpulse/claude-fork-mcp.json on the machine that runs the session, in Claude's mcpServers shape:

{
  "mcpServers": {
    "docs": { "command": "npx", "args": ["-y", "some-mcp-server"], "env": { "API_TOKEN": "..." } },
    "wiki": { "type": "http", "url": "https://mcp.example.com/mcp", "headers": { "X-Team": "docs" } }
  }
}
  • Each server is stdio (command, optional args, env) or http/sse (url, optional headers).
  • At most 16 servers. A name is 1 to 32 letters, digits or hyphens (no underscore: Claude joins the server and tool names with __, and a name without one can be split only one way).
  • The file must be a plain file (not a link) owned by the account that runs the supervisor, mode 0600, at most 64 KiB. Anything else makes the whole file invalid and no server starts. Try chmod 600 ~/.agentpulse/claude-fork-mcp.json.
  • It is read on the machine, by the supervisor. The server never sees it; it is told only the server names and a digest of each entry (a low-entropy secret in an entry could be guessed from its digest, and the digests are readable like any session metadata).
  • Only on a machine you own. In team mode an admin can't use a member's file, and nobody can use one on a machine that has no owner. Solo has no such rule. In team mode only the machine's owner who agreed to the servers can then prompt that session, resume it, or approve its MCP calls (fork_options_host_not_yours); if an admin later hands the session to someone else, they can read and end it but not drive its servers. A Codex session takes no options (fork_options_not_supported).
  • Only on a Claude Code version AgentPulse has tested it on (2.1.319 today). Elsewhere the session starts without the servers and its status line says so.

What happens when you use it

  • The supervisor writes exactly those servers into a private copy for that session (~/.agentpulse/claude-fork-mcp/, directory 0700, file 0600, removed when the session ends), starts Claude with it, and keeps --strict-mcp-config on, so nothing else loads.
  • The first thing Claude reports must name exactly those servers. If it names another (a plugin, a synced connector, a user-scope server), AgentPulse ends the session.
  • Resuming the session after it was interrupted compares the file with what the session was started with, server by server. If a server was added, removed or edited, Resume is refused ("The MCP servers this session was started with have changed"). Continue the original session again to use the new list.
  • Every tool call gets a card; none runs unless you answer it, with two exceptions: a rule or a hook in your own Claude settings can allow a call first (under the ask login), and a server can act on its own once it is running. The card shows the tool's name verbatim, the server, and the call's whole input. It says what AgentPulse can't tell: what the tool does or what it will change. Accepting is for a signed-in person; an API key (and so an agent) can read the card and decline it, never accept.

What you are trusting

  • A server you list is a program that runs as you, on that machine, with whatever access you gave it. It also sees Claude's own login (the environment of the Claude process: an API key or token, if that is how it logs in).
  • A server can ask Claude to answer a question for it (an "elicitation"); the link doesn't carry that request type, so it is answered with an error and logged by name. Servers can't ask Claude to run a model for them (Claude Code doesn't offer that).
  • Ending a session stops the servers it started. A server that detaches itself (double-forks) is outside what the stop sequence reaches.

Not tested

  • Servers synced from your Claude account (claude.ai connectors): they need an OAuth account login, which the test harness could not use. The first-report check above is what would catch one; it is a safety net, not a measured property. If you log in with a CLAUDE_CODE_OAUTH_TOKEN, continue a session once with the option on and look at the session's "Fork MCP servers" line.
  • Linux and Windows (the feature is macOS-only like the rest of continuing a Claude session), http/sse servers' lifetime, mode: "url" elicitations, and any Claude Code other than 2.1.319.

Claude login for the supervisor

Claude Code started by the supervisor doesn't use the login claude uses in a terminal. On Claude Code 2.1.318 on macOS, a keychain login (the one claude sets up when you sign in with your subscription) answers "Not logged in" when run headless. This affects every Claude session the supervisor starts, a launched headless session as much as a continued one. AgentPulse never asks for, stores, reads, sends or moves a credential: the variable is in the supervisor's environment because you put it there, the Claude process inherits it, and Claude Code reads it.

Two ways to give it a login

  • An API key, set as ANTHROPIC_API_KEY (sk-ant-...). A continued session then runs in the stricter restricted mode, where your own settings are ignored.
  • A subscription token, made by running claude setup-token in a terminal and set as CLAUDE_CODE_OAUTH_TOKEN. It works as a login, but a continued session gets ask mode, where your own settings apply, because AgentPulse hasn't yet measured this login against restricted. An apiKeyHelper in ~/.claude/settings.json is the same: it works, in ask mode.

Only an API key gets restricted today. The Continue dialog and the session's mode line say which mode applied.

Where to set it

The supervisor must be restarted for a new variable to take effect, and restarting it ends the continued sessions it is running; they come back through Resume session. Don't restart a supervisor that is in the middle of work you care about.

  • macOS, installed service. The supervisor runs from ~/Library/LaunchAgents/dev.agentpulse.supervisor.plist. Add the variable inside its EnvironmentVariables dictionary:

    <key>ANTHROPIC_API_KEY</key><string>sk-ant-...</string>

    then launchctl unload and launchctl load the file. The installer writes the plist with mode 0600; keep it that way, since it now holds a credential.

  • Linux, installed service. The unit (~/.config/systemd/user/agentpulse-supervisor.service) already reads EnvironmentFile= .env.local, but the installer rewrites that file, so put the variable somewhere it doesn't touch: a drop-in from systemctl --user edit agentpulse-supervisor containing [Service] and Environment=ANTHROPIC_API_KEY=sk-ant-..., or an EnvironmentFile= of your own with mode 0600. Then systemctl --user restart agentpulse-supervisor. (Drop-ins weren't tried here; the installer writes only the unit file itself.)

  • Run by hand. Export the variable in the shell that starts bun run supervisor.

  • A .env file in the install directory (~/.agentpulse/app/.env). The services run with that directory as their working directory and Bun loads .env from it into the process environment, and the supervisor hands its environment to the Claude processes it starts. The installer never writes .env (it writes only .env.local), and the file is ignored by git, so unlike the plist it survives an install or upgrade. Costs: the AgentPulse server, started from the same directory, gets the variable too, and the file's mode is yours to set (chmod 600). A variable already set in the plist, the unit or the shell wins over .env.

Re-running the installer rewrites the plist, the systemd unit and .env.local, so a variable added to any of those has to be added again after an install or an upgrade. A .env file or a systemd drop-in isn't rewritten.

A claude setup-token token expires. When it does, prompts to a continued session fail with the "lost its login" words. Make a new token and restart the supervisor.

Checking it

claude auth status in a terminal isn't enough: it reports your terminal's login, not the supervisor's. Use Continue on an observed Claude session. The dialog's result says which mode applied, and claude_not_logged_in means the supervisor's environment gave Claude Code nothing it could use.

Not verified here

The .env route is from reading the installer and the supervisor's code and from running Bun against a scratch directory with NODE_ENV=production (the installed services set it): Bun put both .env and .env.local into process.env, and a child process inherited them. It was not tried on a running installed supervisor, and no real Claude was started with a token from .env. The plist edit and the systemd drop-in follow from how launchd and systemd work and the installer's output, and were not run on a live service. A token login has not been run end to end.

What the setup script does

Running curl -fsSL --proto '=https' .../setup.sh | bash configures:

  1. Claude Code -- adds HTTP hooks to ~/.claude/settings.json for 16 events (SessionStart, Stop, PreToolUse, PostToolUse, PermissionRequest, PreCompact, etc.), async: true, so they never slow down the agent. A supplied key is embedded directly in the header (Authorization: Bearer ap_...), and the file is tightened to mode 0600 (a no-follow write; a symlinked settings.json is refused, not written through) -- see "User scope vs. project scope" below for why.
  2. Codex CLI -- replaces ~/.codex/hooks.json with 12 command-type events (SessionStart, SessionEnd, PreToolUse, PostToolUse, UserPromptSubmit, Stop, Interrupt, SubagentStart, SubagentStop, PermissionRequest, PreCompact, PostCompact). An existing file is backed up first as hooks.json.agentpulse-bak.<timestamp>, never overwritten. Codex 0.145+ requires you to run /hooks inside Codex once afterward and trust the AgentPulse entries -- untrusted hooks are silently skipped. Minimum tested version: Codex CLI 0.145. The legacy codex_hooks line in config.toml, if present from an older AgentPulse setup, is no longer needed and can be deleted. Re-running the installer with an unchanged URL/key prints "Codex hooks unchanged — no re-trust needed" and leaves hooks.json alone -- you only have to run /hooks again when the installer actually rewrites the file (a URL or key change, or an upgrade that changes the hook shape).
  3. Copilot CLI (detection-gated -- only when copilot is on PATH or ~/.copilot exists) -- writes ~/.copilot/hooks/agentpulse.json with 10 command-type events (sessionStart, sessionEnd, userPromptSubmitted, postToolUse, postToolUseFailure, agentStop, subagentStart, subagentStop, preCompact, errorOccurred). preToolUse and permissionRequest are deliberately not hooked -- Copilot fails closed on those events, and a synchronous AgentPulse outage would otherwise be able to block every tool call. Copilot CLI is observed only: AgentPulse can't launch or steer it.
  4. OpenCode (detection-gated -- see OpenCode below) -- writes the AgentPulse plugins into OpenCode's config directory. OpenCode is observed only.
  5. Shell (Claude Code only) -- writes AGENTPULSE_API_KEY and AGENTPULSE_URL to a new ~/.agentpulse/env file (mode 0600) and adds a key-free, idempotent [ -f ~/.agentpulse/env ] && . ~/.agentpulse/env source line to your .zshrc/.bashrc/.profile. The key itself never touches the rc file. If an earlier install already left a plaintext export AGENTPULSE_API_KEY=... line there, the script leaves it alone but prints a warning plus the sed command to remove it -- it won't edit your rc file's existing content silently. Codex CLI and Copilot CLI don't get a shell/profile write at all: their hooks authenticate via ~/.agentpulse/hook-auth-header (also 0600).
  6. Verify -- sends a test event to confirm connectivity

Codex and Copilot hooks are detached command handlers, not async: true HTTP hooks -- see Codex/Copilot command hooks below for why. Direct (non-relay) installs store the API key at ~/.agentpulse/hook-auth-header (mode 0600), never in the hooks file itself or in argv. Because they authenticate with curl -H "@$f" (reading the header value from a file instead of argv), direct command hooks need curl >= 7.55 -- older curl silently sends no Authorization header at all instead of failing loudly. setup-hooks.sh//setup.sh check the installed curl version and refuse to write hooks below that floor, pointing you at the relay installer instead (the relay proxies hooks through itself, so the agent-side curl never needs to carry the header).

Claude/Codex/Copilot/OpenCode event counts: 16/12/10/8/10 (OpenCode 1.x forwards 8 events, 2.x forwards 10). If you set up AgentPulse before this version, re-run the setup script to pick up the current event names and hook shape.

No key, no write. Before writing any hook, the installer probes /api/v1/auth/me. If a key was supplied (--key or $AGENTPULSE_KEY), the probe is informational and installation proceeds regardless of its result. With no key, the installer proceeds only when the probe confirms disableAuth: true; otherwise it refuses and writes nothing, so you never end up with hooks silently 401ing forever. Pass --no-auth-check to skip the probe and install anyway -- for a server that isn't reachable yet, or one that runs with auth disabled but can't be probed from here.

Claude Code: user scope vs. project scope

Claude Code's native HTTP hook expands $AGENTPULSE_API_KEY from its own process environment -- not the shell that launched it. A Claude Code window opened from the Dock, a file manager, or an IDE (or one left running from before you last ran the installer) never sees a value exported into ~/.agentpulse/env afterward, so the env-var form of the header 401s silently there: the hook fires, gets rejected, and nothing tells you.

  • User scope (~/.claude/settings.json -- the default for /setup.sh, agentpulse setup, and setup-hooks.sh's default --scope global): trades that reliability gap away by embedding the literal key directly in the header. This is made acceptable by tightening the file to mode 0600 (owner-read/write only, never world-readable) with a no-follow write (a symlinked settings.json is refused rather than written through) -- the same standard already applied to ~/.agentpulse/hook-auth-header and ~/.agentpulse/env. Merging into an existing settings.json preserves every other key already in it.
  • Project scope (setup-hooks.sh --scope project, writing a repo's own .claude/settings.json): never gets a literal key -- that file can be committed to source control. It keeps the $AGENTPULSE_API_KEY / allowedEnvVars form unconditionally, and the installer prints a reminder to fully restart Claude Code afterward (a GUI- or IDE-launched instance may not see a shell-exported env var at all).

OpenCode (observed only)

OpenCode 1.x and 2.x are observed through a plugin that runs inside OpenCode and posts to AgentPulse. AgentPulse can't launch, steer, take over or resume an OpenCode session. Tested on OpenCode 1.19.5 and 2.2.6 (macOS); other versions are not measured, and a change in OpenCode's events is fixed by a server deploy, not a reinstall.

  • Detection. The installers set OpenCode up when opencode is on PATH or its config or data folder exists. They never run opencode or a package manager.
  • Where the files go. OpenCode's config directory: OPENCODE_CONFIG_DIR, else XDG_CONFIG_HOME/opencode, else ~/.config/opencode (on Windows %USERPROFILE%\.config\opencode; a rooted value such as C:\... is honoured). Two files: plugins/agentpulse-opencode-1.js for 1.x and the folder plugins/agentpulse-opencode-2/index.js for 2.x. A running 2.x background service reloads a replaced plugin, so setup doesn't ask you to restart it. A file of the same name that isn't ours is moved to ~/.agentpulse/backups/opencode/, never overwritten; a symlink in the way is refused.
  • Removing it. agentpulse setup --no-opencode, setup-hooks.sh --no-opencode, or install-local.ps1 -NoOpenCode.
  • The 1.x plugin SDK. OpenCode 1.x downloads its plugin SDK (@opencode-ai/plugin) into its config directory the first time it finds a plugin there, and while it can't reach the package registry each start then waits about 70 seconds. So setup writes the 1.x file only where OpenCode 1.x already has the SDK (node_modules/@opencode-ai/plugin exists in the config directory) or already loads another .js or .ts plugin, and otherwise prints why it left it out. The 2.x plugin is always written. A 1.x user with no other plugin gets in by running the force option once while online, spelled per installer: agentpulse setup --opencode-force, setup-hooks.sh --opencode-force, curl ... | bash -s -- --opencode-force, or install-local.ps1 -OpenCodeForce from a downloaded file. OpenCode 1.x then downloads the SDK on its next start. In the shipped layout the force option is not remembered and ~/.agentpulse/opencode-force is never written; once 1.x has the SDK it isn't needed again.
  • Upgrade the server first. An older server doesn't know OpenCode and stores its posts as Claude Code sessions. Every installer prints this when it writes a plugin.
  • AGENTPULSE_SKIP and a 2.x service. A running OpenCode 2 background service doesn't see AGENTPULSE_SKIP set in your shell. Use an exclude rule (agentpulse exclude add <dir>), or opencode service stop so the service restarts with your environment. agentpulse exclude check says so. On 1.x, --pure turns the plugin off.
  • What is stored. Prompts, the last assistant text, tool arguments and tool output (each text up to 64 KiB), with secrets that the built-in rules recognise masked when stored (see Secrets in stored text), and in team mode the same sharing as any session's content. Error rows carry only the error's name and HTTP status, never the message. The plugins folder is writable by the agent itself, so agentpulse exclude check reports a changed plugin as "modified".
  • Limits. In direct mode http:// to a non-loopback host is accepted, so the key and the content can travel in plaintext, as with the shell hooks; use https://. The key-file check looks at the file, not ~/.agentpulse itself, and the exit-time curl re-opens the file by path; exploiting either needs another process of your own account. The exit-time send uses /usr/bin/curl, so on NixOS and Windows a one-shot run's final events aren't sent at exit. Setup also writes ~/.agentpulse/hook-auth-header (mode 0600) when it finds OpenCode during a non-OpenCode install, and the key you give it may be broader than ingest; prefer an ingest-only key.
  • Not verified. PowerShell (install-local.ps1) has never been executed. OpenCode's terminal UI, Linux, Windows and a real model provider were not measured; only the live canary (below) ran.

Codex/Copilot command hooks

Codex CLI and Copilot CLI hooks run a small detached shell command instead of AgentPulse's own HTTP hook type (which only Claude Code supports): the command drains the hook payload to a temp file, backgrounds a curl POST to AgentPulse, and returns in milliseconds regardless of network conditions -- curl's own --max-time 2 is a second, independent backstop. It never writes to stdout/stderr (so it can't be mistaken for tool output) and always exits 0 (so a hook can never fail an agent's turn closed). This is why Codex hooks are "type": "command" (not "http") and async: false with a timeout -- the detaching happens inside the command itself, not via Codex's own async hook flag, which Codex 0.145 silently drops for every event except SessionEnd.

Statusline (optional)

scripts/statusline.sh renders your AgentPulse session name (e.g. brave-falcon) and context-window usage directly in Claude Code's statusline, so you can match a terminal tab to a dashboard card at a glance. It also shows the relay's hint (· agentpulse: …) when the relay needs attention.

With the relay, setup-relay.sh installs and updates it for you (re-run the installer to update it). Without a relay, copy it by hand:

chmod +x scripts/statusline.sh
cp scripts/statusline.sh ~/.claude/statusline-agentpulse.sh

Add to ~/.claude/settings.json:

"statusLine": { "type": "command", "command": "~/.claude/statusline-agentpulse.sh" }

Native-name sync: when Claude Code sets a native session name (.session_name in the statusline JSON, requires Claude Code with statusline session-name support), the script pushes it into AgentPulse's displayName via PUT /api/v1/sessions/:id/native-name. An ingest-scoped key is enough. This is pull-only -- the native name flows one direction, into AgentPulse -- and it never overwrites a name you've set on the dashboard: the session shows Renamed by you, and the agent's names don't replace it. To go back to the agent's name, use Use agent name on the session. The push is fire-and-forget with a 1s timeout so it can never slow down statusline rendering.

If you copied the statusline by hand before this sync behavior shipped, re-run the cp step above to pick it up.

The name lookup is small: the statusline asks the relay for the name only (GET /api/v1/sessions/<id>?fields=displayName, tens of bytes however long the session is; the relay remembers it for five seconds), and shows the first characters of the session id if a lookup ever fails. This needs the server at 0.7.2 or later; re-run the installer (or the cp step) to update the statusline and relay.

Manage a local install

Supervisor exits with 403 insufficient_scope

Symptom: ~/.agentpulse/logs/supervisor.err.log fills with 403 { "error": "insufficient_scope" } (or 401 Unauthorized) on every register/heartbeat attempt, and the supervisor never reaches "Registered" in its log. This was a server-side mount-order bug (AGEN-17), not a client misconfiguration.

Fix: upgrade the server. No supervisor update or config change is required — the client already sends the correct credential; the server just needs to answer it.

Registration itself now retries forever with backoff (starting around 5s, capped at 5 minutes) instead of exiting on a failed attempt, so a supervisor running this version of the client reconnects on its own the moment the server is upgraded — no manual restart needed. If the loop has been running long enough that the local log grew large, archive it (safe to do at any time, running or not):

gzip -c ~/.agentpulse/logs/supervisor.err.log > ~/.agentpulse/logs/supervisor.err.log.$(date +%Y%m%d).gz
: > ~/.agentpulse/logs/supervisor.err.log

The notes below apply only if the supervisor's process actually stopped — an older client that predates the retry fix and crash-looped until its service manager gave up, or a platform (Windows) with no restart-on-failure policy at all:

  • macOS: launchctl kickstart -k gui/$(id -u)/dev.agentpulse.supervisor, or a full reload:
    launchctl bootout gui/$(id -u)/dev.agentpulse.supervisor
    launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/dev.agentpulse.supervisor.plist
  • Linux: systemctl --user restart agentpulse-supervisor. If systemctl --user status agentpulse-supervisor shows start-limit-hit, run systemctl --user reset-failed first.
  • Windows: the scheduled task only triggers -AtLogOn and has no restart-on-failure policy — it isn't crash-looping, it's simply stopped. Run Start-ScheduledTask AgentPulseSupervisor or log back in.

If the supervisor's credential was revoked or rotated (not this bug), it needs /admin/supervisors/:id/rotate — see deploy/k8s/FORWARDAUTH.md for the full upgrade and ownership-audit runbook.

A host registered but doesn't appear on the Hosts page

Symptom: the supervisor's own log shows a successful registration ([supervisor] Registered <hostName> (<id>)), but the host never shows up on /hosts in the dashboard.

Likely causes, in order of likelihood:

  1. Multiple SQLite server instances behind a load balancer. AgentPulse on SQLite only supports a single running server instance — see Production / multi-replica with Postgres. If the server was deployed with more than one replica/task (common on ECS, Kubernetes with replicas > 1, or docker compose --scale), each instance has its own independent local database file; a registration landing on instance A is invisible from instance B. The dashboard now detects this automatically and shows a persistent warning banner when it's talking to more than one database. To check by hand: open GET /api/v1/health in your browser a few times in a row (or across a page refresh) and compare instance.dbFingerprint — if it changes between requests (and isn't just a one-time value from a server restart), you have more than one instance. instance.dialect tells you sqlite vs postgres.
  2. The list request itself failed. The Hosts page used to render silently as "No hosts are registered yet" even when GET /api/v1/admin/supervisors actually failed (an expired session, an under-scoped API key, a network blip). It now shows a distinct error state with the status code and server message (e.g. "Couldn't load hosts: 403 insufficient_scope") and a Retry button — if you still see this on a current version, that error message is the actual cause.
  3. Version/URL mismatch. Confirm the supervisor's configured serverUrl points at the exact host:port your browser hits, and that both are on a version that includes the supervisor agent-routing fix (AGEN-17, v0.6.0+) — see the 403 section above.

macOS

launchctl unload ~/Library/LaunchAgents/dev.agentpulse.local.plist
launchctl load ~/Library/LaunchAgents/dev.agentpulse.local.plist
tail -f ~/.agentpulse/logs/agentpulse.out.log
tail -f ~/.agentpulse/logs/supervisor.out.log

Linux

systemctl --user restart agentpulse
journalctl --user -u agentpulse -f

Windows

Get-ScheduledTask AgentPulseLocal
Get-ScheduledTask AgentPulseSupervisor
Get-Content "$HOME\.agentpulse\logs\agentpulse.out.log" -Wait
Get-Content "$HOME\.agentpulse\logs\supervisor.out.log" -Wait

Manual start

cd ~/.agentpulse/app
export $(cat .env.local | xargs)
~/.agentpulse/bun/bin/bun run start   # or the Bun path the installer printed

Deploy on Kubernetes

Manifests are in deploy/k8s/. Includes namespace, deployment, service, PVC, configmap, and Traefik IngressRoute with optional forwardauth SSO (Authentik by default; configurable for Authelia, oauth2-proxy, Pomerium, Cloudflare Access via env vars).

# Create a real Secret out of band (see deploy/k8s/01-secret-template.yaml for the shape)
# then apply the Kustomize base:
kubectl apply -k deploy/k8s/

Production / multi-replica with Postgres

For deployments that need multi-replica scale-out or prefer a managed Postgres instance over a local SQLite file:

# 1. Verify kubectl context
kubectl config current-context
# Expected: your production cluster context

# 2. Create database and user (on your Postgres host)
psql -h your-postgres-host -U psadmin \
  -c "CREATE USER agentpulse WITH PASSWORD '<password>';"
psql -h your-postgres-host -U psadmin \
  -c "CREATE DATABASE agentpulse OWNER agentpulse ENCODING 'UTF8' \
      LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;"

# 3. Fill in the credentials file (gitignored — do NOT commit)
cp deploy/overlays/postgres/secret-patch.yaml.example \
   deploy/overlays/postgres/secret-patch.yaml
# Edit secret-patch.yaml: set DATABASE_URL to the full connection string
# e.g. postgres://agentpulse:<pw>@host:5432/agentpulse?sslmode=require
kubectl apply -f deploy/overlays/postgres/secret-patch.yaml -n agentpulse

# 4. Render and apply
kubectl kustomize deploy/overlays/postgres/  # verify output first
kubectl apply -k deploy/overlays/postgres/

AgentPulse runs Drizzle migrations on boot using a dedicated single-connection client. A session-level pg_advisory_lock serializes migration across replicas booting simultaneously, making rolling deploys safe without coordination overhead.

Rolling updates are safe for migrations only. Several limits live in each replica's memory and reset on restart, so with N replicas they are N times looser, and they briefly double during a rolling deploy: the hook rate limiter, the per-owner session-creation limit (AGENTPULSE_SESSION_CREATE_LIMIT), the API-key mint limit, the password-change failure limit, and the stats scan queue and in-flight coalescing. The instance mode and every owner are read from the database on each request, so those are consistent across replicas. Until process-local state is externalised, run a single replica.

Connection pool size defaults to 10. Tune it via AGENTPULSE_PG_POOL_MAX based on your Postgres max_connections setting and replica count.

The Postgres overlay removes the SQLite backup sidecar (no longer needed). The SQLite PVC is left in place until you confirm data has been migrated or is no longer needed, then delete it manually.

See deploy/overlays/postgres/README.md for the full pre-flight checklist and rollback notes.

Verifying you're not accidentally running split SQLite instances: GET /api/v1/health includes instance: { dbFingerprint, dialect } — a short, non-reversible fingerprint of the backing database (never the raw installation id). On Postgres every replica shares one database, so this is always one stable value. On SQLite, if you poll /health across requests (or just watch the dashboard, which now does this for you and raises a banner) and see more than one dbFingerprint, you have more than one SQLite instance running — see the Hosts-page troubleshooting entry above.

Develop

git clone https://github.com/jstuart0/agentpulse.git
cd agentpulse
bun install
bun run dev        # starts API server + Vite dev server
Command What it does
bun run dev Start dev server (API + frontend with hot reload)
bun run build Production build
bun run start Start production server
bun run check Lint with Biome
bun run typecheck TypeScript type check

Tech stack

Bun + Hono + React 19 + TailwindCSS + Drizzle ORM + Zustand + SQLite (default) / PostgreSQL

Community & Contributing

  • 📘 Wiki — Getting Started, Architecture, AI Watcher deep-dive, Ask assistant, Telegram setup, Deployment, FAQ, Roadmap.
  • 🧰 Good first issues — 10 starter tickets with file paths + acceptance criteria: new LLM adapters (Mistral, Cohere), new notification channels (Slack, Discord), a11y polish, diagnostic CLI, CI workflow, more test coverage.
  • 🐛 Issues — bug reports + feature requests welcome.
  • 📜 CHANGELOG — every release, with the reason behind each change.
  • 🤝 Contributing guide — dev setup, repo layout, conventions, gotchas.

License

MIT

About

Self-hosted command center for AI coding agents (Claude Code, Codex CLI, GitHub Copilot CLI) — live dashboard, orchestration, and an MCP server for programmatic fleet control.

Topics

Resources

Contributing

Stars

34 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages