Skip to content
Seshiby Dosu

Every session tells a story

Seshi captures the sessions your team’s coding agents run, removes known secrets on your machine and again when you run a Seshi server, and writes each session to a bucket in your own cloud account. When someone asks why a change looks the way it does, you can open the session that made it.

Get started

Seshi works with Claude Code, Codex CLI, Copilot CLI, Antigravity CLI, Grok Build, OpenCode, Pi, Gemini CLI, Oh My Pi and OpenClaw.

What can you do with your team’s sessions?

Find the session behind a change

Search the prompts, tool calls, file paths and commands in every session you can read. Each match names its record, so a reviewer can follow the agent from a failing test to the fix.

$ seshi search "pool timeout"
claude-code/00000000-5e51-4000-8000-000000000001  alice  seshi-sample @ fix/db-pool-timeout  2026-11-30 19:41  8 matches
  #4 assistant: The pool is capped at 20 connections with a 5 second idle timeout. If checkout requests hit a pool timeout at 14 concurrent callers…
  #8 tool_result Bash: {"status":"degraded","pool":{"active":20,"idle":0,"waiting":6,"max":20},"last_error":"pool timeout after 5000ms"}
  #15 user: Apply the try/catch/finally fix in src/db/pool.ts and run the checkout pool tests to confirm the pool timeout is resolved.

1 session match. Index caught up 2026-12-05 06:03.

Share sessions without sharing secrets

Before Seshi writes a session, built-in rules replace known credentials, tokens and private keys with a marker that names the rule. When an agent reads a file like .env, Seshi withholds the whole result. When you add a new rule later, seshi redact backfill --since 30d runs the updated rule set over stored sessions and replaces their trace objects.

$ seshi search AKIAIOSFODNN7EXAMPLE
No sessions match.
The query looks like a secret (aws-access-key): seshi's built-in redaction removes those before a session is written, so a search for one finds nothing unless your redaction rules turn that kind off.
Index caught up 2026-12-05 06:03.

Control what leaves sensitive repos

Set capture.remotes in a managed CLI config to allowlist only approved git remotes, or list repositories in [capture] exclude so their sessions never enter Seshi. For sensitive repos where prompts still help your team learn, [capture] redact_tool_calls replaces every tool call’s input and output with [redacted:tool-call] on your machine before upload. Prompts, replies, tool names and failure flags still come through.

/etc/seshi/seshi.tomlServer config
# served by your server to every machine
[capture]
exclude = ["acme/payroll", "github.com/acme/hr-*"]
redact_tool_calls = [
  "acme/research",
  "github.com/acme/ml-*",
]
/etc/seshi/managed.tomlManaged CLI config
# Linux path, allowlist approved remotes only
[capture]
remotes = ["github.com/acme"]

Run SQL across sessions and model spend

Run read-only SELECT queries across sessions, events and llm_calls with seshi sql. Seshi prices calls with known rates against a built-in Tokedex price table on your own infrastructure, without sending data anywhere. Per-call cost_usd appears in llm_calls, and seshi sessions read headers report each session’s total cost_usd and unpriced_calls count.

$ seshi sql "SELECT s.owner, s.project, c.model,
  count(*) AS calls
  FROM llm_calls c JOIN sessions s USING (owner, archive_id)
  GROUP BY 1, 2, 3"ownerprojectmodelcallsaliceseshi-sampleclaude-sonnet-4-581 row · 4 ms · as alice (local index) · sessions 2026-11-05 → 2026-12-05

Let your agents search past sessions

Add Seshi as an MCP server so your coding agents can list, search and read your team’s past sessions on their own, and run SQL when your deployment and credentials allow it.

$ claude mcp add seshi -- seshi mcp

What runs where?

Seshi architectureA session flows from coding agent hooks through the spool and uploader on your machine, over HTTP to the seshi serve API and its in-memory pipeline, and into your bucket. Cloud sources reach the worker. Readers use the Seshi CLI, API clients, or the bucket change feed. In serverless mode each machine runs the pipeline and writes its own folder of the shared bucket.Your machineCoding agentsClaude Code · Codex · Grok Build · othersseshi hook <agent> <event>Spool: one small file per eventUploaderlock · state.json · capture decisionStop, SessionStart, …appendsdrains each passStatus line and desktop chip read state.jsonYour Seshi serverHTTP APIauth: org key · device · session · admin · servicePipeline, in memorynormalizeredactfilterreviewwriteonly the result is written, nothing rawWorkerassembler · pollers · search indexsweep · retention · heartbeatenvelopeassembled OTLP sessionsYour buckets3:// · r2:// · az:// · gs:// · file://owners/<owner>/ sessions/<id>/ metadata.json trace.<hash>.json.gz spans/ review/ changes/tokens/sources/assembly/pending/worker/heartbeat.jsonseshi.jsonthe source of truthPOST /v1/sessionswritesreads, sweepsOther sourcesOTLP pushed · Datadog and S3 folders polledSeshi CLIsessions · search · sqlAPI clientsservice tokensChange-feed readersDosu, indexersGET /v1/…list changes/serverless mode: each machine runs the pipeline and writes its own folderone session’s path
Agent hooks write events to a local spool. The background uploader sends redacted turns to your Seshi server, which normalizes, redacts, filters and writes each session to your bucket. In serverless mode, each machine runs the pipeline and writes to its own folder.

Where does a session go?

Follow a Claude Code session on the branch fix/db-pool-timeout, from your agent’s last turn to a teammate’s search on a Seshi server.

  1. On your machine

    Your agent finishes a turn

    Claude Code runs Seshi’s Stop hook at the end of each turn and passes the session’s details on stdin. The hook checks capture.remotes allowlists, org exclusions and folder rules, appends a small file to the spool, and exits without printing anything, so your agent never waits on an upload.

    # written by seshi capture install
    "Stop": [{ "hooks": [{
      "type": "command",
      "command": "/Users/alice/.local/bin/seshi hook claude-code Stop",
      "timeout": 30
    }] }]
  2. On your machine

    Seshi strips private data before upload

    Before any text leaves your machine, the background uploader strips private data with built-in secret patterns and your team’s custom rule packs. For repositories on [capture] redact_tool_calls, Seshi removes every tool call’s input and output before upload. When the session arrives, your Seshi server double-checks the session for thoroughness. Your server withholds sensitive file reads like .env, runs every rule pack again and applies optional model review before writing to storage. When you add a rule later, seshi redact backfill --since 30d applies the new rule to stored sessions.

    First prompt after your machine’s rules run

    “Checkout integration tests keep failing with a DB pool timeout after 14 concurrent requests against postgres://checkout_app:[redacted:url-credentials]@db.local:5432/checkout. Our staging runner uses [redacted:aws-access-key] and password: [redacted:credential].”

  3. In your bucket

    Seshi writes the redacted session to your bucket

    Each session gets a folder under its owner. The folder holds a gzipped trace of the session’s 21 records and a metadata.json that names the rules that fired and how often. The metadata leaves out the values they matched. Seshi never writes the raw transcript to your bucket, so the redacted trace is the only copy. Any tool that opens gzipped JSON can read it.

    owners/alice/sessions/e54aaebe…/
      trace.cc84f1d4….json.gz
      metadata.json
    {
      "visibility": "org",
      "branch": "fix/db-pool-timeout",
      "withheld_calls": {
        "toolu_read_env": "sensitive-file"
      }
    }
  4. For your team

    Your team and their agents can search it

    Seshi indexes each event of the session for search and SQL. Members can read their own sessions and any session shared with the org. Admins can keep new sessions unshared by default with default_visibility = "owner", and you can toggle any session with /session-capture share or unshare. Coding agents list, search and query sessions the same way over MCP.

    $ seshi sessions ls
    alice: 1 session; most recently active first, in local time
    claude-code/00000000-5e51-4000-8000-000000000001
      2026-11-30 11:41  21 records  org  seshi-sample (fix/db-pool-timeout)
  5. Whenever you want

    You stay in control of capture

    Supported agents show capture status in the status line, footer or editor bar so you can see when capture is on. Run seshi capture pause 2h to halt running sessions and skip new ones without retracting earlier turns. Run /session-capture unshare to hide a session from other members on an identity-verified server. Admins and authorized service readers can still read unshared sessions. Run /session-capture off to stop uploading that session and ask your server to retract what it stored. A machine that’s offline sends the retraction once it reconnects.

    Session Capture ◉Shown in your agent’s status line
    $ seshi capture pause 2h
    > /session-capture unshare
    > /session-capture off

Seshi runs in your cloud account

Your sessions stay in a bucket you own, in folders you can open with any tool that reads gzipped JSON. Dosu builds the IaC modules, Helm chart and rollout scripts, and our team helps you run Seshi in your account.

Start serverless if your team is small and you want nothing extra to operate. Run a server when you need company sign-in, unshared sessions other members can’t read, or sessions pulled in from cloud agents.

# set up your server once
$ seshi admin init --store s3://acme-sessions/seshi --region us-east-1
$ seshi serve                # :7200, put TLS in front

# in a second terminal, after signing in as admin
$ seshi invite alice         # prints a single-use invite link
  • Access control

    Revoke any machine

    Only your server holds the bucket keys. Each machine uploads with a revocable Seshi device token.

    If you lose a machine

    Revoking a device token stops uploads using it on that server at once, and within 30 seconds on other instances. Active CLI session tokens expire in one hour.

  • Identity

    Use company sign-in

    Connect OIDC or GitHub for team sign-in. Seshi checks each person’s role and session visibility before serving it.

    What your team sees

    Unshared sessions stay hidden from other members. Admins and authorized service readers can still open them.

  • Safety check

    Check sessions twice

    Redaction runs again on your server for machine uploads and for sessions pulled from cloud agents.

    Why the second pass matters

    A machine that skipped a rule can’t put an unredacted session in front of your team.

You can also turn on model review for a second check. Seshi sends text the rules have redacted to a model endpoint you choose. Pick a model you host and the review stays on your own infrastructure.

Seshi works with the tools your team runs

Sign-in
OktaMicrosoft Entra IDGoogle WorkspaceGitHubAny OIDC provider
Storage
Amazon S3Cloudflare R2Google Cloud StorageAzure Blob StorageMinIOOther stores that pass Seshi’s storage test
Deploy
OpenTofuKubernetesHelmDocker ComposeRenderAWS FargateAmazon EKS
Machine rollout
Iru Endpoint Management, formerly KandjiMicrosoft Intune
Linux rollout
AnsiblePuppetChefSaltFleet
Cloud agents
Claude Managed AgentsClaude Compliance APICloud Agents APIOpenTelemetryDatadog TrajectoryS3 sources

Dosu publishes IaC modules for AWS, Cloudflare and Render that require OpenTofu 1.8 or later. You also get a Helm chart at oci://ghcr.io/dosu-ai/charts/seshi, the ghcr.io/dosu-ai/seshi container image, and MDM scripts for macOS, Windows and Linux.

How is Seshi different from observability tools?

Observability tools trace the agents you build. Seshi keeps the sessions your team runs with coding agents, so you can search them later.

  • Shipping an agent product?Trace it while it runs.Use LLM observability
  • Using coding agents?Keep the session behind each change.Use Seshi
  • Doing both?Keep both records.Connect them with OpenTelemetry
Comparison of LLM observability tools and Seshi by primary job, what each records, where the record lives, and what sets retention.
Compare the recordsLLM observabilityThe runtime record for agents you buildSeshiThe session record from agents you use
Primary jobWatch it runDebug and improve LLM products in production.Reopen the sessionPreserve and search coding-agent sessions afterward.
What it recordsLive executionRequests, traces, model calls, latency and errors.The coding sessionPrompts, replies, tool calls, files, commands and outcomes.
Where it livesOn the platformVendor cloud or your observability stack.In your bucketFolders you can read without Seshi.
What sets retentionPlatform settingsRetention windows set by the tool.Your rulesBucket lifecycle and retention policies you control.
Use both records together.

Seshi reads OpenTelemetry spans and Datadog Trajectory sessions, and exports OpenTelemetry spans and ATIF, so session history can sit beside production telemetry.

Dosu turns the wheel of a heavy riveted vault door under a caged lamp.

Talk with the people who build Seshi

Dosu builds Seshi along with the IaC modules, Helm chart and MDM scripts that run it in your account. Our team can help you choose between a server and serverless, connect your identity provider and plan the rollout to your machines.