Troubleshooting
Use this page to diagnose the most common startup, runtime, and UI interpretation issues with the OpenBox Mastra SDK.
Startup Validation Fails
Typical causes:
OPENBOX_URLis missingOPENBOX_API_KEYis missing or malformed- the URL is not HTTPS outside localhost development
- the API key validation call fails
What to do:
- Verify
OPENBOX_URLandOPENBOX_API_KEY. - Confirm the service can reach OpenBox Core.
- Use
validate: falseonly for local mocks or tests.
No Runs Appear In OpenBox
Check these first:
- The service can reach
OPENBOX_URLfrom its runtime environment. - The agent API key is valid for the intended OpenBox agent.
- The service is using the governed Mastra instance returned by
withOpenBox(). - The process was restarted after configuration changes.
A Guardrail UI Test Passes But The Live Run Does Not Fire
This usually means policy returned a non-allow verdict first. In a standard deployment, policy evaluates before guardrails on the same event.
What to verify:
- the live event returns
allowfrom policy - the guardrail targets
ActivityStartedwhen matching tool input - the field selector matches the emitted payload shape, such as
input.command
I Do Not See Spans On ActivityStarted For Agent Runs
This can be expected. Agent-only model work is surfaced through:
SignalReceived(agent_output)WorkflowCompleted
It is not always attached directly to ActivityStarted, especially when no tool executed.
I See Runs But No Tool Health
Tool health only appears for agents that actually execute tools. An orchestrator, gateway, or agent that only performs model generation will not populate tool health metrics for that run.
I See Runs But No Model Usage On The Parent Orchestrator
That can also be expected. If the parent runtime only routes work to child agents, the model usage belongs to the child agent runs, not the orchestrator.
The Dashboard Shows ActivityCompleted But I Expected A Matching ActivityStarted
Check whether you are looking at a real business activity or at hook-triggered telemetry. OpenBox can attach internal span-derived telemetry around the same runtime path.
Recommended interpretation:
- tools and governed non-tool workflow steps are the business activities
- internal hook telemetry is operational evidence, not a second business step
- use
activity_idto correlate started and completed boundaries
Approvals Never Resolve
Check:
OPENBOX_HITL_ENABLEDis still enabled.- The approval exists and is being acted on in OpenBox.
- The service can still reach OpenBox during approval polling or resume.
Configuration Changes Do Not Take Effect
After changing environment variables:
- restart the process
- confirm the service is not reusing an old environment file
- verify the startup path is still calling
withOpenBox()or the intended manual bootstrap
Useful Debug Setting
Enable summarized SDK debug logs with:
OPENBOX_DEBUG=true
This helps confirm evaluate requests, approval polling, and startup behavior without changing application code.