Supported Agent Integrations in no-mistakes: Claude, Codex, Copilot, Rovodev, and Opencode

The no-mistakes CLI supports five agent integrations—Claude, Codex, Copilot, Rovodev, and Opencode—each implemented as a concrete type under internal/agent/ and selectable via the agent field in your repository configuration.

The kunchenguid/no-mistakes repository provides a pluggable architecture for LLM agents through a unified Go interface. These no-mistakes agent integrations handle external process execution, output streaming, and token usage metrics for various AI coding assistants. Each implementation resides in its own source file within the internal/agent package, allowing the pipeline to swap between Claude, OpenAI Codex, GitHub Copilot, Rovodev, and Opencode without changing core logic.

The Agent Interface

All integrations conform to the Agent interface defined in internal/agent/agent.go. This contract standardizes how the pipeline launches external binaries, streams output, and collects structured results.

The interface abstracts away process management, allowing the executor to treat Claude’s native JSON-L events and Opencode’s HTTP streaming identically. When the pipeline initializes, it uses the factory function in internal/agent/agent.go to resolve the concrete implementation based on the configuration value.

Supported Agents

The repository ships with five first-party agent implementations. Each provides specialized handling for its respective binary protocol and output format.

Claude

The Claude agent in internal/agent/claude.go launches the claude binary and parses its JSON-L event stream. It supports native --resume functionality and optional JSON-schema validation for structured outputs.

This implementation tracks token usage through the shared metrics collector and handles graceful shutdown via the lifecycle manager.

Codex

The Codex agent in internal/agent/codex.go wraps the codex binary. It extracts per-round token usage statistics via codex_metrics.go and constructs a streaming result object that includes prompt and completion counts.

Codex integration benefits from the automatic retry logic defined in internal/agent/retry.go when transient failures occur during stream processing.

Copilot

The Copilot agent in internal/agent/copilot.go provides a thin wrapper around the GitHub Copilot CLI. It forwards prompts via stdin and returns plain-text output.

Unlike Claude or Codex, the Copilot implementation does not parse structured JSON responses, relying instead on raw stdout capture.

Rovodev

The Rovodev agent in internal/agent/rovodev.go integrates the community-maintained Rovodev binary. It handles stdin/stdout piping and process lifecycle management without additional parsing layers.

This agent uses the common infrastructure in internal/agent/lifecycle.go to ensure proper child-process reaping on pipeline termination.

Opencode

The Opencode agent in internal/agent/opencode.go implements the OpenAI-compatible Opencode protocol using HTTP streaming. It consists of two companion files:

This implementation translates HTTP streams into the same Result type used by process-based agents, enabling seamless substitution in the pipeline.

Shared Infrastructure

All five integrations rely on common utilities within the internal/agent package to ensure consistent behavior.

Lifecycle Management

internal/agent/lifecycle.go manages process groups and graceful termination. When the pipeline receives a shutdown signal, this module ensures all agent child processes exit cleanly, preventing zombie processes from hanging builds.

Metrics Collection

internal/agent/invocationmetrics.go defines the InvocationMetrics struct used by agents that expose token usage (Claude and Codex). It records prompt tokens, completion tokens, and wall-clock timing for each invocation round.

Resilience Patterns

internal/agent/retry.go implements exponential backoff for transient agent failures, while internal/agent/fallback.go provides a no-op placeholder. If the configuration specifies an unknown agent name, the system instantiates the fallback agent and logs a warning rather than crashing the pipeline.

Configuration and Usage

You select an integration by setting the agent field in your repository configuration (see docs/src/content/docs/reference/repo-config.md for schema details):

agent: claude

Valid values correspond to the implementation files: claude, codex, copilot, rovodev, or opencode.

Programmatic Execution

When executing a pipeline step programmatically, reference the typed constant from internal/types:

cfg := types.Config{
    Agent: types.AgentClaude,
}
run := pipeline.NewRun(cfg)
result, err := run.ExecuteStep(pipeline.StepTest, ctx)
if err != nil {
    log.Fatalf("test step failed: %v", err)
}
fmt.Println(result.Text)

Inspecting Token Usage

For agents that support metrics (Codex and Claude), inspect usage statistics after execution:

metrics := result.Metrics
fmt.Printf("Prompt tokens: %d, Completion tokens: %d\n",
    metrics.PromptTokens, metrics.CompletionTokens)

Summary

  • Five integrations: Claude, Codex, Copilot, Rovodev, and Opencode are supported via distinct implementations under internal/agent/.
  • Unified interface: All agents implement the interface defined in internal/agent/agent.go, enabling hot-swapping via configuration.
  • Shared utilities: Lifecycle management (lifecycle.go), metrics collection (invocationmetrics.go), and retry logic (retry.go) are reused across implementations.
  • Configuration-driven: Set the agent field in .no-mistakes.yaml to claude, codex, copilot, rovodev, or opencode to select your backend.
  • Graceful degradation: Unknown agent names trigger the fallback implementation in internal/agent/fallback.go rather than causing runtime panics.

Frequently Asked Questions

How do I switch between agents in a no-mistakes project?

Modify the agent key in your .no-mistakes.yaml file to one of the supported values: claude, codex, copilot, rovodev, or opencode. The pipeline factory in internal/agent/agent.go resolves this string to the corresponding concrete implementation on startup.

Does no-mistakes support Cursor as an agent?

According to the source analysis, Cursor is not implemented in the current internal/agent/ package. The five supported integrations are Claude, Codex, Copilot, Rovodev, and Opencode. Adding Cursor would require creating a new internal/agent/cursor.go file implementing the standard Agent interface.

Which agents provide token usage metrics?

Claude and Codex expose token counts through the InvocationMetrics struct defined in internal/agent/invocationmetrics.go. You can access these via result.Metrics.PromptTokens and result.Metrics.CompletionTokens after execution. Copilot, Rovodev, and Opencode do not currently populate these fields.

What happens if I specify an unsupported agent name?

The factory function falls back to the no-op implementation in internal/agent/fallback.go. This placeholder logs a warning and returns empty results, ensuring the pipeline continues running without crashing. You should check the logs for fallback warnings to identify configuration typos.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →