← All essays

NO. 04 Builder Notes

Building Gestu from Sault Ste. Marie—and the week everything broke at once

What happens when you stop relying on willpower to hold an AI assistant together and start building real guardrails into the code.

A real Linux terminal session running inside Gestu—born out of wanting an assistant that could run real checks, not just talk about them.
Real capture · Gestu on Android

A real Linux terminal session running inside Gestu—born out of wanting an assistant that could run real checks, not just talk about them.

Gestu isn't built out of a glass tower in San Francisco with a growth team and a Ping-Pong table. It is built by an independent company—Gestu Software Inc.—out of Sault Ste. Marie, Ontario.

We're transparent about where it started, too: Gestu began as an Apache-2.0 fork of Kai 9000, credited in our NOTICE file and right in the footer of this site. What began as a simple itch—why can't the AI on my phone remember my week and actually open a shell to check a file?—grew into a full rebuild across Kotlin Multiplatform, rootless Linux sandboxes, on-device LiteRT and Windows CUDA llama.cpp, 53 Android tools, and an encrypted local database.

Building an assistant that touches real files, calendars, and terminals teaches humility fast. Usually in one miserable week.

Three bugs that forced real guardrails

Early on, whenever something fragile went sideways during dogfooding, my instinct was I'll just be careful next time. Then three subtle failures landed in the same stretch and ended that habit for good.

1. The silent Heartbeat retry storm

Originally, our background Heartbeat only updated its last-run timestamp when a check succeeded. When an upstream endpoint went down, the scheduler woke up sixty seconds later, saw a stale timestamp, and retried—minute after minute for hours, burning API calls and writing encrypted failure rows silently in the background.

Now the Heartbeat schedules attempts, backs off exponentially (one minute, two, four, capped at your interval), and after five consecutive failures halts completely and sends one plain notification naming the error until you tap retry.

2. The Windows GPU reset during long local runs

When we brought bundled CUDA llama.cpp to Windows Desktop, long tool-result turns on local GGUF models started dying abruptly with Connection refused. Event Viewer showed nvlddmkm event 153 two seconds earlier: a heavy prefill burst was tripping Windows' ~2-second GPU driver watchdog (TDR) and resetting the driver mid-turn.

So in v2.5.11 we split prefill into smaller physical submissions (-ub 256) that stay comfortably inside the watchdog—and added automatic sidecar crash recovery that captures stderr to llama-crash-logs/, restarts the local server with the same model and context, and retries the round cleanly once.

3. The tired-thumb realization

When a phone assistant can delete emails, send texts, or invoke host-root commands on a rooted Android device, a single casual popup isn't enough—we have all reflexively tapped "OK" half-asleep.

So Gestu's safety boundaries are deliberately asymmetric: granting power demands deliberate attention; revoking it takes one tap.

  • Irreversible actions (sending email or SMS, deleting items, promoting a memory into your Soul) pause on an explicit card naming the target and fail closed if unanswered.
  • Host Root access (Gestu Pro) requires literally typing ALLOW to enable its optional timed window, expires automatically after one hour with no early extend button, shows a live red-bordered countdown, and puts a one-tap Stop allowing now button right beside it.
  • Mission Control logs tracked actions in Activity with undo for supported changes, while Full-Access ("Turbo") mode stays behind an explicit Pro-only warning dialog.

Why unglamorous plumbing matters

SQLCipher key sealing, live-tokenizer compaction, PTY TIOCSWINSZ resize signals, keeping Windows data in %LOCALAPPDATA%\Gestu Data so installer upgrades never wipe your models—none of that makes a flashy teaser trailer.

It just makes an assistant you trust on bad days, not only sunny ones. Out here in northern Ontario, nobody is impressed by shiny demos that freeze in January. Software either starts on the first turn of the key, or it gets left in the driveway.

Built in the open

See what actually shipped in v2.6.6.

Gestu is built by an independent shop in Ontario—open-source Apache-2.0 app shell, signed FOSS APK with published SHA-256, and a real changelog you can inspect.