{"slug": "giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop", "title": "Giving AI Agents a Deterministic Clock (Zero LLM in the Loop)", "summary": "J. Servo LLC has released Sundial, an open-source tool that gives AI agents a deterministic clock for human-in-the-loop workflows, running entirely locally with zero LLM calls. Sundial tracks user absence via system-level sensors, escalates tasks through urgency tiers, and enforces an Autonomy Gate that forces agents to proceed or stand down after a hard ceiling, using empirical execution-time estimation rather than model-based guessing.", "body_md": "When building autonomous AI systems, developers eventually hit a fundamental architectural wall. Your coding agent asks you a question, and you step away from the keyboard. Today, nothing happens. The session hangs, the question rots, and the work stalls.\n\nAt [J. Servo LLC](https://jservo.com), we architect enterprise AI systems to operate predictably. We built [Sundial](https://github.com/bigjoe-oti/sundial) to act as the missing half of the human-in-the-loop framework[cite: 1]. It operates on a single defining principle: Sundial measures absence, not time[cite: 1].\n\nWhen the human becomes the blocker, the agent's clock keeps running[cite: 1]. It nudges you on your desktop, escalates politely through your absence, and greets you with continuity upon your return[cite: 1]. If you never answer, the agent proceeds on its stated judgment or stands down[cite: 1]. It does this deterministically, with zero model calls, and runs 100% locally[cite: 1].\n\nRelying on a Large Language Model to determine if a user has abandoned a session violates lean architecture principles. Time tracking belongs at the system level. The separation of actors is the design[cite: 2].\n\nSundial enforces a strict architectural boundary across three main components:\n\n`HIDIdleTime`\n\n, `lsappinfo`\n\n, and `pmset`\n\non macOS, and `xprintidle`\n\nor `loginctl`\n\non Linux[cite: 1]. Any missing sensor returns `None`\n\nand softens to wall time rather than blocking the system[cite: 1].`launchd`\n\nthat handles presence classification and escalation[cite: 1, 2]. It uses zero LLMs[cite: 2].`data/`\n\ndirectory[cite: 2]. State is written atomically using `NamedTemporaryFile`\n\n, `fsync()`\n\n, and `os.replace()`\n\n, serialized by inter-process locking via `fcntl.flock`\n\n[cite: 1]. Escalation advances only while you genuinely have not seen the chat[cite: 1]. Sundial categorizes your presence into three strict states:\n\nThe system enforces urgency tiers[cite: 1]. A high-urgency task utilizes a retimed ladder of 5, 10, and 20 minutes, backed by a hard 40-minute wall ceiling that forces a final resolution regardless of sensor data[cite: 1].\n\nA ripe nudge never fires mid-keystroke[cite: 1]. Drawing from Interruption Science, the daemon holds ripe notifications for up to three minutes waiting for a natural typing gap or application switch before delivering[cite: 1].\n\nSound courtesy is strictly enforced. Chimes escalate with urgency, but they mute unconditionally if your screen is locked or if you have been away for more than 30 minutes[cite: 1].\n\nAgents must stop guessing execution durations using fabricated calendar weeks[cite: 1]. Sundial tracks the empirical ratio distribution of actual versus estimated time across completed tasks[cite: 1].\n\nThe estimation engine (`lib/estimator.py`\n\n) operates purely mathematically to compute empirical P50 and P90 execution durations[cite: 1]. It applies a small-n honesty floor, utilizing a 2.0x multiplier when sample sizes are below five, ensuring the system never provides confident numbers from thin data[cite: 1, 2].\n\nThe trigger path never thinks[cite: 2]. When an agent blocks on an `awaiting-reply`\n\nquestion, the ladder climbs until expiry, triggering the Autonomy Gate in `lib/policy.py`\n\n[cite: 1].\n\nThe agent is forced into a deterministic verdict:\n\nThe absolute autonomy rule: Silence-while-present is an answer, whereas silence-while-absent is a void[cite: 1]. They receive distinct, deterministic responses[cite: 1].\n\nSundial integrates via a generic hook protocol passing JSON on `stdin`\n\nand outputting text blocks to `stdout`\n\n[cite: 1]. It supports ready-made adapters for `claude-code`\n\n, `hermes`\n\n, and generic environments[cite: 1].\n\n```\nbash\n# Clone the repository\ngit clone [https://github.com/bigjoe-oti/sundial.git](https://github.com/bigjoe-oti/sundial.git) ~/sundial\ncd ~/sundial\n\n# Run the installer for your target platform\n./setup.sh --name \"YourName\" --fresh\n\nBuilt with obsession by Yousef Ali and the engineering team at J. Servo LLC.\n```\n\n", "url": "https://wpnews.pro/news/giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop", "canonical_source": "https://dev.to/jservodotcom/giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop-3fk5", "published_at": "2026-08-29 19:50:18+00:00", "updated_at": "2026-08-29 20:19:10.819109+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-infrastructure"], "entities": ["J. Servo LLC", "Sundial", "Yousef Ali"], "alternates": {"html": "https://wpnews.pro/news/giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop", "markdown": "https://wpnews.pro/news/giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop.md", "text": "https://wpnews.pro/news/giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop.txt", "jsonld": "https://wpnews.pro/news/giving-ai-agents-a-deterministic-clock-zero-llm-in-the-loop.jsonld"}}