How to Configure no-mistakes to Use a Specific AI Agent
Configure no-mistakes to use Claude, Codex, GitHub Copilot, or other AI agents by setting the agent: key in ~/.no-mistakes/config.yaml or .no-mistakes.yaml, or override temporarily with the --agent CLI flag.
The kunchenguid/no-mistakes toolchain determines which AI-driven agent to invoke through hierarchical YAML configuration files. Understanding how to configure no-mistakes to use a specific AI agent allows you to control code generation behavior globally, per-repository, or for individual executions.
Configuration File Structure
The tool defines configuration schemas in internal/config/config.go, where the GlobalConfig struct (lines 40-48) handles system-wide defaults and the RepoConfig struct (lines 69-73) handles repository-specific overrides. Both use the Agent field of type types.AgentName to store your selected agent.
Global Configuration (~/.no-mistakes/config.yaml)
Create or edit the global configuration file to set a default agent for all repositories on your machine. This file supports additional tuning options for custom binary paths and arguments.
# ~/.no-mistakes/config.yaml
agent: claude
acpx_path: /usr/local/bin/acpx
agent_path_override:
codex: /opt/codex/bin/codex
agent_args_override:
pi: ["--model", "gpt-4"]
Repository-Local Override (.no-mistakes.yaml)
Place a .no-mistakes.yaml file at the root of any repository to override the global agent setting for that specific project. According to the source in internal/config/config.go, the repository-local value takes precedence when the tool resolves configuration.
# .no-mistakes.yaml
agent: opencode
allow_repo_commands: true
Supported Agent Values
The AgentName enum in internal/types/types.go (lines 131-138) defines the supported values for the agent: key. These constants map to concrete agent implementations instantiated in internal/agent/agent.go.
| Value | Description |
|---|---|
auto |
Automatically detect the first available native agent on the host (default when omitted). |
claude |
Invoke the Anthropic Claude agent (requires Claude CLI installation). |
codex |
Invoke the OpenAI Codex agent (requires Codex CLI). |
rovodev |
Use the RovoDev agent (acli). |
opencode |
Use the OpenCode agent. |
pi |
Use the Pi agent. |
copilot |
Use the GitHub Copilot agent. |
acp:<target> |
Use a custom ACP target, such as acp:gemini. |
Runtime CLI Overrides
For one-off agent selection without modifying configuration files, use the --agent flag. This flag is parsed in internal/cli/daemon_cmd.go and overrides both global and repository-local settings for that single execution.
# Use Copilot for this push only
no-mistakes --agent copilot push
# Use a custom ACP target temporarily
no-mistakes --agent acp:gemini suggest
Advanced Agent Configuration
Beyond selecting the agent name, you can customize how no-mistakes launches the binary.
Custom Binary Paths
Use agent_path_override in the global config to specify non-standard installation locations for specific agents. This is useful when agents are installed outside standard $PATH directories.
Custom Launch Arguments
The agent_args_override field injects specific command-line arguments when spawning the agent process. When the configuration above specifies agent: pi, the tool appends --model gpt-4 to the Pi agent invocation.
ACP Target Setup
When using the acp: prefix, you may need to specify the custom binary location via acpx_path:
agent: acp:gemini
acpx_path: /opt/acp/gemini
Summary
- Set the default agent globally in
~/.no-mistakes/config.yamlusing theagent:key and values likeclaude,codex, orauto - Override per-repository by creating a
.no-mistakes.yamlfile with anagent:entry in the repository root - Use supported agent identifiers defined in
internal/types/types.go:auto,claude,codex,rovodev,opencode,pi,copilot, oracp:<target> - Temporarily override any configuration using the
--agentCLI flag parsed ininternal/cli/daemon_cmd.go - Customize binary paths via
agent_path_overrideand command arguments viaagent_args_overridein the global configuration - Repository-local settings take precedence over global settings, and CLI flags take precedence over both
Frequently Asked Questions
What happens if I don't specify an agent in the configuration files?
If the agent: key is omitted or left empty in both ~/.no-mistakes/config.yaml and the repository's .no-mistakes.yaml, no-mistakes defaults to auto. This setting automatically detects the first available native agent installed on your host system according to the logic in internal/agent/agent.go.
Can I use different agents for different repositories?
Yes. Set your preferred default agent in the global ~/.no-mistakes/config.yaml, then create a .no-mistakes.yaml file in any repository that requires a different agent. The repository-local configuration overrides the global GlobalConfig.Agent value for that specific repository only.
How do I configure a custom AI agent that isn't in the standard list?
Use the acp:<target> syntax in the agent: field, such as acp:gemini or acp:custom-llm. You should also specify the binary path using the acpx_path key in your global configuration to ensure no-mistakes can locate and execute your custom ACP agent implementation.
Does the --agent flag permanently change my configuration?
No. The --agent flag provides a temporary runtime override for a single execution only. It does not modify ~/.no-mistakes/config.yaml or .no-mistakes.yaml. The next invocation of no-mistakes will revert to using the agent specified in your configuration files.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →