---
title: Session Trajectory (the full log of what an agent did)
---

# Session Trajectory (the full log of what an agent did)

## What it is

**What it is:** a read-only **full log** of every action a session took — every tool call in order
with its **full input**, **full result**, and **per-call timing**. It answers "exactly what did this
session do, step by step" — like a coding harness's trajectory/timeline tab.

**Where it lives — two places:**

- **In a session:** open the "⋯" menu and pick **Trajectory**. The conversation area is replaced by
  the log; switch back to **All** to return to the chat.
- **In the sidebar:** the **Session Trajectory** tile (under **Developer Tools**) opens a
  cross-session browser — pick any recent session on the left, read its full trajectory on the right.

Both appear only when the feature is turned on (see _Availability_), on desktop and on your phone.

## Where to find it

### Availability

In-development and **off by default**. Turn it on in **Settings → Lab → Sessions & agents → "Session
Trajectory view"**. It is read-only (it never changes a session) and works on desktop and mobile.
Setting key: `sessionTrajectoryEnabled`. Contract: `session-trajectory-contract`.

## How it behaves

### What it shows

- **A metrics strip:** Turns, Tool calls, Tokens (in + out), Cost, and API time.
- **Every tool call, in order:** each row shows the tool (Read, Bash, a Skill, an MCP tool…), the
  time it started, and how long it took. Click a row to expand its **full input** and **full result**
  (an errored call is flagged). Very long inputs/outputs are trimmed for display with a "truncated"
  note; a very long session is capped at its most recent actions.

### Where the detail comes from (and the honest limit)

The full detail is read from the session's **Claude CLI transcript** — the on-disk record of every
tool call and result. That's the only place the complete inputs/outputs live. It works on **desktop
and on your phone** (over Web Access) — the sidebar browser lays out as two columns on desktop and a
tap-through list on mobile — and any pasted secret is scrubbed out of the log before it's shown.

**Engines without a transcript** (Codex, Gemini, and the rest — or a session that hasn't started yet)
gracefully **degrade**: instead of the full log you get the turn-level summary built from the
conversation Omniscio already stores, with a clear note that full detail isn't available for that
session. It's never blank and never an error.

## For agents

### For agents working in the code

- **Data (main, read-only):** `session-trajectory-service.ts` resolves the session's
  `cliSessionId` → the `.jsonl` transcript → the pure `parse-trajectory-transcript.ts` (pairs
  `tool_use`↔`tool_result` by id, times from line timestamps, excludes sidechain, caps each field),
  after scrubbing managed secrets. Returns `hasTranscript: false` (→ renderer degrades) when there is
  no transcript.
- **IPC:** `SESSION_TRAJECTORY_GET` (`{ sessionId }` → `SessionTrajectory`), handler
  `session-trajectory-handlers.ts` (auto-discovered). Mobile-ready: BASELINED in
  `web-access-ws-invoke-baseline.json` (not blocked); the payload is secret-scrubbed before the bridge.
- **UI:** `TrajectoryView.tsx` (fetches the IPC; full log OR the degrade view from the pure
  `derive-trajectory.ts`), mounted per-session (`SessionOverflowMenu` row + `SessionPanel`) and by the
  sidebar `TrajectoryBrowserPanel` (integration `session-trajectory`, Developer Tools group).
- Gate visibility ONLY via `isUnreleasedFeatureVisibleInRenderer('session-trajectory', settings)`.

## Related

Nothing else in the library documents this view, so begin at [INDEX.md](INDEX.md), the library index, and work from there to the pages about how sessions run and what they record.
