Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
Assigneesskunk-ape

Relationships

#4155 Agent sessions: preview page in the dashboard, shown only when session data exists

Opened by skunk-ape · 10/30/2026· Shipped 10/31/2026

Part of agent observation (scope doc: https://claude.ai/artifact/NdQUomjuVAfo4SsPuRWYWk; harness survey #4117, OTEL research #4118). Agent sessions show what a coding agent did in a swamp repo: its turns, its tool calls, and whether each call used swamp, went around it (a bypass), or neither, with findings that say what to tune.

How it ships. The data comes from the harnesses' own local session files (Claude Code transcripts, Codex rollouts), which need no hooks or setup. An unpublished extension imports them as ordinary repo data. A core dashboard page shows them, hidden unless the repo has session data the viewer can read, with a Preview chip. No flag: until the extension is published, nobody else gets data, so nobody sees the page.

Reference prototype (local, private, not for sharing): ~/scratch/agent-sessions-prototype/ on Seth's machine. See its README.

Goal

Add an "Agent sessions" page to the dashboard, under Operations, that renders session data in the contract from #4154. Use the prototype's layout as the starting point.

Scope

  • Visibility. The sidebar item and page show only when the repo has session data the viewer can read. This intentionally departs from the faded "Off" items in components/sidebar_state.ts; say so in a code comment so it isn't "fixed" later. The route still answers a direct URL, so hidden is not an access control.
  • Preview chip on the page.
  • Views, from the prototype:
    • the sessions table (repo, harness, start, length, turns, calls, a swamp / bypass / neutral bar, failed calls, tokens, flags);
    • tiles for the selected session;
    • "What to look at": the findings, each with a "Show calls" filter;
    • the session strip with idle time between turns removed;
    • filter chips;
    • expandable turn waterfalls, each on its own time scale;
    • an inspector with the redacted command, label, rule and swamp span tree.
  • Findings are read, not computed. The extension writes them (#4157); the page only renders them.
  • Works in both the local dashboard (swamp dashboard) and serve.
  • Light and dark themes, using the dashboard's existing tokens.

Volume

Session data can reach thousands of sessions per repo (see #4154). So:

  • The list reads summaries only, a page at a time, newest first, through bounded queries (a limit on every query; recent fixes for large listings stalling on shared scan permits are the reminder). The visibility check is one query with a limit of 1.
  • Detail loads on demand when a session is opened: one item, up to about 1.5 MB after the text cap.
  • Large turns render only the visible rows. The prototype draws every call; sessions with hundreds of calls in one turn need virtualised rows.
  • Subagents are shown at full detail. A call that started a subagent expands into the subagent's own turns and calls, with the same labels, failures and inspector. Subagent calls are reachable from findings and filters too. Don't collapse them into a summary or hide them by default.
  • Headless sessions (for example claude -p from automation) are marked and can be filtered, not hidden by default.
  • Trends across sessions read the extension's daily rollups once the count passes a few thousand, not every session.

Testing

Use fixture data in the #4154 schema built from the prototype's three sessions, so the page can be built before the extension exists.

Out of scope

Importing data, classification rules, an empty state with import instructions (the page is hidden when there is no data).

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 10 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

10/31/2026, 1:23:56 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape assigned skunk-ape10/30/2026, 3:48:15 PM

Sign in to post a ripple.