fix(daemon): register autospawned agent in store for task routing #253

Merged
clawdie merged 1 commit from fix/autospawn-agent-registration into main 2026-06-28 01:07:09 +02:00

1 commit

Author SHA1 Message Date
4f3f9f1a4a fix(daemon): register autospawned agent in store for task routing
Some checks are pending
CI / rust (pull_request) Waiting to run
CI / markdown (pull_request) Waiting to run
CI / port (pull_request) Waiting to run
CI / agent-jail-pkgs (pull_request) Waiting to run
After autospawn spawns zot, the agent was never registered in the
local SQLite store. The scheduler only routes tasks to registered
agents — so every task stayed stuck in 'queued' forever.

This commit adds a store.register_agent() call right after the spawn
succeeds, before the bootstrap RPC prompt. The agent is registered
with [shell, freebsd, code] capabilities and the current hostname.

Uses try_lock() to avoid blocking the daemon on store contention.
2026-06-28 00:58:31 +02:00