Terminal and desktop sessions, one identity
AgentPeek recognizes cmd, cmdc, command-code, and commandcode, plus the signed Command Code desktop app. Active terminal or GUI work appears in the notch, while local records in ~/.commandcode/projects keep recent sessions available after the process closes.
Install the current CLI with npm i -g command-code@latest, authenticate with cmd login, then start it with cmd. Command Code remains the app that runs the agent; AgentPeek is its local monitor and control surface.
Stable hooks observe without taking permission control
AgentPeek adds bounded observer commands for SessionStart, PreToolUse, PostToolUse, and Stop under Command Code's existing settings groups. Unrelated settings and hooks are preserved.
Command Code checks its own native permission policy before PreToolUse, so AgentPeek never presents that observer as an approval or waiting-prompt channel. Native permissions stay in Command Code; the session's Open Terminal action returns you to the owning surface. Plan mode skips hooks entirely, so process and local-session discovery remain the honest fallback instead of inventing lifecycle events.
Local conversation and usage from the v3 record
Command Code's append-only v3 JSONL keeps a header and parent-linked entries. AgentPeek follows the active branch to show visible user and assistant messages, model, working directory, and per-session input, output, cache-read, and cache-write tokens. Unknown future entries stay unavailable instead of being guessed, and a torn final record does not erase the valid history before it.
The same local records feed calendar-month token totals and daily history. A persisted costUsd value is shown exactly when present. Command Code exposes no provider quota percentage or reset window there, and AgentPeek never reprices a record whose cost is absent.
Direct Chat only when no process owns the session
A session with a saved ID can continue through cmd -p --resume <id> --output-format json -- <prompt>. At send time, AgentPeek enables that path only when no live Command Code process owns the record, avoiding two writers against the same append-only session.
There is no live-TUI injection and no ACP claim. Experimental Mods are not required. While a live Command Code process owns the session, it stays in its own terminal or desktop app. Once that live owner exits, the proven headless resume path can become available.
Quick Routes to the files Command Code owns
Quick Routes opens shared and Command Code skills, agents, commands, instructions, MCP, config, Mods, taste, plans, projects, file history, logs, and ~/.commandcode. These are global, home-relative destinations. The Mods folder is a route to user-owned files, not a dependency on Command Code's experimental Mods API.