Back to prompts
CLI Error Tolerance
Make CLI tools forgiving of minor syntax issues for agent ergonomics
Jeffrey Emanuelv1.0.0~450 tokens
Additional Context
Prompt
One thing that's critical for the robot mode flags in the CLI (the mode intended for use by AI coding agents like yourself) is that we want to make it easy for the agents to use the tool; so first off, we want to make the CLI interface and system as intuitive and easy as possible and explain it super clearly in the CLI help and in a blurb in AGENTS.md. But beyond that, we want to be maximally flexible when the intent of a command is clear but there's some minor syntax issue; basically we'd like to honor all commands where the intent is legible (although in those cases we might want to precede the response with some note instructing the agent how to more correctly issue that command in the future). If we can't really figure out reliably what the agent is trying to do, then we should always return a super detailed and helpful/useful error message that lets the agent understand what it did wrong so it can do it the right way next time; we should give them a couple relevant correct examples in the error message about how to do what we might reasonably guess they are trying (and failing) to do with their wrong command. Use ultrathink.
When to Use
- When building CLIs that agents will use
- To improve agent-tool interaction success rates
- After Robot-Mode Maker to enhance the interface
Tips
- Complements Robot-Mode Maker
- Reduces agent frustration with strict syntax
- Include teaching notes in error responses
Related Prompts
5 suggestionsThe Robot-Mode Maker
Create an agent-optimized CLI interface for any project
cliautomationagent
The Premortem Planner
Imagine failure 6 months out and revise the plan to prevent it
planningriskpremortem
Project Opinion Elicitor
Get honest, critical assessment of the project from the agent's perspective
feedbackassessmenthonesty
Peer Code Reviewer
Cross-agent code review to catch issues from parallel work
reviewqualitycross-agent
Agent Swarm Launcher
Initialize multiple agents with full context and coordination protocols
multi-agentcoordinationswarm