Live isometric atlas for Codex, OpenCode, and Claude Code sessions, rendered in a local browser.
Beta. Local-only, no hosted service.
Developers running multiple Codex, OpenCode, or Claude Code sessions who want a visual, at-a-glance view of activity.
- Track which agents are active right now.
- Spot errors or idle processes quickly.
- Inspect recent activity without digging through logs.
- Does not start, stop, or manage processes.
- Does not connect to remote Codex, OpenCode, or Claude Code instances.
- No authentication or multi-user access.
npm install
npm run devThe server prints the local URL (default http://127.0.0.1:8787).
Consensus reads local Codex CLI sessions and does not require API keys.
You just need Codex CLI installed and signed in (Pro subscription or team plan).
If OpenCode is installed, Consensus will auto-start its local server.
If Claude Code is installed, it will appear automatically (run claude once to sign in).
Claude activity tracking requires hooks (see "Claude hooks" below).
npm run dev also keeps dist/claudeHook.js up to date so hooks can point at the compiled entry during development.
npx consensus-cliExpected output:
consensus dev server running on http://127.0.0.1:8787
- One tile per running
codex,opencode, orclaudeprocess. - Activity state (active/idle/error) from CPU and recent events.
- Best-effort "doing" summary from Codex session JSONL, OpenCode events, or Claude CLI flags.
- Click a tile for details and recent events.
- Active lane for agents plus a dedicated lane for servers.
- Scan OS process list for Codex + OpenCode + Claude Code.
- Resolve Codex session JSONL under
CODEX_HOME/sessions/. - Query the OpenCode local server API and event stream (with storage fallback).
- Ingest Claude Code hook events to infer activity (CLI flags only for "doing").
- Poll and push snapshots over WebSocket.
- Render tiles on a canvas with isometric projection.
- Local dev:
npm install+npm run dev - npx:
npx consensus-cli - Docker: not available yet
- Hosted: planned (opt-in aggregation later)
CONSENSUS_HOST: bind address (default127.0.0.1).CONSENSUS_PORT: server port (default8787).CONSENSUS_POLL_MS: process presence polling interval in ms (default500).CONSENSUS_SCAN_TIMEOUT_MS: scan timeout in ms (default5000).CONSENSUS_SCAN_STALL_MS: scan stall warning threshold in ms (default60%of timeout, min250).CONSENSUS_SCAN_STALL_CHECK_MS: scan stall check interval in ms (defaultmin(1000, stallMs), min250).CONSENSUS_CODEX_HOME: override Codex home (default~/.codex).CONSENSUS_CODEX_NOTIFY_INSTALL: optional path to install a Codexnotifyhook viacodex config set -g notify=["<path>"](set to0/falseto disable auto-install).CONSENSUS_OPENCODE_HOST: OpenCode server host (default127.0.0.1).CONSENSUS_OPENCODE_PORT: OpenCode server port (default4096).CONSENSUS_OPENCODE_TIMEOUT_MS: OpenCode request timeout in ms (default5000).CONSENSUS_OPENCODE_AUTOSTART: set to0to disable OpenCode autostart.CONSENSUS_OPENCODE_EVENTS: set to0to disable OpenCode event stream.CONSENSUS_OPENCODE_HOME: override OpenCode storage (default~/.local/share/opencode).CONSENSUS_OPENCODE_EVENT_ACTIVE_MS: OpenCode active window after last event in ms (default0).CONSENSUS_OPENCODE_ACTIVE_HOLD_MS: OpenCode hold window in ms (default3000).CONSENSUS_OPENCODE_INFLIGHT_IDLE_MS: OpenCode in-flight idle timeout in ms (defaults toCONSENSUS_OPENCODE_INFLIGHT_TIMEOUT_MS).CONSENSUS_OPENCODE_INFLIGHT_TIMEOUT_MS: OpenCode hard in-flight timeout in ms (default15000).CONSENSUS_PROCESS_MATCH: regex to match codex processes.CONSENSUS_REDACT_PII: set to0to disable redaction (default enabled).CONSENSUS_UI_PORT: dev UI port for Vite when runningnpm run dev(default5173).CONSENSUS_DEBUG_OPENCODE: set to1to log OpenCode server discovery.CONSENSUS_CODEX_EVENT_ACTIVE_MS: Codex active window after last event in ms (default30000).CONSENSUS_CODEX_ACTIVE_HOLD_MS: Codex hold window in ms (default3000).CONSENSUS_CODEX_INFLIGHT_IDLE_MS: Codex in-flight idle timeout in ms (default30000, set to0to disable).CONSENSUS_CODEX_CPU_SUSTAIN_MS: sustained CPU window before Codex becomes active without logs (default500).CONSENSUS_CODEX_CPU_SPIKE: Codex CPU spike threshold for immediate activation (default derived).CONSENSUS_CODEX_INFLIGHT_TIMEOUT_MS: Codex in-flight timeout in ms (default3000).CONSENSUS_CODEX_SIGNAL_MAX_AGE_MS: Codex max event age for in-flight signals (defaultCONSENSUS_CODEX_INFLIGHT_TIMEOUT_MS).CONSENSUS_PROCESS_CACHE_MS: process cache TTL in ms for full scans (default1000).CONSENSUS_PROCESS_CACHE_FAST_MS: process cache TTL in ms for fast scans (default500).CONSENSUS_SESSION_CACHE_MS: Codex session list cache TTL in ms for full scans (default1000).CONSENSUS_SESSION_CACHE_FAST_MS: Codex session list cache TTL in ms for fast scans (default500).CONSENSUS_EVENT_ACTIVE_MS: active window after last event in ms (default300000).CONSENSUS_CPU_ACTIVE: CPU threshold for active state (default1).CONSENSUS_CLAUDE_CPU_ACTIVE: Claude CPU threshold override (default1).CONSENSUS_CLAUDE_CPU_SUSTAIN_MS: Claude sustained CPU window in ms (default1000).CONSENSUS_CLAUDE_CPU_SPIKE: Claude spike threshold override (default derived).- Claude activity uses hooks; CPU settings are legacy and ignored for TUI activity.
CONSENSUS_CLAUDE_EVENT_TTL_MS: Claude hook event TTL in ms (default1800000).CONSENSUS_CLAUDE_INFLIGHT_TIMEOUT_MS: Claude in-flight timeout if no hook events (default15000).CONSENSUS_CLAUDE_ACTIVE_HOLD_MS: Claude hold window in ms (default3000).CONSENSUS_ACTIVE_HOLD_MS: keep active state this long after activity (default3000).CONSENSUS_IDLE_HOLD_MS: hold idle state briefly after spans end (default200).CONSENSUS_SPAN_STALE_MS: span stale timeout for event progress (default15000).
Full config details: docs/configuration.md
Claude Code hooks are configured in ~/.claude/settings.json, .claude/settings.json, or
.claude/settings.local.json.
Consensus ignores Claude statusLine; hooks are the sole Claude activity signal.
Hook handler source lives in src/claudeHook.ts (Effect) and is compiled to dist/claudeHook.js.
Example (repeat the command for the events you want to track):
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node /path/to/consensus-cli/dist/claudeHook.js http://127.0.0.1:8787/api/claude-event"
}
]
}
],
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "node /path/to/consensus-cli/dist/claudeHook.js http://127.0.0.1:8787/api/claude-event"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node /path/to/consensus-cli/dist/claudeHook.js http://127.0.0.1:8787/api/claude-event"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "node /path/to/consensus-cli/dist/claudeHook.js http://127.0.0.1:8787/api/claude-event"
}
]
}
]
}
}Notes:
- Tool-related hooks (
PreToolUse,PostToolUse,PostToolUseFailure,PermissionRequest) require amatcher. Use"*"to capture all tools. - Claude hooks send JSON via stdin;
dist/claudeHook.jsexpectshook_event_nameandsession_id. - Dev (dynamic TS): use
node --import tsx /path/to/consensus-cli/src/claudeHook.ts http://127.0.0.1:8787/api/claude-eventso hook changes apply without rebuilds.
Recommended events: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest,
PostToolUse, PostToolUseFailure, Stop, SubagentStart, SubagentStop, SessionEnd,
Notification.
npm run scanprints a one-shot JSON snapshot.npm run tail -- <session.jsonl>tails a session file.
npm run test- Port conflict on 8787: set
CONSENSUS_PORT=8790. - If the browser cannot connect, try
http://[::1]:<port>or setCONSENSUS_HOST=127.0.0.1. - If "doing" is empty, the session log may not be resolvable yet.
More: docs/troubleshooting.md
docs/architecture.mddocs/configuration.mddocs/install.mddocs/examples.mddocs/cli.mddocs/decisions/docs/audience.mddocs/promises.mddocs/problem.mddocs/data-inventory.mddocs/threat-model.mddocs/constitution.mddocs/testing.mddocs/release.mddocs/troubleshooting.md
See CONTRIBUTING.md.
See SECURITY.md.
See GOVERNANCE.md.
See ROADMAP.md.
See SUPPORT.md.
Apache-2.0 License. See LICENSE.
"consensus" is a project name used by the maintainer. Please do not imply endorsement or use logos without permission.
Development happens in the open via issues and pull requests.
This project is meant to be forked, remixed, and adapted to your local workflows.
The OSS version stays local-first. A future hosted service could optionally aggregate agents across machines with a unified web dashboard.