How Karui’s Private Cloud Sorting asks Apple’s Private Cloud Compute through the user’s shortcut, and the alerting modes built on it.
Overview
Karui is a private iPhone notification filter built on iOS 27’s new notification trigger. Its on-device model is rate limited while Karui runs in the background, as Technical Note KN001 describes. When that happens, Karui can ask Private Cloud Compute instead. The user’s shortcut makes the request with the Use Model action. Karui prepares the prompt and applies the answer.
The round trip
- The Shortcuts automation runs Karui’s triage intent, an App Intent, for each notification.
- The intent classifies the notification and returns an entity with the History item’s ID, a flag asking for a second opinion, and a ready-made prompt.
- If the flag is set, the shortcut runs Use Model with Private Cloud Compute and that prompt.
- The shortcut passes the ID and the model’s answer to a second intent, which updates the classification and alerts the user if the answer is Important.
The entity’s properties are what the shortcut reads:
struct TriageOutcomeEntity: TransientAppEntity {
@Property(title: "Record ID")
var recordID: String?
@Property(title: "Wants Second Opinion")
var wantsSecondOpinion: Bool
@Property(title: "Second Opinion Prompt")
var secondOpinionPrompt: String?
}
Reading the answer
Use Model returns plain text, so the prompt asks for exactly three lines (five when deadline reminders are on, adding the task and its due date):
Category: Important, Neutral, or Spam
Confidence: a number from 0.0 through 1.0
Reason: the reason, in at most 20 words
The parser still forgives extra words, missing lines, and labels written in Japanese. If no line is labeled, the first category word in the answer decides.
When to ask
An answer from Private Cloud Sorting takes 2 to 3 seconds, whether Karui asks Private Cloud Compute itself or through the shortcut, so When to Ask offers two choices:
- Only When Needed: asks only when the on-device model couldn’t sort the notification, as when it was rate limited, and the rules didn’t already find it Important.
- Before Alerting: asks about every notification the on-device model sorted, and holds one it marked Important for up to 20 seconds while the cloud answers.
In either mode, Karui doesn’t ask when its rules have already decided, as for a message from an important contact, a mention of you, or a one-time code. A Wake Me alarm never waits for an answer.
In Before Alerting, the held alert is a local notification scheduled 20 seconds out with a known identifier. When the answer arrives, from Karui’s own call or the shortcut’s second intent, Karui cancels it if it hasn’t fired, then sends the alert only if the cloud agrees. If no answer comes, nothing cancels the held alert, so iOS delivers it anyway. If it already fired and the cloud disagrees, Karui removes it.
Earlier versions also had Always, which alerted right away and corrected afterward. It asked often enough to reach Private Cloud Compute’s own limit, described below, and settings that used it now load as Before Alerting.
Private Cloud Compute has a limit too
Apple documents a daily Private Cloud Compute limit for each user, counted against their iCloud account and higher with iCloud+, but not how large it is. What Karui ran into looks like a separate, shorter-term limit per device. In a two-hour log with the former Always mode on, Private Cloud Compute answered 10 requests between 7:17 and 8:32 AM, then refused the next 6. Shortcuts’ own log shows the reason:
InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDeviceRateLimit
The refused Use Model step stops the shortcut, and Shortcuts posts “Your request can’t be completed right now.” for every notification until the limit lifts. The notification itself is fine: the on-device model or the rules had already decided it.
Karui never sees the step fail, only that no answer comes back. So a request still unanswered after 30 seconds counts as a failure, and Karui stops setting the flag for 30 minutes, twice as long after each failure in a row, up to 4 hours. Any answer ends the pause. A burst of refusals counts once, and in Before Alerting an alert is sent right away while paused instead of waiting for an answer that won’t come.
Karui’s own calls share the on-device budget
With the Private Cloud Compute entitlement, iOS 27 lets an app ask PrivateCloudComputeLanguageModel itself, skipping the shortcut’s round trip. Karui tried it alongside the shortcut for a day in October 2026: 126 requests from its triage intent, almost all in the background.
Whenever Karui’s on-device model had just been rate limited, Private Cloud Compute refused too: all 64 of those requests failed with the same LanguageModelError.rateLimited, in about 13 milliseconds, so the refusal came from the iPhone rather than Apple’s servers. Each time, the model reported itself available and its quota below the limit, so neither predicts the refusal. When the on-device model hadn’t been rate limited, 56 of 62 requests got an answer, in a median of 2.2 seconds.
So an app’s own calls to Private Cloud Compute appear to draw on the same background budget as its on-device model. The shortcut’s Use Model step doesn’t: it runs under Shortcuts’ budget, and over the same period it still answered more than half of the notifications Karui’s own call couldn’t.
Karui now asks Private Cloud Compute itself only when its on-device model wasn’t just rate limited, which saves the shortcut’s 2 to 3 seconds and its error banners in most cases. When the on-device model was rate limited, or Karui’s own call fails, the shortcut asks as before.
Asking from inside the app
Karui can’t run a shortcut in the background, so a rerun goes through the notification trigger. When someone reruns a classification in Karui, the app posts a quiet notification carrying the item’s ID. The notification trigger fires for Karui’s own notifications too, so the user’s automation runs, the triage intent recognizes the marker and returns that item’s prompt, and the shortcut’s usual steps do the rest.
What’s sent
The prompt contains only the notification’s text and app, whether it’s one of the user’s important apps, the user’s name, handles and any nickname, and their sorting terms. Notifications decided by rules, contact details, and calendar events never leave the iPhone.
Revision History
- 2026-11-05 Renamed Second Opinion to Private Cloud Sorting. The shortcut’s property names are unchanged.
- 2026-10-19 Added that Karui’s own calls to Private Cloud Compute share the on-device model’s budget, so the shortcut still asks when that model is rate limited, and updated the modes to Only When Needed and Before Alerting.
- 2026-09-29 Added Private Cloud Compute’s own rate limit and how Karui backs off.
- 2026-09-28 First published.