Task execution bus
Task execution bus
Section titled “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 (shape only) | bmo config show-task-execution |
| TUI | /task-bus or sidebar Task bus |
HTTP (bmo serve) | GET /v1/task-execution (Bearer auth) |
| MCP | bmo_get_task_execution_snapshot when listed in options.mcp_server.exposed_tools |
Standalone CLI prints an empty snapshot with runtime_attached: false. For a live readout from another process, query GET /v1/task-execution against a running bmo serve instance.
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)
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.