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.
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 commandFree & open source. Node.js 20+. No API key.
Terminal history moves on. The questions stay. Find what changed, what failed, and how your agent got to its answer.
Search old conversations instead of retracing your steps. Browse Claude Code and Codex together, then narrow by agent, project, or date.
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.
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.
Go from “what happened?” to the recorded details. Take a look around the viewer.
Your next question might already have a trail. Find a familiar fix, review a change, or pick up where you left off.
“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.
“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.
“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.
A test failed. A patch followed. Did the agent run the test again? Walk through this example from our demo session.
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.
Runlens reads the session files your agents already write. The viewer makes no model calls and uploads no transcripts.
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?”
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.
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.
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.
Dedicated change and failure tools are later candidates. Active-session awareness needs further validation. The preview currently exposes search and recorded summaries.
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.
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.
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
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.
Find the relevant history.
search_sessions({
"query": "recurring search timeout"
})
Two matching records in the configured demo project:
The agent follows the earlier Claude session to inspect the recorded fix.
Read what was recorded.
session_summary({
"id": "earlier-claude",
"limit": 1
})
Cancelled the superseded request. The focused search test passed.
search.ts · 2 lines added, 1 removed
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:
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.
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.
Open a terminal, start Runlens, and follow the local URL. Requires Node.js 20 or newer and existing Claude Code or Codex history.
The terminal prints your local address, usually http://127.0.0.1:8740/. No
sign-up. No API key.
Before you open your first run.
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.
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.
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.
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.
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.