01
Terminal and desktop sessions, observed live
AgentPeek recognizes interactive zcode and internal zcode-cli processes, plus the signed ZCode desktop app. Management commands such as doctor, login, plugins, and skills stay out of the session list. zcode app-server is also excluded from terminal-session detection. Zed-hosted ACP processes remain attributed to ZCode without turning that app-server into an attach transport.
Seven global lifecycle hooks report session start, prompts, tools, permission waits, failures, and turn completion. They are observers only: a permission request becomes an attention handoff, and ZCode keeps the decision in its own terminal or app.
02
Strict read-only sessions, conversation, and tools
ZCode persists sessions in ~/.zcode/cli/db/db.sqlite. AgentPeek reads that database without writes and projects visible user and assistant messages, completed tools, working directory, model, parent-linked workflow and subagent sessions, files touched, and commands run.
The reader accepts the exact ZCode 3.3.6 migrations and columns. An unknown future schema, malformed JSON, orphaned part, or torn usage relationship is unavailable instead of being guessed. Synthetic, model-only, reasoning, and internal control parts are not presented as user conversation.
03
Exact local token accounting, not a quota guess
AgentPeek sums ZCode's persisted model_usage rows for calendar-month and daily views. Input includes input, cache-creation, and cache-read tokens; output stays separate; and computed_total_tokens remains authoritative. Turn counters are not added a second time.
These are raw local tokens. ZCode does not expose a provider quota percentage, spend ledger, or provider reset window through this store, so AgentPeek does not invent them.
04
Config, MCP, and Quick Routes stay under your control
AgentPeek merges one bounded command into each managed group under hooks.events in ~/.zcode/cli/config.json, preserving unrelated keys and existing hooks. It reads MCP servers from mcp.servers. ZCODE_STORAGE_DIR relocates the complete root when set.
Quick Routes opens commands, skills, agents, instructions, config, database, and root. Project configuration can also live in zcode.json or .zcode/config.json. AgentPeek does not treat zcode app-server as ACP, so Direct Chat, prompt delivery, cancellation, and in-notch permission answers are unavailable.
