debug
Systematically debug and analyze root causes of complex issues through structured investigation and hypothesis testing.
Instructions
Performs systematic debugging and root cause analysis for any type of issue. Use for complex bugs, mysterious errors, performance issues, race conditions, memory leaks, and integration problems. Guides through structured investigation with hypothesis testing and expert analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | Investigation step. Step 1: State issue+direction. Symptoms misleading; 'no bug' valid. Trace dependencies, verify hypotheses. Use relevant_files for code; this for text only. | |
| model | Yes | Currently in auto model selection mode. CRITICAL: When the user names a model, you MUST use that exact name unless the server rejects it. If no model is provided, you may use the `listmodels` tool to review options and select an appropriate match. Top models: gemini-2.5-pro (score 100, 1.0M ctx, thinking, code-gen); gemini-3-pro-preview (score 100, 1.0M ctx, thinking, code-gen); gemini-2.5-flash (score 61, 1.0M ctx, thinking); gemini-2.0-flash (score 56, 1.0M ctx, thinking); gemini-2.0-flash-lite (score 42, 1.0M ctx). | |
| images | No | Optional screenshots/visuals clarifying issue (absolute paths). | |
| findings | Yes | Discoveries: clues, code/log evidence, disproven theories. Be specific. If no bug found, document clearly as valid. | |
| confidence | No | Your confidence in the hypothesis: exploring (starting out), low (early idea), medium (some evidence), high (strong evidence), very_high (very strong evidence), almost_certain (nearly confirmed), certain (100% confidence - root cause and fix are both confirmed locally with no need for external validation). WARNING: Do NOT use 'certain' unless the issue can be fully resolved with a fix, use 'very_high' or 'almost_certain' instead when not 100% sure. Using 'certain' means you have ABSOLUTE confidence locally and PREVENTS external model validation. | |
| hypothesis | No | Concrete root cause theory from evidence. Can revise. Valid: 'No bug found - user misunderstanding' or 'Symptoms unrelated to code' if supported. | |
| step_number | Yes | Current step index (starts at 1). Build upon previous steps. | |
| temperature | No | 0 = deterministic · 1 = creative. | |
| total_steps | Yes | Estimated total steps needed to complete the investigation. Adjust as new findings emerge. IMPORTANT: When continuation_id is provided (continuing a previous conversation), set this to 1 as we're not starting a new multi-step investigation. | |
| issues_found | No | Issues identified with severity levels during work | |
| files_checked | No | All examined files (absolute paths), including ruled-out ones. | |
| thinking_mode | No | Reasoning depth: minimal, low, medium, high, or max. | |
| relevant_files | No | Files directly relevant to issue (absolute paths). Cause, trigger, or manifestation locations. | |
| continuation_id | No | Unique thread continuation ID for multi-turn conversations. Works across different tools. ALWAYS reuse the last continuation_id you were given—this preserves full conversation context, files, and findings so the agent can resume seamlessly. | |
| relevant_context | No | Methods/functions identified as involved in the issue | |
| next_step_required | Yes | True if you plan to continue the investigation with another step. False means root cause is known or investigation is complete. IMPORTANT: When continuation_id is provided (continuing a previous conversation), set this to False to immediately proceed with expert analysis. | |
| use_assistant_model | No | Use assistant model for expert analysis after workflow steps. False skips expert analysis, relies solely on your personal investigation. Defaults to True for comprehensive validation. |