Task execution bus
The task execution bus answers what agent work is running in this BMO process right now? It is an in-process registry (internal/taskexec) owned by *app.App. It does not replace durable run history (agent_runs) or the composed task aggregate read model.
Quick inspect
Section titled “Quick inspect”| Surface | Command |
|---|---|
| CLI status | bmo config show-task-execution |
| TUI | /task-bus or sidebar Task bus |
| HTTP status (`bmo service start http | autopilot`) |
| Agent status | get_task_execution_status |
| MCP status | bmo_get_task_execution_status when listed in services.mcp.exposed_tools |
| Raw HTTP | GET /v1/task-execution |
| Raw MCP | bmo_get_task_execution_snapshot |
By default bmo config show-task-execution attempts a loopback-safe live read
from a local HTTP or autopilot service and falls back to a degraded
config-projection when no compatible runtime is attached. Use --source=config
to force the detached shape-only projection.
The status family is distinct from the raw registry snapshot. Status adds
source, freshness, posture, bounded stale-row issues, and
runtime_attached; the raw surfaces keep the original running-task JSON shape
for callers that only need the live registry payload.
What is tracked
Section titled “What is tracked”- Surfaces:
tui,mcp,internal - Kinds:
interactive_agent,noninteractive_agent - Shell background jobs: aggregate count only (not per-job rows in v1)
Entry paths:
- TUI interactive runs via
App.RunAgent - MCP
bmo_run(surface tagmcp) - Internal non-interactive runs (recipes, scheduler, CLI without MCP)
Status posture
Section titled “Status posture”not_attached+shape_only: detached/config-only view; no live runtime was observed.idle+live: attached runtime with no running agent tasks or shell jobs.active+live: attached runtime with running agent tasks and/or shell background jobs.degraded+degraded: attached or attempted-live view where terminal run truth could not safely reconcile one or more running rows. Theissues[]payload explains the bounded stale-row condition instead of silently claiming idle truth.
Cancel
Section titled “Cancel”App.CancelTaskExecutionBySession(sessionID) marks matching registry rows canceled and calls Coordinator.Cancel(sessionID) when a coordinator is present.
Observability
Section titled “Observability”Structured logs use bounded task_exec.fired and task_exec.action events at the registry choke point. Filter examples:
bmo logs --tail 1000 | jq -c 'select(.msg|startswith("task_exec."))'bmo logs --tail 1000 | jq -c 'select(.msg=="task_exec.action" and (.outcome=="canceled" or .outcome=="failed" or .outcome=="cancel_by_session"))'Maintainer detail: task-bus topic and Agent tracing recipes.