← Reddit

I built an open-source profiler for instrumenting Claude Code.

Reddit · Ill_Rip_9038 · May 22, 2026
A developer created agent-profiler, an open-source tool for debugging Claude Code subagents and skills suffering from poor performance. The profiler identifies context-related issues such as which tool calls expanded the context window, what context subagents received when spawned, and repeated steps that could be optimized into skills or cached lookups. The tool is free, requires only Node.js, runs locally, and works with any agent harness that produces local transcripts.

Detailed Analysis

A developer identified as DevonPeroutky has released agent-profiler, an open-source diagnostic tool designed to instrument and analyze Claude Code's agentic workflows, addressing a significant gap in the tooling available to developers building on top of large language model-based agents. The tool targets a specific and largely unsolved problem: understanding why subagents and skills within agentic systems perform poorly, a question that traditional debugging tools are ill-equipped to answer. The profiler works by parsing local transcripts produced by Claude Code and exposing structured insights about how context is being consumed across an agent's execution lifecycle.

The core insight motivating the tool is that performance degradation in agentic systems is fundamentally a context problem rather than a computation problem. Unlike conventional software where slowdowns trace back to inefficient algorithms or resource bottlenecks, LLM-based agents suffer when their context windows become polluted with irrelevant tokens or when critical information is absent at the moment it is needed. Agent-profiler surfaces three primary categories of diagnostic information: which tool calls caused the context window to expand and at what point in the conversation, what context a spawned subagent or skill actually received at initialization, and which repeated steps across sessions could be refactored into reusable skills, documentation, or cached lookups. The tool requires only Node.js and operates entirely locally, with no external dependencies or data transmission.

The release reflects a maturing phase of the agentic AI development ecosystem, where the initial excitement of building with tools like Claude Code is giving way to the harder engineering problems of reliability, efficiency, and observability. Anthropic's Claude Code, which allows developers to run Claude as an autonomous coding agent capable of spawning subagents and using tools across multi-turn sessions, has gained significant adoption, but the lack of introspective tooling has been a consistent friction point. The absence of profilers, structured logging, and debugging interfaces for agentic systems is a well-documented challenge across the broader AI development community, and community-built tools like this one are filling the vacuum that neither Anthropic nor other major AI providers have yet addressed with first-party solutions.

This development connects to a broader trend in which the open-source developer community is constructing the observability and DevOps infrastructure necessary to make production-grade agentic AI viable. Projects like LangSmith, Helicone, and various prompt tracing libraries have emerged for similar reasons, but agent-profiler distinguishes itself by focusing specifically on Claude Code's transcript format and on the structural dynamics of multi-agent orchestration rather than simple token counting or latency measurement. As agentic systems grow more complex — with nested subagents, long-horizon tasks, and tool use across dozens of turns — the ability to diagnose context inefficiency becomes as essential as a CPU profiler is in systems programming. The emergence of tools like agent-profiler signals that agentic AI development is beginning to develop the engineering culture and toolchain it needs to move beyond prototypes into robust, maintainable systems.

Read original article →