What problem does it solve?
Provides in-turn self-diagnosis for Opal agents so you can discover why a tool failed, an agent is looping, context is being lost, or features are not available. It surfaces session metadata, token usage, recent events, queued tasks, and tool availability to pinpoint root causes during a live session.
Core Features & Use Cases
- Structured snapshots: Use the debug_state tool to produce basic snapshots, event-limited views, message-inclusive views, or full diagnostics combining events and messages.
- Token pressure and context checks: Inspect token_usage.current_context_tokens versus context_window to detect compaction risk and lost context.
- Tool and queue diagnostics: Verify tools.enabled vs tools.all, inspect pending_steers, remaining_tool_calls, and has_pending_tool_task to find stuck executions or missing tools.
- Event timeline analysis: Read newest-first events for request_start/request_end, tool_execution_start/tool_execution_end, error, and agent_abort patterns to trace failures and retries.
- Integration testing guidance: Reproduce and test session lifecycles using repository scripts for one-off RPC calls and full session runs when validating fixes.
Quick Start
Enable Opal's debug feature and request a debug_state snapshot including recent events and messages to inspect token usage, tool lists, and the event timeline.