Ops Dashboard errors
Common error signatures
Most failures in the ops dashboard fall into one of two categories: cost-report fetch failures and configuration or startup failures.
Cost-report fetch failures are represented by CostFetchError, a categorized error dataclass returned (never raised) by fetch_summary(). Its kind field contains a CostFetchErrorKind value and its message field contains a human-readable description. Common causes include:
- No admin API key available —
load_admin_key()returnsNone, sofetch_summary()cannot authenticate againsthttps://api.anthropic.com/v1/organizations/cost_report. - A non-success HTTP response or network-level failure reaching the cost-report endpoint.
- A stale or unparseable cached response when
refresh=False.
Configuration and startup failures occur before the dashboard server is running:
build_config()fails when required paths (project_root,attune_home) cannot be resolved.create_app()raises anImportError-family exception if FastAPI is not installed; the lazy-import design means this only surfaces at call time, not atimport attune.cmd_ops()exits non-zero (returns a value other than0) when the server cannot bind toConfig.host/Config.port(default127.0.0.1:8765).
How to diagnose
-
Check whether
fetch_summary()returned an error. The function signature isfetch_summary(*, refresh: bool = False) -> tuple[CostSummary | None, CostFetchError | None]. If the second element of the tuple is notNone, inspectCostFetchError.kindfor the error category andCostFetchError.messagefor the detail. A non-Noneerror with aNonesummary means no cost data is available. -
Verify the admin API key is present. Call
load_admin_key()directly. If it returnsNone, the dashboard cannot reach the Anthropic cost-report API and everyfetch_summary()call will produce aCostFetchError. -
Confirm FastAPI is installed before calling
create_app(). Because the import is deferred, anImportErrorwill not appear untilcreate_app()is called. If you see anImportErrororModuleNotFoundErrormentioning FastAPI at that point, install the ops extras. -
Check the configured host and port. If
cmd_ops()returns a non-zero exit code immediately, the server likely failed to bind. Inspect theConfigvalues forhost(default127.0.0.1) andport(default8765) and confirm nothing else is listening on that address. -
Review
Config.specs_rootswhendetect_candidates()returns nothing. Thespecs_candidates_enabledfield must beTrueandspecs_rootsmust contain at least one validPathfor candidate detection to run. An empty tuple forspecs_rootsis a silent no-op, not an exception.
Source files
src/attune/ops/**
Tags: ops, dashboard, runner, workflows, scope-picker, persistence, sse