Repository navigation
Agent Runs
sshdw edited this page Oct 15, 2026
·
1 revision
One agent run per dialog. Every run is started explicitly by the user and runs
a bounded tool-use loop (deterministic ReAct runner) inside budgets and
approvals, with step events streamed to the UI as agent-run-event frames.
- Commands: start, cancel, pause, resume, extend (iteration budget), set-mode, resolve-approval, plus read surfaces (runs, steps, inspect, spend-dashboard, activity-feed, permission rules).
- Run statuses persisted in
agent_runs:running,completed,cancelled,budget_exhausted,spend_limit_exceeded,error. Terminal rows carryfinished_atand either final content or classified error text. - Pause/resume/cancel are user controls; extend raises the iteration budget; nothing runs on a schedule and there are no background daemons.
-
agent_stepsrecords one row per model-turn marker, tool call, and parked approval decision, ordered byseq, immutable after insertion. - Each step carries tool name, raw provider JSON args, observation/decision text, outcome (
succeeded,failed,denied,cancelled), timing, optional rule provenance (rule_id,group_key,decided_by), and optional token counts. - A read-only inspector, activity summaries, and run/step history views expose past runs; deleting a run cascades to its steps, and deleting a conversation cascades to its runs.
-
agent_tasksrows (title, statuspending/running/completed/failed/cancelled, provider/model,max_steps1–25 default 25, progress cursor, report, latest run link) withagent_task_stepschildren (own status, result text, own run link). - Tasks surface kanban-style commands (create/list/update/delete/start/stop/move) with expiring per-task edit locks (
task_locks): at most one lock per task, heartbeat-renewed, stealable after expiry. - Run links from tasks clear to NULL on run deletion so task history survives.
See also: Autonomy-and-Approvals, Database, Architecture.