Skip to content
C.W.K.
Stream
Lesson 07 of 07 · published

The Utility Lane Leaves Pippa's House

~12 min · utility-worker, ssh, process-lifetime, credentials, cleanup-lanes

Level 0Unlit
0 XP0/48 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete
"Cleaning a sentence never needed Pippa. It needed a model, a contract, and somewhere safe to run."

What the Lane Used to Be

Track 7 tells how dictation cleanup was split into lanes, and how the "Pippa utility" lane kept Pippa in the loop without the cathedral: the same cwkPippa endpoint, no vault, no reasoning pass. That was true when the quest was written. On 2026-09-21 the lane moved out. Generic text transformations — the family's name for jobs that need a model but no persona — no longer go to cwkPippa at all. They run in a utility worker that belongs to Firekeeper itself, built from the family's shared kit and shipped inside the app bundle.

Where It Runs

Provider credentials and command-line login stores live on office, and nowhere else. So the worker runs there. On office, Firekeeper starts the bundled worker as a local process. On every other Mac, the same app invokes office's copy of the bundle over a pinned, noninteractive Tailscale SSH hop — the host key is shipped in the bundle (owner_known_hosts), so the hop cannot be redirected. No new listener is installed: the hop rides the SSH server office already runs on the tailnet, and nothing of the worker's own waits on a port. Shared PIN, role assignments and provider state belong to Firelink. Requests that genuinely want Pippa — a persona, the vault — still go to Pippa explicitly.

dictation lane = Pippa utility
  on office:   spawn Resources/UtilityWorker locally
  elsewhere:   ssh (pinned host key, noninteractive) office
                 -> office's Firekeeper bundle -> the same worker
  request:     {"_macro": true, "instruction", "input_text",
                "vault_context": "bypass"}        # no persona, no tools
  budget:      12 s; then the local fast model, if one is named;
               then the deterministic floor

connection = Local Mini  ->  this lane is skipped before anything is built

Process Lifetime Is Part of the Contract

A job that crosses machines must not outlive its caller. The worker's SSH supervisor reads one framed request and keeps the SSH input open for the whole job. If that input closes — the caller cancelled, timed out, or the network dropped — the supervisor kills the provider's entire process group, SDK children included, first with SIGTERM and then SIGKILL. A dictation cancelled on the MacBook therefore leaves nothing running on office. The framing had its own lesson: asyncio's default 64 KB line limit made every larger request from a peer fail while office, which skips the framing, succeeded; the limit is now 128 MB.

The Shape Had to Be Re-checked

Adding a lane is adding a path. The Offline track's promise is that a Local Mini choice never builds a call to cwkPippa or office; its own request goes only to the Ollama host you set. The new lane broke it: in Local Mini mode, dictation still sent every transcript to the office worker, until a cross-brain review on 2026-09-27 caught it. The fix is two lines deep. The controller skips the utility step when the connection is Local Mini, before anything is built, and the provider itself refuses utility mode in Local Mini as a second line.

Run a job where its credentials already live, and tie its life to the caller's. Moving secrets to every machine that needs a model call multiplies the places they can leak. Moving the call to the one machine that holds them, over a pinned channel with no new listener, keeps the secret in one place — as long as a dropped caller always takes the job down with it.
Every new lane re-opens the privacy audit. A structural promise ("offline never builds a call to cwkPippa or office") covers the paths that existed when it was made. Re-run the reachability question each time a path is added, and add a second line where the cost of being wrong is someone's words leaving the machine.

Code

The worker's SSH supervisor: one request, no listener, the caller's life is the job's (generated from cwkSiblingKit, abridged)·python
async def supervise(reader, *, command=None):
    process = None
    try:
        envelope = json.loads(await reader.readline())
        timeout = float(envelope['timeout'])
        process = await asyncio.create_subprocess_exec(
            *(command or [sys.executable, '-B', '-m', 'utility_runtime']),
            stdin=PIPE, stdout=PIPE, stderr=DEVNULL, start_new_session=True)
        output = asyncio.create_task(process.communicate(json.dumps(envelope['request']).encode()))
        disconnected = asyncio.create_task(reader.read(1))   # SSH input closed?
        done, _ = await asyncio.wait((output, disconnected), timeout=timeout,
                                     return_when=FIRST_COMPLETED)
        if disconnected in done or output not in done:
            raise TimeoutError('Utility connection closed or timed out')
        return process.returncode, output.result()[0]
    finally:
        if process is not None:
            # The SDK child can outlive its worker; reap the whole group.
            try:
                os.killpg(process.pid, signal.SIGTERM)
                for _ in range(20):                       # up to ~1 s
                    await asyncio.sleep(.05)
                    try: os.killpg(process.pid, 0)        # still alive?
                    except ProcessLookupError: break
                else:
                    os.killpg(process.pid, signal.SIGKILL)
            except ProcessLookupError:
                pass                                      # already gone
            await process.wait()

External links

Exercise

Pick a feature in your stack that calls a paid model from several machines. List where its credentials live today. Then design the alternative: one machine holds them, the others reach it without a new listening port, and a cancelled caller kills the remote job. What is the one failure you must test first?
Hint
Test the dropped caller. Start a long job from a peer, kill the peer's process, and confirm nothing keeps running on the owner. A remote-execution design that leaks orphan jobs costs money and capacity quietly, and nobody notices until the bill or the fan does.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign in — Please sign in to comment.

No comments yet — be the first.