Skip to main content

TLDR — Token-Efficient Code Analysis

TLDR intercepts large file reads and substitutes compact, structured summaries — giving agents the context they need (function signatures, call graph, line numbers) at a fraction of the token cost.

How It Works

When an agent reads a source file, the TLDR hook intercepts the call and returns a summary instead of the full content. The summary includes:
  • Exported functions and classes with signatures and line numbers
  • Call graph relationships — what calls what
  • Import/export map for the file
  • Key type definitions
The agent can then do a targeted offset/limit read to see exact content for the lines it actually needs to edit. Full reads are only needed when TLDR bypasses (see Quality Gates below).

Token Savings

Across the Overdeck codebase (243 files > 3 KB): For a typical agent session reading 20 files, this saves roughly 0.18onSonnetand0.18 on Sonnet and 0.90 on Opus per session.

Availability

TLDR is available when a .venv directory exists in the project root (or any ancestor directory). Overdeck sets this up automatically for new projects via pan admin hooks install. To set it up manually in an existing project:

Enabling and Disabling

TLDR is enabled by default when .venv is present.

Settings UI

Toggle it in the dashboard Settings page under the Experimental section — look for the “TLDR code-aware reads” toggle. The change takes effect for new agent sessions immediately.

config.yaml

Quality Gates

TLDR automatically bypasses (allowing a normal full read) in cases where a summary would not be useful: Because targeted reads (with offset/limit) always bypass, agents can always get exact content for editing without any special handling.

MCP Tools

When TLDR is active, the following tools are available in agent sessions: Important: tldr_context expects module paths without a file extension (e.g. src/lib/agents, not src/lib/agents.ts). Always pass --lang typescript for TypeScript projects — the default is Python.

Index Management

The TLDR index lives in .tldr/ at the project root and is kept up to date automatically:
  • On pan up — main daemon starts
  • After 10 file edits — background re-warm triggered
  • After a merge — main index re-warmed so new workspaces get a fresh copy
  • On workspace creation — index copied from main, then delta-updated
To manually rebuild the index:
To check daemon status:

Troubleshooting