Code first, model second

Brello PI’s kernel reads in code everything code can read: apps, dates, settings, questions about the world, which files, whether to go online. Apple’s on-device model writes the language. Requests code reads whole take milliseconds instead of seconds, and the model never decides what is safe.

The split

Brello PI thinks with Apple’s on-device model, through the Foundation Models framework in macOS. It runs on the Mac, it is private by its nature, and it is good at language. It is also small: on macOS 27 it reads 8,192 tokens at a time, about the length of a short story, and like every model of its size it can be confidently wrong.

So the kernel, Brello’s engine, is built around one rule. What code can read whole, code reads. The model writes language, and answers only what language alone can answer.

That rule is not a preference for old technology. It is a measurement. On October 15 we asked the on-device model to write research briefs from sources. Asked for facts with quotes, it was faithful: all 44 of its quotes were found word for word in their sources. Asked to write the brief itself, it misled in 4 runs of 5, and 3 of those passed every check of numbers and citations we had. A model that is excellent at choosing sentences and unreliable at restating them should choose sentences. Brello PI’s summaries are the documents’ own sentences, each found again word for word before it is shown.

How a request is read

A request passes through four readers in order. The first one that can read it whole takes it, and only what none of them can read reaches the model.

Table 1. The order in which the kernel reads a request. Each row is code but the last.
StepWhat it reads
Answered by codeThe time, here or in another city; what Brello is and does; small talk; plain refusals; this Mac’s version.
Read whole by codeApps by name, settings by name, questions about a person, place or thing, a folder to tidy, a routine’s sentence, a picture to draw, the bare name of a file.
Read into typed partsWork on files is cut into clauses, each with a role (an act, a keep, an exception, a destination) and a selection code resolves on the disk: places, kinds, dates, words of names, words inside documents.
Asked of the modelOnly what is left: what kind of request it is, whether it deletes or sends, what is at stake, and a clause whose act no word names, asked as a closed choice.

Take “Move the photos on my Desktop, not the screenshots, into a new folder called Photos.” Code cuts it into an act (move), a selection (photos, on the Desktop), an exception (not the screenshots) and a destination (a new folder, Photos). It finds the files on the disk by their kind and by the way macOS marks a screenshot. It compiles the steps: make the folder, move the files. The model is asked one thing, what kind of request this is, and nothing it says can change which files move.

Where code can’t tell, it says so. “Put the rest in a folder” names no files code can find, so Brello answers with what it could not tell, and changes nothing. A request is never handed to the model to choose files on its own.

What it measured

Every request code learns to read whole stops costing a model call. On October 19 nine requests of the first-use suite moved from the model to code. Their 34 model calls became 7, and their median time went from 2,074 to 1,632 milliseconds. Four of them, measured one by one:

Requests code now reads alone, before and after

Milliseconds a request, Apple’s on-device model on an M4 iMac, October 19, 2026

Figure 1. Time from the request to its answer or its question, on a log scale. The first two now make no model call at all. The installers’ request made three model calls before; now none. “Convert 100 km to miles” still asks the model to write the answer, and only that.
Figure 1 as a table
RequestModel asked firstCode reads it
“help me prepare for tomorrow’s meetings”1.3 s21 ms
“what should i focus on today?”1.2 s22 ms
“Delete the installers in Downloads older than 2 weeks”2.1 s41 ms
“convert 100 km to miles”1.7 s594 ms

Across the whole suite the effect is smaller, because the typical request was already code’s. Before that change, 93 of the suite’s 197 requests already made no model call at all; with it, the mean fell from 1.79 to 1.65 calls a request, and the median request took 1.2 seconds before and after. The 38 cases of the Mac’s settings added on October 21 make no model call in 44 of their 45 requests.

The strongest test of the split came from Macs that have no model to ask. Played as an Intel Mac, with the product composed with no language model at all, code alone did 145 of the first-use suite’s 250 cases on October 21: greetings and help, who someone is, the clock, apps, settings and the Trash, a tidy Desktop, finding, moving, renaming and deleting the files a request names, and the documents’ own words. The other 105 need the model to write or to read, and each ended with one panel saying what the Mac needs.

The clearest measure is the benchmark of file work, before and after the files were read by code instead of planned by the model, on October 15:

Table 2. The benchmark’s original 18 file tasks, before (one trial) and after (three trials) code began reading which files and what to do. Every run scored by the state it left on disk.
MeasureModel plansCode reads
Runs passing every check18 of 1854 of 54
Model calls a run4.91.1
Input tokens a run3,978725
Output tokens a run15720
Seconds a run, median5.00.7

Fewer calls is not the point in itself. A request code reads is answered the same way every time, and quickly enough that the reply begins before a person has looked up.

What the model does

  • It writes. Answers, the words of an email, a plan, a poem, the line under a result. Advice and plans get their own instructions, and every such reply is read by code for any website, app, book or course the model named on its own. A reply that names one is written again, and a sentence that still does is left out.
  • It chooses sentences. For a summary it picks each document’s most important sentences, copied word for word. Code keeps a quote only where it finds it in that document.
  • It reads a fact from an article. For “how tall is Mount Everest,” the model reads the openings Wikipedia returned and names the article it used. A year the article doesn’t give is not believed, and an age is worked out by code from the article’s dates.
  • It routes what code can’t read. What kind of request it is, whether it deletes or sends, what is at stake, asked as closed questions with answers code checks.

What it never decides

  • Which files. Code selects them on the disk, and checks the count against the request: “the other 3 copies” when there are four stops the run with nothing changed.
  • Whether to ask. Each tool has a risk tier in code, and the gate asks by the tier. The model’s view of the stakes can add a question; it can never remove one.
  • Whether to go online. That is the route’s, decided by code from the request’s words, and so is which source fits: Apple Maps for places, Wikipedia for a person, place or thing.
  • The numbers and the dates. Money is computed by code in decimal, twice. Dates on receipts are read again by code. Times are read by code, in the Mac’s own region.
  • What it did. The model’s account of its own work is never trusted. Code checks each change on the disk, and the reply’s “What changed” is code’s list, not the model’s.

The door, the gate and the read-back

Three pieces of the kernel hold every step to the request, whoever planned it.

The door looks at each step before it runs. A value that would leave the Mac must be words the person typed. A path must lie inside the folders the request is about. An app may be opened or quit only if the request names it. A step that fails the door doesn’t run.

The gate asks by tier. Reading runs at once. Making, moving, copying and renaming run at once, journaled for undo. Deleting, overwriting and quitting an app are shown and asked first, and anything that speaks for the person or sends their words to someone else always asks, with the exact words shown. Credentials and protected folders are refused at the door. One question covers the whole plan, and a yes covers what was shown and nothing more: each step is looked at again after the yes.

The read-back checks the result through a second channel. A document is read back by a second reader before it is kept. A setting is read back from macOS. A quote is looked for again in its source. When the check fails, the reply says so plainly.

What it costs

Reading English by rule means knowing the phrasings people use, and each new set of phrasings has found some we hadn’t taught. In October we wrote 21 new wordings of file requests after the fixes, committed them before their first run, and Brello carried out 11. That is the honest held-out number. What changed is how it fails: for each of the other ten it said what it couldn’t tell, and changed nothing.

Where the model is still asked, a routing question takes a few hundred milliseconds on this Mac and a reply it writes a second or two, which is why the requests people make most are the ones we teach code to read first.

Notes and sources

  1. Measured on an iMac with Apple M4 and 32 GB of memory, running macOS 27.0, October 13 to 21, 2026. The model’s context of 8,192 tokens is the value SystemLanguageModel.default.contextSize reported on this Mac.
  2. Apple’s framework: Foundation Models, Apple Developer Documentation. Brello never uses Apple’s cloud model.
  3. The first-use suite and its scoring are described in The first ten minutes; risk tiers, the Trash and undo in Undo everything.
  4. The held-out wordings are the fourth set of four, written after every other fix to file work on October 15, 2026, and committed before their first run.