> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging

> Inspect daemon state via prime-agent status. Capture TUI logs (PI_TUI_WRITE_LOG creates tui-<timestamp>-<pid>.log). Use tmux for controlled interactive tests (see AGENTS.md tmux...

Inspect daemon state via `prime-agent status`. Capture TUI logs (`PI_TUI_WRITE_LOG` creates `tui-<timestamp>-<pid>.log`). Use `tmux` for controlled interactive tests (see `AGENTS.md` tmux commands). Inspect stream events in `packages/agent/src/agent-loop.ts` (`AgentEvent` emission points). For web adapter debugging, check `web/server/src/event-mapper.ts` for NDJSON/SSE mapping errors.

Related: [Testing](/fleet-prime-agent/how-to-contribute--testing), [How to monitor](/fleet-prime-agent/guides/monitoring)
