Skip to content

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.

SurfaceCommand
CLI (shape only)bmo config show-task-execution
TUI/task-bus or sidebar Task bus
HTTP (bmo serve)GET /v1/task-execution (Bearer auth)
MCPbmo_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.

  • 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 tag mcp)
  • Internal non-interactive runs (recipes, scheduler, CLI without MCP)

App.CancelTaskExecutionBySession(sessionID) marks matching registry rows canceled and calls Coordinator.Cancel(sessionID) when a coordinator is present.

Structured logs use bounded task_exec.fired and task_exec.action events at the registry choke point. Filter examples:

Terminal window
bmo logs --tail 1000 | jq -c 'select(.msg|startswith("task_exec."))'
Terminal window
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.