enables Agents to complete trace location, Lead/Subagent selection, Markdown export, and subsequent analysis independently without relying on a browser UI. Users only need to provide vague clues, and the Agent will go through the complete workflow of
list → show → export → Read markdown
.
Before executing any trace commands, first confirm if
is available:
Run
again after installation to confirm availability.
If
returns an empty list, or the user's mentioned session cannot be found in the list, it means the session is a Claude Code session not started via cclens, and trace data cannot be obtained. In this case, directly inform the user: This session lacks trace records, possibly because it was not started using cclens. It is recommended to start Claude Code via cclens in the future to capture traces.
Read the
and
in the
output before running
to avoid invalid operations on the wrong session.
The
in the returned JSON is the absolute path to read in the next step. It also returns
and
. Confirm that the exported object matches the target before reading.
When
is not specified, the default output path is
~/.claude-code-lens/exports/trace-<first 8 digits of session>-<agentId>.md
.
All errors are returned as structured JSON. Read
to determine the recovery path; do not parse
for judgment.