Put state.mode on screen. Support should see Gather, Decide, Act, Review without opening Xcode. Log each step: mode, route key, tool names, blocked transitions, leftover tokens.
UICurrent state
LogReplayable steps
CapHard stop
PrivacyNo silent PCC hop
struct StepRecord: Sendable {
let step: Int
let mode: Mode
let route: String
let tools: [String]
let blocked: String?
let leftoverTokens: Int?
}
Keep records on the device. Redact note text in any log you share. If you route with the Apple model router, store the route key on the same record.
Ship gates:
- A blocked illegal transition appears in the log when you force one in a test.
- The loop stops at
maxStepsif the model never reaches done. - Review is visible to the user before a write that leaves the app (calendar, mail, reminder).
- One Profile is active. There is no LangChain runtime in the project.
Sources: WWDC26 241, WWDC26 242, Foundation Models.
Done. Product can name the next step. Support can read the log. That is an EDGE FDE agent, not a demo loop.
Key concepts
- Show current mode in the UI. Log each step.
- Record mode, route key, tool names, blocked transitions, and leftover tokens.
- Ship gates: blocked transitions logged, cap stops runaway loops, review before external writes.
- Keep records on device. Redact note text in shared logs.
Takeaways
- Refuse to ship a loop you cannot replay from the log.
- Store the route key from the model router on the same step record.
- One Profile active. No LangChain runtime in the project.