Blog

How to stream iOS simulator logs to your AI coding agent

By Daniel Bernal

8 min read

Your AI agent can't see your iOS app's logs, so it guesses. How to give Claude Code, Codex or Cursor a real log stream, and which tool to pick.

The model isn't your bottleneck. The feedback loop is.

Every week someone on X asks which model is best for iOS. Claude Code or Codex. Opus or Gemini. Meanwhile you point the agent at a bug, it writes a fix, launches the app, and has no idea what the app just did. So it guesses. Then it guesses again. That's how a $200/month Max plan disappears in three days on one Xcode project.

Anthropic's own engineers named this in January 2026: ship an agent without a way to verify its work and you're "flying blind," stuck guessing and checking. They weren't talking about iOS. They might as well have been.

TL;DR

An agent can only debug what it can read. Give it logs scoped to your app, filterable by level, and attached to the run it just started. Apple's log stream gets you there if someone writes the right predicate every single time. FlowDeck gets you there with flowdeck run --log in the terminal, or a live Console in FlowDeck Studio.

Why AI agents can't read iOS logs

Xcode spoiled you. Cmd+R, the simulator boots, and the console sits next to your code, already filtered. Breakpoint, hover, po. Every step tells you what happened, so the next step is obvious.

Your agent never sees that console. It lives in a terminal, so it talks to the tools Xcode calls behind the scenes: xcodebuild, simctl, log stream. They're built for Xcode and for CI. Honest, complete, enormous. And an agent pays for every line it reads.

This is what reading your own app's logs looks like from the terminal:




Get the subsystem wrong and the agent reads silence. Drop the predicate and it reads every daemon on the simulator. Start the stream a second late and the crash already happened, because log stream only shows what comes after it attaches.

So the agent writes a predicate, reads the wrong output, writes another. Each retry burns context. When the context runs out, it stops debugging and starts inventing.

Builds have the same problem. Same clean build. xcodebuild: 2.2M tokens. FlowDeck: 121.

What an agent-ready iOS log stream needs

Four properties. Miss one and you're back to watching it guess.

  1. Scoped to your app. Your process, nothing else. No predicate for the agent to invent.

  2. Attached to the run. The stream starts when the app starts, so the first line and the crash are both in it. If the app is already running, it attaches by id.

  3. Filterable by level. Errors first. Debug only when the bug is hiding.

  4. Readable without parsing. Structured lines, not a wall of text the agent re-reads on every call.

Logs are one leg of the loop. Build errors with file and line, results per test, the state of the screen: same rule. Fix one, leave the rest raw, and the agent just guesses somewhere else.

Picking an agentic log stream tool for iOS

Every option below gets logs to your agent somehow. What separates them is who does the translation: you, a pile of scripts, or the tool. Each step down the list takes a chore off your plate. The last one takes all of them.

Approach

What you end up maintaining

Raw log stream plus a 40-rule CLAUDE.md

A predicate per app, rules that drift, and an agent that still misses the first second of output.

Script packs (ios-simulator-skill)

Python over simctl and idb. Another set of scripts to keep alive across Xcode releases.

MCP servers (XcodeBuildMCP)

A Node.js runtime and a long tool list sitting in context every turn. Logs arrive as start, stop, summarize.

Built into one agent (Claude Code desktop's simulator panel)

Works inside that one app. Switch agents and you start over.

FlowDeck CLI

Nothing. A native Swift binary, flowdeck run --log, NDJSON on every command with --json.

On Expo, EAS remote simulators hand the agent screenshots, recordings and logs. That's built around the Expo toolchain, not native Swift.

For native Swift, pick FlowDeck CLI. Eight verbs: build, run, test, clean, logs, stop, context, init. The same commands for you and for the agent, so when it says the bug is fixed, you run the exact thing it ran and see for yourself. It works with Claude Code, Codex, OpenCode, Cursor and Gemini.

How to stream iOS logs with FlowDeck CLI

Flowdeck CLI requires zero setup, and you have a full featured TUI to steam logs directly from the command line.

  1. Install Flowdeck

  1. Navigate to your project and start Flowdeck CLI.




  1. Run your app and start streaming logs




Demo Video

Teaching your agent how to read logs

The Flowdeck skill teaches your agent how to stream, read and parse logs efficiently, with minimum token usage and maximum performance. Once you set it up, your agent will default to Flowdeck for this.

  1. Install the Flowdeck skill from Flowdeck interactive mode (flowdeck -i)

    
    
    
    
    
    


  2. Tell your agent to use logs when needed.

You don't really need to do much more. From this point, your agents will use Flowdeck to stream, read and parse logs without you event telling them

Prefer a Mac app? FlowDeck Studio

Some engineers think in terminals. Some think in windows. Studio is for the second kind, and it doesn't ask you to give anything up.

Hit Cmd+R. The app opens in the simulator panel, in the same window as your agent. The Console streams its OSLog output live. You filter to Errors, spot the line that matters, and point the agent at it. It reads the same stream you're reading, because Studio runs the FlowDeck CLI underneath. One source of truth about what the app said.

A test fails. Hit Fix All. The agent gets the failures, fixes them, and reruns the smallest scope that proves it. You decide whether it ships.

Run four agents on four branches. Each gets its own worktree and its own DerivedData. Their builds never collide.

Your agents, your subscriptions. Studio runs the agent CLIs you already pay for.

Pick the loop, not the model

A smarter model doesn't fix a blind loop. The next GPT won't read a log stream firehose better than Opus. The next Gemini won't guess your subsystem. Better models get more out of clean signals. They don't replace them.

The model swap is one config line. The loop swap is a week. Do the hard one first, and every model that ships after it starts with an advantage.

AI won't make you an engineer. In the hands of one who already is, an agent that can see what the app did stops guessing and starts closing bugs.

A fix you never saw run is a guess.

Q&A

How do I see iOS simulator logs from the terminal?

Can Claude Code read my iOS app's logs?

Why does my agent's log stream come back empty?

Does FlowDeck work with Codex, Cursor or Gemini?

Is FlowDeck an MCP server?

Does Xcode need to be open?

Daniel Bernal

@afterxleep

Daniel is a senior Apple engineer with 15+ years shipping on Apple platforms and the creator of FlowDeck. Previously led 100+ engineer teams at Globant and Endava, and has worked with companies like DuckDuckGo, Automattic, and mymind.

#ai-agents

#claude-code

#codex

#comparison

#ios-development

Try Flowdeck with

your Xcode project

Install FlowDeck, open your project and give your agent a task.

Parallel agent sessions

Isolated Git worktrees

Live simulators

Native diff viewer and PR review

Dedicated Plan mode

FlowDeck CLI

Swift Coding Standards

Github Integration & PR monitoring

Try Flowdeck with

your Xcode project

Install FlowDeck, open your project and give your agent a task.

Parallel agent sessions

Isolated Git worktrees

Live simulators

Native diff viewer and PR review

Dedicated Plan mode

FlowDeck CLI

Swift Coding Standards

Github Integration & PR monitoring

Try Flowdeck with

your Xcode project

Install FlowDeck, open your project and give your agent a task.

Parallel agent sessions

Isolated Git worktrees

Live simulators

Native diff viewer and PR review

Dedicated Plan mode

FlowDeck CLI

Swift Coding Standards

Github Integration & PR monitoring