continue icon indicating copy to clipboard operation
continue copied to clipboard

Documentation: Add Report Failure Tool to CLI Built-in Tools Documentation

Open continue opened this issue 1 year ago • 1 comments

Summary

The Report Failure tool was recently added in PR #8694 as a new built-in tool for Continue CLI agents, but there is currently no documentation for this feature. This tool allows agents to explicitly report task failures with error messages to Mission Control.

Background

What Changed

  • PR #8694 introduced the reportFailure tool as a built-in CLI tool
  • The tool posts FAILED status with a required errorMessage to the agents/{id}/status endpoint
  • It also automatically reports on non-retryable errors or exhausted retries
  • The old status tool was removed in favor of this more specific failure reporting mechanism

Current Documentation Gap

The Continue documentation includes:

  • Built-in tools for IDE extensions (Agent/Plan mode) in docs/ide-extensions/agent/how-it-works.mdx
  • General CLI tool information in docs/cli/overview.mdx and docs/cli/quick-start.mdx
  • Agent documentation in docs/agents/overview.mdx

However, there is no specific documentation for CLI-specific built-in tools like:

  • reportFailure (new)
  • readFile
  • writeFile
  • editFile
  • multiEdit
  • searchCode
  • runTerminalCommand
  • listFiles
  • fetch
  • writeChecklist
  • exit

Proposed Solution

1. Create New Documentation Page

Create a new documentation page at docs/cli/built-in-tools.mdx or docs/reference/cli-tools.mdx that documents all CLI-specific built-in tools.

2. Document the Report Failure Tool

At minimum, document the new reportFailure tool with:

Tool Name: Report Failure (reportFailure)

Purpose: Allows agents to explicitly report task failures with descriptive error messages to Mission Control

When to Use:

  • The task has failed due to an unrecoverable error
  • The agent cannot proceed without additional user intervention
  • An error condition requires user notification

Parameters:

  • errorMessage (required, string): A succinct explanation of what went wrong and why the agent cannot continue

Behavior:

  • Posts FAILED status to agents/{id}/status endpoint
  • Captures failure in Sentry with context
  • Requires --id flag to be set with cn serve
  • Automatically reports on non-retryable errors or exhausted retries

Example Usage:

The agent detects it cannot complete a task due to missing API credentials and calls:
reportFailure({ errorMessage: "Cannot access GitHub API: Missing or invalid authentication token" })

Read-only: Yes - This tool only reports status and doesn't modify the codebase

3. Add Cross-references

  • Link from docs/cli/overview.mdx Tool Integration section
  • Link from docs/agents/overview.mdx when discussing agent error handling
  • Add to the CLI quick start guide for error handling workflows

4. Consider Comprehensive CLI Tools Documentation

Since multiple CLI-specific tools exist, consider creating comprehensive documentation that covers:

  • Tool permission levels (allow, ask, exclude)
  • Differences between TUI and Headless mode tool availability
  • Complete list of CLI built-in tools with descriptions and use cases
  • How CLI tools differ from IDE extension tools

Acceptance Criteria

  • [ ] Documentation exists for the Report Failure tool
  • [ ] Documentation includes purpose, parameters, behavior, and examples
  • [ ] Cross-references added to relevant CLI and agent documentation
  • [ ] Documentation follows existing Continue docs structure and style
  • [ ] Consider whether to document all CLI tools or just the new one

Related Files

Implementation:

  • extensions/cli/src/tools/reportFailure.ts
  • extensions/cli/src/tools/allBuiltIns.ts

Existing Documentation:

  • docs/cli/overview.mdx
  • docs/cli/quick-start.mdx
  • docs/agents/overview.mdx
  • docs/ide-extensions/agent/how-it-works.mdx

Additional Context

  • PR #8694: feat: report failure tool (merged Nov 14, 2025)
  • This is a tier 2 feature (important capability that improves critical user journeys)
  • The tool integrates with Mission Control's agent status tracking
  • Replaces previous status tool for failure reporting

continue avatar Nov 17 '25 09:11 continue

This tool will not be documented for now as it is only injected for some cloud agents for mission control functionality

RomneyDa avatar Nov 18 '25 23:11 RomneyDa