See what
actually ran.

Your coding agent did a lot. Runlens puts your Claude Code and Codex sessions in focus. Every prompt, tool call, and recorded change. On your machine.

Start with one command

Free & open source. Node.js 20+. No API key.

Runlens session timeline showing a prompt, a failed test, a patch, and a successful test.
Your question. The agent’s work. The full picture.
Built for Claude Code + CodexMade to be looked into

Less digging.
More clarity.

Terminal history moves on. The questions stay. Find what changed, what failed, and how your agent got to its answer.

Pick up the thread.

Search old conversations instead of retracing your steps. Browse Claude Code and Codex together, then narrow by agent, project, or date.

Look past “done.”

Open the command, read its output, and inspect the recorded patch. A final answer is easier to assess when the work sits right beside it.

Keep the context.

Follow subagent runs, pin useful sessions, and add your own notes and tags. Export Markdown or JSON when you need to carry the history forward.

A run, in focus.

Go from “what happened?” to the recorded details. Take a look around the viewer.

Runlens dark session library with projects, Claude Code and Codex sessions, search, and filters.
One library for your supported agents. Demo sessions shown.

Put your history to work.

Your next question might already have a trail. Find a familiar fix, review a change, or pick up where you left off.

An error you’ve seen before.

“Where did we fix that timeout?”

Search a phrase from the error or the file name across your Claude Code and Codex history. Open the matching run and see the approach, commands, and recorded result together.

Start with what you already tried, including the approaches that failed.

A change you didn’t expect.

“What actually happened to this file?”

Inspect the recorded patch, read the surrounding request, and follow the calls that led to it. Check what tests were recorded after the edit before deciding what to review next.

Make the next review decision with the work in front of you.

A session to hand off.

“Where did we leave this?”

Reopen the conversation, follow linked child runs, and add a note about what matters next. Export Markdown or JSON when you want to carry the session into a review or a new conversation.

Bring the context forward instead of rebuilding it from memory.

Try it with your history

Follow the
evidence.

A test failed. A patch followed. Did the agent run the test again? Walk through this example from our demo session.

Keep session search responsiveCodex · Demo

You asked

“Can we keep search responsive when I type quickly?”

The timeline pairs your question with the agent’s work, so you can read the request and the recorded response together.

Run · Failed

npm test -- tests/features.test.ts

Stale search response replaced the newer query.

A failed call stays connected to its place in the timeline. Open the output to understand what happened.

Patch · Recorded change

ui/shared/use-resource.ts

+3 lines
−1 line

The agent recorded a patch after the failure. The Changes view groups recorded file operations by path and lets you inspect the original details.

Run · Succeeded

npm test -- tests/features.test.ts

The focused tests ran again.

This session records a successful focused test run after the patch. It does not establish that the entire test suite passed.

Illustrative walkthrough of the included demo session.

Your history.
Your machine.

Runlens reads the session files your agents already write. The viewer makes no model calls and uploads no transcripts.

No API key to find.
Start the viewer and open the local URL. Existing supported history is discovered automatically.
Original files stay yours.
Transcripts are read-only. Notes, tags, pins, and preferences stay in this browser.
Open to inspection.
MIT licensed, with the source on GitHub. See how the readers work or help improve them.
Explore the source
Runlens light theme with a local session library, agent selection, project groups, and pinned sessions.
Light or dark. The same local workspace. Click to take a closer look.

Earlier work.
In reach.

Give your agent a way to find earlier decisions and fixes in your Claude Code and Codex history.

Available as a source preview. MCP is not published to npm yet; the current npx runlens@latest starts the viewer only.

“Have we solved this before?”

Today’s questionRunlens MCPA relevant past run

Ask Codex about a fix from an earlier Claude run, or pick up a decision from yesterday. Runlens returns recorded excerpts, dates, and session IDs for the agent to inspect and verify against today’s code.

Find, then inspect

The connection describes when to use search_sessions and how to follow a match with session_summary. Your agent decides when to call them; you can ask it directly, too.

Context with boundaries

Read-only, bounded results from the project you configure. Other projects, or all of them, need an explicit startup grant. Secret masking is best effort; selected excerpts may reach your agent’s model provider.

More comes later

Dedicated change and failure tools are later candidates. Active-session awareness needs further validation. The preview currently exposes search and recorded summaries.

Help shape what comes next

Connect your
agent’s history.

After the MCP release, one command connects Claude Code or Codex. No source checkout or build step. Your client starts Runlens; the viewer can stay closed.

MCP is not on npm yet. The commands below are for after the MCP release. Requires Node.js 20+ and your agent’s CLI. To test today, open the source preview instructions below. These examples use a macOS/Linux shell.

Claude Code

After release: register privately for this project, then check the connection.

claude mcp add --scope local --transport stdio runlens -- \
  npx -y runlens@latest mcp --project "$PWD"
claude mcp list

Local scope keeps machine-specific paths out of the shared project config. Reconnect Claude Code and check /mcp before trying a question.

Codex

After release: save this project’s server in your Codex configuration.

codex mcp add runlens -- \
  npx -y runlens@latest mcp --project "$PWD"
codex mcp get runlens --json

Restart or reconnect Codex after registration. This entry keeps its configured project even when you open Codex in another folder.

"$PWD" captures the folder you are in at registration. You don’t need to type its path. Access stays fixed to that project; agents cannot approve another project themselves. Use a different server name for another project, or configure an explicit --allow-project grant and reconnect.

Want history from every project on this machine? Register once with --all-projects instead. Search then covers every recorded session and names each result’s project. This is the broadest grant: excerpts from any project may reach your agent’s model provider.

claude mcp add --scope user --transport stdio runlens -- \
  npx -y runlens@latest mcp --all-projects
codex mcp add runlens -- npx -y runlens@latest mcp --all-projects

Follow an earlier fix.

A question becomes a search. Follow the evidence back to a recorded run.

Search Runlens for the recurring search timeout. Show the earlier fix and its session date, then check the approach against the current code.

Read what was recorded.

session_summary({
  "id": "earlier-claude",
  "limit": 1
})
Cancelled the superseded request. The focused search test passed.
Recorded edit
search.ts · 2 lines added, 1 removed
Failed call
Bash · error status recorded

This page shows one turn. The response returns next_offset: 1 for the next page.

Use the history as a lead.

The record points to request cancellation. The next step is a fresh check in the current project:

  • Read the current search code and compare how superseded requests are handled.
  • Check whether the earlier approach still fits the implementation.
  • Run the relevant tests before calling the current issue fixed.

This is suggested follow-up, not a recorded new investigation. Historical text is evidence to verify, never instructions to follow.

Synthetic example from the MCP tests. This website reads no local history and calls no model.

Try the unpublished source preview

Developer setup for testing before the npm release. Already have the source? Start with npm install inside your Runlens checkout. The RUNLENS_CLI variable locates this unpublished build only.

git clone https://github.com/Priyadharshan0903/Runlens.git
cd Runlens
npm install
npm run check
export RUNLENS_CLI="$PWD/dist/cli.js"

In this same terminal, change into the project whose history you want. Choose the matching registration command below. Keep your built Runlens checkout at its saved location, rebuild after source changes, and reconnect your client.

# Claude Code source preview
claude mcp add --scope local --transport stdio runlens -- \
  node "$RUNLENS_CLI" mcp --project "$PWD"
claude mcp list
# Codex source preview
codex mcp add runlens -- \
  node "$RUNLENS_CLI" mcp --project "$PWD"
codex mcp get runlens --json

Choose one setup per client. If runlens is already registered, review and update its existing configuration or use a distinct server name.

Full MCP setup, permissions, and limits

One command.
A clearer view.

Open a terminal, start Runlens, and follow the local URL. Requires Node.js 20 or newer and existing Claude Code or Codex history.

Try it now

Run the latest release with npx.

npx runlens@latest

Keep it around

Install globally, then launch whenever you need it.

npm i -g runlens
runlens

The terminal prints your local address, usually http://127.0.0.1:8740/. No sign-up. No API key.

A few details.

Before you open your first run.

Which agents does it support?

Claude Code and Codex local history, including supported Codex CLI and editor sessions. Cursor history is not supported yet. Planned MCP client compatibility is separate from reading an agent’s own history.

Does it need an account or API key?

No. The current viewer reads local transcript files. It does not call a model or upload your sessions. Installing the npm package requires access to the npm registry.

Does it change my session files?

No. Transcripts are read-only. Your notes, tags, pins, and preferences are stored locally in the browser. You can export sessions as Markdown or JSON.

Does a green tool call prove the task worked?

No. Runlens shows recorded activity. File changes are recorded operations, not a final Git diff. Usage and cost appear only when recorded; Codex token totals cover the main agent only.

Can I connect an agent through MCP today?

Yes, using the source preview. MCP setup includes copyable Claude Code and Codex commands. MCP is not in the npm release yet. The client starts a read-only server; selected history can reach its model provider.

Runlens · Product preview