Documentation Index
Fetch the complete documentation index at: https://docs.crewship.ai/llms.txt
Use this file to discover all available pages before exploring further.
Explain
cmd/crewship/cmd_explain.go is “tell me what happened in this run, in plain English.” Pure orchestration over existing primitives — no new server surface area:
- Look up the run via
fetchRun(shared withretry). - Fetch journal entries filtered by the run’s agent and a window starting 5 min before
created_at. - Compose a prompt that includes the formatted timeline (oldest first), capped at 200 entries.
- Send the prompt to the default agent (or
--agentoverride) using the same streaming pipeline asask.
crewship explain <run-id>
| Flag | Type | Default | Effect |
|---|---|---|---|
--agent <slug> | string | default-agent | Agent to summarize via. Falls back to CREWSHIP_DEFAULT_AGENT env, then default_agent config. |
--types <list> | string | (all) | Comma-separated entry types to include. Sent server-side as entry_type=. |
-q, --quiet | bool | false | Suppress the [explain <run> via <agent>] meta line. |
--markdown | bool | (config) | Force markdown ANSI styling on. |
--no-markdown | bool | (config) | Force markdown styling off. |
--save <path> | string | (unset) | Tee the response to file. |
Examples
Output shape
The default prompt instructs the agent to produce 3-6 bullets that highlight errors, escalations, keeper denials, budget warnings, or unexpected control flow. Normal runs collapse to one line. The exact template isbuildExplainPrompt() in cmd_explain.go.
Common errors
run <id> has no agent_id; cannot scope journal lookup— the run record is incomplete.no journal entries found for agent in window starting <ts>— agent has no journal activity in the scoped window.no agent set to summarize. Use --agent, set CREWSHIP_DEFAULT_AGENT, or run 'crewship config set default-agent <slug>'— no default and no override.run <id> not in recent window(warning, fallback to 1 h ago) — run is older than the latest 100 entries from/api/v1/runs.
See also
crewship diff <a> <b>— compare two runs structurally.crewship recap <chat-id>— same idea for a whole chat thread.crewship journal— read the underlying entries yourself.