Lab / Concept
Developer tooling
Bael: a thermal guardian for unattended builds
When nobody is watching, coding agents can run compilers and headless browsers for hours. Bael watches the temperature and pauses the heavy work when the machine runs hot, then lets it go again. It never kills anything.
The problem
Coding agents do not get tired, and they do not notice when the laptop under them is cooking. Leave a few of them compiling Rust, building C++ and driving headless browsers overnight and the processor sits at its thermal limit for hours. The firmware protects the hardware by throttling hard, the fans scream, and the builds crawl anyway.
We met this on our own machines. The first fix was a 26-line shell script that read the temperature every five seconds, froze the heavy build processes at 88 °C and let them go again at 80 °C. It helped, and its own log showed exactly where it fell short:
- It flapped. The sensor swung thirty degrees in seconds, so simple on/off control turned into a duty cycle: about five seconds of work for every twenty-seven, and the processor still spiked each cycle.
- It was careless about whose processes it touched. It matched by name across the whole system, and resumed every process with a matching name, including ones it never paused.
- It could leave builds frozen. If the script itself was killed, anything it had paused stayed paused.
- Nobody noticed when it stopped. One day it simply was not running while the machine sat in the nineties.
The idea
Bael is that script grown up: a small background guardian that keeps temperatures in check while agents and developers run heavy work unattended. The rules it is built on:
- Never kill. No action in any release sends a terminating signal. Heavy work is paused, slowed or given lower priority, and always resumed. That is enforced by a test, not by a promise.
- Only what you name. Targets are opt-in. The best target is a command started through Bael, because its whole process tree is known. Matching by name is the fallback, and only for your own processes, with a built-in list of things it will never touch: shells, editors, terminals, browsers you are using, SSH and the agents themselves.
- A journal before every pause. Bael writes down what it is about to stop before it stops it, so a crash or a restart can always thaw exactly what was frozen, checked by process id and start time.
- A ladder, not a switch. Instead of on/off it steps down gradually: lower priority, fewer parallel jobs, a duty cycle, and only then a full pause. That is what stops the flapping.
- Dry run by default. A fresh install only logs what it would have done. You read the log against a real build, adjust the targets and thresholds, and then switch it on.
Made for agents as much as people
Bael has a command line, a token-protected local JSON API on a random high port, and a small web view. The command line and the API are designed so a coding agent can install and configure it without a GUI. There is also a paste-in kit: one Markdown file you drop into a project, and the agent you already use walks you through installing a lightweight guardian step by step, stopping after each step so you can look. Our JIVA crews can check that it is running.
What it is not
Bael is not a safety device. It lowers heat and noise and stops throttling storms. Firmware and operating-system thermal protection remain the last line of defence, and the documentation says so on the first page.
Status
Bael is in development and will be released as open source under the MIT licence once it passes our publishing checklist: secret scans, clean history and real releases. The daemon, the command line, the local API and several sensor backends already build and are tested on Linux, working in dry-run; Windows and macOS sensors and the real process actions come next.
More from the lab