cd /news/ai-agents/introducing-rockettrace-using-xcode-… · home › topics › ai-agents › article
[ARTICLE · art-145263] src=avanderlee.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Introducing RocketTrace: Using Xcode Instruments with AI Agents

RocketTrace, a new Mac app from developer Antoine van der Lee, analyzes Xcode Instruments recordings and converts them into ranked findings that AI coding agents such as Claude Code, Codex, and Cursor can act on. In a benchmark, an agent using RocketTrace found more performance issues while consuming a fraction of the tokens compared with an agent using raw Apple tooling, where median investigations used 1.8 to 2.1 million tokens and took 10 to 12 minutes. RocketTrace detects more than 42 performance problems across six categories, including 15 CPU hotspots and wasteful work, 9 hangs and unresponsiveness, 8 Swift Concurrency mistakes, 7 SwiftUI updates and redraws, 2 animation hitches and scrolling, and 1 app launch issue, and supports macOS apps, the Simulator, and physical iOS and iPadOS devices.

by read12 min views1 publishedOct 5, 2026
Introducing RocketTrace: Using Xcode Instruments with AI Agents
Image: Avanderlee (auto-discovered)

I’m super excited to introduce you to RocketTrace: a Mac app that analyzes your Xcode Instruments recordings and turns them into ranked findings that your AI agent can act on. Instead of asking Claude Code, Codex, or Cursor to dig through a raw performance trace, you give it a compact summary with the evidence it needs to explain what’s slow in your app.

In this article, I’ll show you what RocketTrace does, how it works together with your coding agent, and what happened when I benchmarked it against an agent using raw Apple tooling. Spoiler: the agent found more issues while using a fraction of the tokens by using RocketTrace.

#

When I started developing apps in 2009, working without Xcode Instruments was impossible. To have an app simply scrolling efficiently you could spend hours inside Xcode Instruments (shouldRasterize = true for those that know). We got a little bit spoiled over the years with devices becoming faster, code becoming more efficient.

But development is changing. We’re no longer writing the majority of the code ourselves and you can tell. Even though the devices are faster than ever, performance issues appear more often than before.

While AI agents are becoming smarter, they (luckily) aren’t using Xcode Instruments automatically. Yet, I wish they did, but I also wish they didn’t: it’s really expensive (token-wise, more about that later). The code they write works, gets better with every model update, but often results in bad performance. Therefore, it’s more important than ever to open Xcode Instruments regularly.

#

Instruments is still the best way to find out why your app hangs, stutters, or runs hot. However, a .trace file isn’t something an agent can simply read. It’s a package full of tables: CPU samples, hangs, hitches, Swift tasks, SwiftUI updates, file activity, and much more.

You might expect an agent to open that package, find the problem, and be done in a minute. What actually happens is that it uses Apple’s command-line tools to export table after table, notices the output is huge, filters it, writes helper scripts, and repeats that for every instrument in the recording. Every export lands in the context window, and every next step re-reads that context.

In the benchmark, the median investigation without RocketTrace used 1.8 to 2.1 million tokens and took 10 to 12 minutes. If you’ve read my article on how to reduce token usage in Claude Code, Codex, and Cursor, this pattern will look familiar. The answer is small. The cost is in everything the agent reads to get there.

#

RocketTrace does the heavy reading before your agent gets involved. You either record a recent build of your app directly, or you import an existing Instruments trace. RocketTrace supports macOS apps, the Simulator, and physical iOS and iPadOS devices.

After recording, RocketTrace analyzes the trace and ranks what it finds by measured impact, so you investigate the strongest lead first. Each finding comes with representative evidence from the recording. Today, RocketTrace detects more than 42 performance problems across six categories:

  • CPU hotspots and wasteful work (15)
  • Hangs and unresponsiveness (9)
  • Swift Concurrency mistakes (8)
  • SwiftUI updates and redraws (7)
  • Animation hitches and scrolling (2)
  • App launch (1)

These are the detections RocketTrace runs on every recording, and the list keeps on growing. We keep an internal test app full of deliberate performance problems and use it to prove every new detection before it ships. You can find each detection, what it finds, and why it matters on the What RocketTrace Detects page.

Swift Concurrency is a good example of why this helps. Continuations that never resume or main-actor updates for every row are easy to spot in RocketTrace’s lanes, but hard to find in raw data. If you want to learn more about that topic, I recommend reading Using Xcode Instruments to optimize Swift Concurrency code.

Recording, parsing, and analysis all run locally on your Mac using the Xcode version you select. There’s no cloud account and no automatic uploads. Trace content only leaves your Mac when you explicitly attach it to a feedback report.

#

After down RocketTrace from the Mac App Store and opening the app for the first time, you’ll see an empty screen like this:

In this case, we’re starting fresh, so there aren’t any traces yet. However, you’ll be able to revisit any historical RocketTrace files in this window whenever you do. From this screen, you can import an existing Xcode Instruments file using the “Analyze Instruments Trace…” button, or you can decide to start a new performance trace directly from within RocketTrace. The latter is recommended, as you’ll record with a template that matches our detection system perfectly.

When tapping “New Performance Trace”, you can decide to use an existing build or wait for a new profile build. We warn you whenever we think you need to choose differently:

We always recommend using a fresh profile build using your app’s release configuration as it will likely solve many of your performance issues in the first place. Xcode will build your app with several optimizations enabled, resulting in a better performance representation. You can read more about this in Debug vs. Release Builds in Xcode Instruments.

You might not be ready to run an Xcode Instruments analysis via RocketTrace right now, whether it’s with AI agents or not. Therefore, we also included a sample trace file that you can open via Help → Open Sample Analysis.

The sample analysis demonstrates what RocketTrace could do for your app. On the overview page, you’ll get a glance of all the detected data and top opportunities to fix. The Fix using your agent button in the top right corner is the magic button you want to use, but more on that later.

I’m especially proud of the signposts page, which is a fantastic way to dive deeper into a specific part of your app:

In this case, there have been two issues linked to the Stock Analysis performance. If you’re new to signposts (they’re fantastic), I invite you to read Xcode Instruments Signposts with OSSignposter.

The analysis is super interesting to read through and feels to me like an approachable version of the in-depth Xcode Instruments maze. If you want to stay in control, the Mac UI is there for you. However, all of this Xcode Instruments digested data is also available for AI Agents, in a token efficient way.

#

The whole point of RocketTrace is the step after the analysis. For every finding, you can open an Agent Prompt and copy a focused brief for your coding agent. Using the Fix with your agent prompt, you’ll ask your agent to build an approval-gated handoff, so you review the plan before your agent changes any code.

You can also let your agent drive RocketTrace itself. The app comes with a rockettrace command and an Agent Skill, which you install from Settings → CLI & Agent. Your agent can then start a recording and read the results in layers:

rockettrace status

rockettrace builds
rockettrace record start <build-id> --label "Checkout"
rockettrace record stop --wait

rockettrace results get <result-id> --brief
rockettrace results get <result-id> --findings --compact
rockettrace results get <result-id> --finding <finding-id>

Every command returns a single JSON envelope with an ok field, so your agent can branch on success without parsing prose. The CLI talks to the running RocketTrace app, so keep the app open while your agent works. I’m personally combining this with RocketSim’s CLI to let the agent control the iOS Simulator, resulting in an autonomous, efficient way to improve the performance of my apps.

After you’ve fixed something, you can add another run to the same result and see where each finding still shows up. That’s how you verify a fix with evidence instead of a feeling.

You might wonder why RocketTrace doesn’t ship an MCP server. The biggest reason is context. In most setups, an MCP server sends the names, descriptions, and input schemas of all its tools to your agent at the start of every session, whether you use them or not. Your agent re-reads that context on every turn, so you pay for it even in sessions that have nothing to do with performance.

A CLI and an Agent Skill only cost tokens when you need them. Until the skill becomes relevant, your agent only sees its name and a short description. The full instructions load once you ask about a trace, and the rockettrace command costs nothing until your agent actually runs it.

On top of that, your agent stays in control of the output. An MCP tool result lands in the context as a whole, while a CLI lets your agent pick the level of detail with flags like --brief and --compact, or filter the JSON before reading it. Agents are already great at running terminal commands, so there’s no need to add another server to your setup.

#

I didn’t want to put a nice-looking number on a landing page without being able to defend it, so we built a benchmark. Two AI models got the same frozen Instruments trace and the same prompt, once with raw Apple tooling and once with RocketTrace. Every answer was scored against evidence in the recording.

The trace comes from a small photo library app with neutral names, so the symbols don’t give away the answers. It contains 20 real performance issues across the main thread, file I/O, SwiftUI, Swift Concurrency, and threading, plus 6 decoys that look suspicious but aren’t. You can read the full method, the exact prompts, and every limitation in How We Benchmarked AI Agents on a Performance Trace.

Here are the medians of three runs per model:

Claude Opus 5.5 GPT-5.6 Sol
Issues found without / with (of 20) 12 / 19 6 / 14
False positives without / with 1 / 0 0 / 0
Tokens without RocketTrace 1,765,732 2,071,877
Tokens with RocketTrace 312,424 322,383
Token reduction 5.7x fewer 6.4x fewer
Time without / with RocketTrace 9m 54s / 4m 45s 11m 45s / 5m 07s

Both models found more issues with RocketTrace, used about 6 times fewer tokens, and finished about twice as fast. The elapsed time includes RocketTrace’s own import and analysis, which took a median of 223 seconds. In other words, most of those 5 minutes is RocketTrace doing its work. The agent sessions themselves took only 1.5 minutes. Now, this is just comparing agents vs. agents: what if you would manually dig through an Xcode Instruments file? I’m pretty certain you’ll need even more time.

Finally, RocketTrace found 29 issues, from which 19 were part of the planted issues. Both models without RocketTrace found 12 issues at all. In other words, without RocketTrace you’re spending more tokens to find fewer issues.

Both workflows found the large main-thread problems, like an expensive thumbnail index rebuild, JSON decoding on every scroll tick, and repeated file syncs. The difference is in everything that doesn’t show up as an obvious CPU spike.

Without RocketTrace, the agents missed most of the Swift Concurrency issues. No run found the continuations that never resume, the main-actor task waiting on a task group, the tasks that start on the main actor only to leave it right away, or the main-actor update for every tile. None found the SwiftUI state that was written with the same value over and over either. That evidence lives in the Swift Tasks, Swift Actors, and SwiftUI lanes, which are hard to read from raw exports.

RocketTrace reported 29 findings on this trace, even more than the 20 issues in the answer key. The issues the RocketTrace workflow did miss came down to one thing: the agent decides how much of the analysis to read. GPT-5.6 Sol listed all findings but only read the details of the top 10 to 14. Claude Opus 5.5 read further and only occasionally missed one.

This is a useful lesson if you start using RocketTrace with your own agent. If you want a complete picture, tell your agent to go through every finding instead of stopping at the top ones.

Of course, this is one trace of one app, built by the people who build RocketTrace. It doesn’t tell you anything certain about your app, and the benchmark article lists every limit we know of.

#

The benchmark tells you what happens on one trace. Beta usage tells me what developers actually do with their own apps. More than 100 engineers joined the beta, and since July, 77 testers completed at least one trace analysis. 49 of them copied an agent prompt from their findings, and 21 opened Fix with your agent.

That means almost two out of three testers who got a result took it straight to their coding agent. That matters most to me. RocketTrace isn’t meant to be a prettier list of findings. It’s meant to get you from a recording to a focused question your agent can act on, without reading two million tokens first. Let’s build better apps together!

#

RocketTrace is free to download from the Mac App Store, and your first three analyses are included. After that, you can upgrade to RocketTrace Pro. Until October 13th, Pro costs about 30% less than it will from October 14th, and if you subscribe now, you keep that price for as long as you stay subscribed.

Run cloud agents with Xcode on real Apple SiliconXcloud gives your cloud agents their own macOS environment, complete with your Xcode version, SDKs, and dependencies. They can edit, build, and test iOS or macOS apps while Xcloud handles the infrastructure.

Learn more.

#

RocketTrace analyzes your Xcode Instruments traces locally and hands your AI agent compact, evidence-backed findings. In the benchmark, both models found more issues with RocketTrace, used about 6 times fewer tokens, and finished about twice as fast. Just make sure your agent reads all findings instead of only the top ones.

You can download RocketTrace for free, and your first three analyses with findings are included. Record a trace of your own app and see what it finds. If you want to improve your AI development knowledge even more, check out the AI Development category page. Feel free to contact me or tweet me on Twitter if you have any additional tips or feedback.

Thanks!

── more in #ai-agents 4 stories · sorted by recency
── more on @rockettrace 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/introducing-rockettr…] indexed:0 read:12min 2026-10-05 · —