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. 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 https://www.avanderlee.com/ai-development/reduce-token-usage-claude-code-codex-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 https://rockettrace.app/detections/ 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 https://www.avanderlee.com/concurrency/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 downloading RocketTrace from the Mac App Store https://apps.apple.com/app/apple-store/id6798298905?pt=117264678&ct=launch-swiftlee-article&mt=8 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 https://rockettrace.app/blog/xcode-instruments-debug-vs-release-builds/ . 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 https://rockettrace.app/blog/xcode-instruments-signposts/ . 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: Check that the app, CLI, and symbols are ready rockettrace status Record a build and wait for the analysis to finish rockettrace builds rockettrace record start