Post
  1. Portrait of Onur Solmaz

    Deterministic monitors make long-running agents reliable

    @onusoz · /2026/08/10 · View on
    I've felt the lack of a certain feature of codex desktop app since I went back to the CLI: scheduled tasks Codex desktop app can keep track of a task until it is properly finished. It's basically cron. And for some reason, codex CLI still doesn't have it. Codex app acts as a shared runtime, and for some reason, certain features don't work without it, even though they could... there is no reason for openai to not use a background process So I got bored of waiting, and decided to build my own in @pidotdev But I realized, I could do much more than a simple cron job, with my recently upgraded osolmaz/pi-workflows extension A cron job is a loop after all. Being a loop, I can represent it as a workflow graph So I created a built in `monitor` workflow to mimic cron behavior. The agent is forced into a loop where it re-checks a very long-running job every 1 hour, and it is instructed to autonomously correct it and fix any bugs if any are encountered The same functionality can be achieved by iamwrm/pi-unified-exec as well, which implements codex-like auto-forking exec behavior. But there is a chance the model messes up exec, or does not re-arm the next sleep() properly once one of them exits My monitor workflow on the other hand is deterministic. I can make the agent loop infinitely, and there is nothing the agent can do to evade the task. I just ask the agent to monitor something, and it starts it automatically This lets me just fire off week-long jobs, and forget about it! It even survives codex usage depletion, by auto-recovering once my quota resets Oh also, @ratatui_rs is a delight! I created piw, a viewer for my ongoing pi workflows. I just type piw, and can see the current state, or play back the finished ones