Inspiration

Halfway through this hackathon, my phone buzzed at lunch: "Build 14 is signed and all 205 tests pass. Ship to TestFlight now, or hold for the timeline redesign?" I tapped Ship it on my Lock Screen. Back on my Mac, the manager typed the instruction into the right Codex conversation, checked that it landed, and three agents kept building. I never opened my laptop.

Running Codex tasks in parallel was supposed to make me faster, but I became the bottleneck instead. I kept reopening conversations to check whether anything had finished, and more than once found an agent that had been sitting on a one-line question for forty minutes. More agents meant more output, but also a new full-time job: babysitting them.

A dashboard doesn't really fix this. A red dot still makes you ask "what happened, and what do I need to decide?" What we actually wanted was the thing every engineering team already has: a manager. Someone who watches everything and interrupts you only when your judgment is genuinely needed.

So we gave our Codex agents one.

What it does

Manager Mode sits on top of the Codex desktop app you already have and lets you run it through one conversation, from your Mac's menu bar, your iPhone, your Lock Screen, and the Dynamic Island.

  • It watches your Codex conversations through the public macOS Accessibility API. No plugins, no config files, and it never reads Codex's private storage.
  • The manager itself is GPT-5.6, running through the Codex App Server on your existing ChatGPT plan. It lives in one persistent thread and gets exactly three tools: list_sessions, read_session, send_message. No shell, no browser, no filesystem.
  • Instead of a log, you get a timeline: what started, what finished, what's blocked, what you decided, and whether each action actually landed.
  • When a decision needs you, the manager composes the interface for it: up to three action buttons, status rows, a link to the exact task. All of it is native SwiftUI picked from a fixed, schema-constrained set of components; the model never generates executable UI.
  • At a glance: green means the factory is moving, red means a real decision is waiting. You reply with a button, text, or voice, straight from the Live Activity.

One rule holds everything together: observation is automatic, action requires the human. It's enforced in code, not in a prompt. Every send needs explicit human input, a fresh re-read of the exact target task (same session, same revision, same process), character-by-character typing that aborts if focus changes, and a check that Codex actually accepted the message. If delivery can't be proven, it's reported as unverified rather than retried blindly.

There's also no setup and no servers. Nothing phones home. The Mac and iPhone apps find each other automatically through your own iCloud account: no pairing codes, no QR scans, no accounts to create. Each device keeps a Curve25519 key in its Keychain, and everything crossing your private CloudKit database is end-to-end encrypted, with deterministic acknowledgements so a Lock Screen tap executes exactly once, even across retries and restarts. It runs on the Codex you already pay for, through ChatGPT sign-in, and it refuses API keys so it can't silently burn your credits.

How we built it

Codex shows up three times in this project:

  1. GPT-5.6 through the Codex App Server is the product's brain at runtime. It interprets what changed across the managed sessions and composes the summaries and choices you see.
  2. Codex agents wrote the app itself: about 37,500 lines of Swift 6 across macOS, iOS, and a Live Activity extension, built in a week, with 205 tests and no third-party dependencies. That includes the unglamorous parts: cycle-aware Accessibility traversal of Electron trees, CloudKit encryption, and a JSONL client for the App Server.
  3. Once the loop closed, Manager Mode started managing the very agents that were building it, plus the agents building our other product. We ran both from a phone for the rest of the week.

Challenges we ran into

Why Accessibility, and not just the App Server? We wanted Manager Mode to work with the Codex desktop app people already use and the conversations they already have, not force anyone into a new harness. So we spent real time probing whether the App Server could reach those conversations. Codex Desktop owns them through a private codex app-server child on a stdio pipe that no second client can join. A second App Server can read a desktop task's persisted history through thread/list and thread/read, but live status and streamed events belong only to the process that owns the task: while Accessibility showed a task actively running, our second App Server reported it as notLoaded. We also found there's no single-writer lease: two App Servers can resume and append to the same task, because the rollout file is durable storage, not a synchronization bus. Writing behind a loaded task's back forks reality without its UI ever noticing. So ownership became a first-class concept: conversations the desktop app owns are observed and driven through the interface you can actually see, and the manager's own thread runs through the App Server it exclusively owns.

Codex is an Electron black box, and we didn't want to lie about it. Electron virtualizes lists and renders partial histories. So uncertainty is explicit everywhere: if the accessibility tree is ambiguous, Manager Mode reports observation as unknown instead of inventing a confident status, and when a control genuinely doesn't respond to automation, it's shown as unavailable instead of pretending it worked.

Sending to the wrong agent would be catastrophic. Every action re-resolves the process, window, task, and composer. Identity is re-checked before every character typed, and delivery has four explicit outcomes (verified, queued-unconfirmed, not delivered, identity lost), because "the call returned" is not the same as "the message landed."

Testing without wrecking our real work. The end-to-end harness drives the real production controller against invisible fixture apps rendered 100,000 points off-screen at zero opacity, and aborts instantly if the real Codex process set changes.

Accomplishments that we're proud of

  • The full loop works end to end: a tap on a locked iPhone goes through the encrypted CloudKit mailbox, wakes GPT-5.6 in the App Server, triggers a fresh Accessibility re-read, types a verified instruction into the right Codex conversation, and sends an encrypted acknowledgement back to the Lock Screen. No backend anywhere.
  • It shipped itself. For most of the week, Manager Mode managed the agents that were building Manager Mode, alongside a second product's agents.
  • Decisions resolve from the Live Activity without opening the app, behind local device authentication.
  • Pairing is automatic and private: same iCloud account, end-to-end encryption, no accounts, no servers, no configuration.
  • When it doesn't know something, it says so: fail-closed observation, four explicit delivery outcomes, and proof in the timeline instead of optimistic guesses.

What we learned

The biggest one: AI safety works much better as architecture than as prompting. GPT-5.6 decides how to explain a situation and what choices to offer; deterministic code decides whether it may act and what counts as proof.

We also learned that ambient surfaces and conversations answer different questions. The Lock Screen answers "does anything need me?" The manager conversation answers "what happened, and what was proven?" Neither one is a dashboard.

What's next for Manager Mode

Mostly, we want to improve how much trust fits in a single glance. The manager already reads every session and composes the summaries and choices; we want to spend much more time on its prompting so decisions arrive with better evidence: screenshots, video clips, diffs, test results, rendered as native components. The more proof a decision carries, the easier it is to tap once and move on.

And because the manager is one persistent conversation, it already learns how you decide: say "ship it" enough times, or "always deploy worldwide" once, and its history shapes every future recommendation. Changing its behavior is just telling it so. Beyond that, maybe more agent providers over time. The Codex desktop app stays the heart of the factory; Manager Mode's job is to keep it running longer with less watching.

The goal hasn't changed since that buzz at lunch: a software factory that keeps moving without its owner keeping watch.

Built With

  • activitykit
  • app-intents
  • cloudkit
  • codex
  • codex-app-server
  • gpt-5.6
  • ios
  • live-activities
  • macos
  • macos-accessibility-api
  • swift
  • swiftui
Share this project:

Updates