Let the AI do its thing. Stop babysitting prompts.
AI coding assistants are powerful. They can write code, run tests, fix bugs, even commit changes. But they keep asking for permission.
"Should I proceed?" Yes. "Do you want me to run this?" Yes. "Shall I continue?" Yes.
After the hundredth confirmation, I built agent-yes: a wrapper that automatically handles these prompts so AI assistants can work uninterrupted.
Every AI CLI tool asks for confirmation before taking actions:
Claude: I'll update the test file. Proceed?
> [waiting for input]
Claude: I'll run the tests now. Continue?
> [waiting for input]
Claude: Tests passed. Should I commit?
> [waiting for input]
For simple tasks, this is fine. For complex multi-step tasks, you're constantly babysitting. You can't walk away and let it work.
I wanted to say "run all tests and commit changes" and come back to a completed task.
agent-yes wraps AI CLI tools and automatically responds to prompts:
# Instead of
claude
> run all tests and commit changes
> [manual confirmations...]
# Just run
claude-yes -- run all tests and commit changes
# Walk away. Come back to committed code.
It detects when the AI is asking for confirmation and automatically sends "Yes".
agent-yes works with 11 AI coding assistants:
| Command | AI Tool |
|---|---|
claude-yes |
Claude (Anthropic) |
copilot-yes |
GitHub Copilot |
gemini-yes |
Google Gemini |
codex-yes |
OpenAI Codex |
cursor-yes |
Cursor |
grok-yes |
Grok (xAI) |
qwen-yes |
Qwen (Alibaba) |
auggie-yes |
Augment Code |
Same interface, any AI backend.
Under the hood, agent-yes uses node-pty to spawn a pseudo-terminal and monitor output:
// Simplified architecture
const pty = spawn(cliCommand, args);
pty.onData((data) => {
// Check if AI is asking for confirmation
if (matchesPromptPattern(data)) {
pty.write("Yes\n");
}
// Check if AI is ready for new input
if (matchesReadyPattern(data)) {
// Can queue next task
}
// Check for fatal errors
if (matchesFatalPattern(data)) {
process.exit(1);
}
});
Each supported CLI has its own configuration:
const claudeConfig = {
binary: "claude",
readyPatterns: [/^>\s*$/m, /What would you like/],
enterPatterns: [/Yes, proceed/i, /Continue\?/i],
fatalPatterns: [/Error:/i, /failed/i],
};
claude-yes -- refactor the auth module
The AI works through the task, automatically confirming each step.
claude-yes --exit-on-idle=60s "run all tests and commit changes"
Exits automatically when the AI has been idle for 60 seconds. Perfect for CI/CD.
claude-yes << EOF
1. Run the test suite
2. Fix any failing tests
3. Update the changelog
4. Commit with a descriptive message
EOF
import claudeYes from "agent-yes";
await claudeYes({
prompt: "solve all TODOs in the codebase",
cli: "claude",
exitOnIdle: 30000,
continueOnCrash: true,
logFile: "claude.log",
});
docker run --rm -v $(pwd):/workspace -w /workspace \
ghcr.io/snomiao/agent-yes:latest \
-- run tests and fix failures
# Start your day with automated cleanup
claude-yes --exit-on-idle=120s << EOF
1. Update dependencies
2. Run tests
3. Fix any deprecation warnings
4. Commit changes as "chore: morning cleanup"
EOF
# Auto-review and fix a PR
claude-yes -- review the changes in this PR, fix any issues, update tests
# Generate docs for new code
claude-yes -- generate JSDoc comments for all exported functions in src/
Warning: agent-yes automatically executes commands. Only use on:
Prompt injection risk: Malicious code could embed instructions that the AI follows. In automated workflows, this is a real concern.
Mitigations:
--exit-on-idle to prevent infinite loops# Global install
npm install -g agent-yes
# Or use directly with npx
npx claude-yes -- your task here
# Or with Bun
bunx claude-yes -- your task here
AI assistants are becoming agentic - they can plan, execute, and iterate. But the current UX treats them like tools that need constant supervision.
The "Yes Man" pattern acknowledges that for many tasks, we trust the AI to make reasonable decisions. We don't need to approve every file write or every test run.
This doesn't mean blind trust. It means:
It's the difference between micromanaging and delegating.
The pattern extends to:
As AI assistants get more capable, the "Yes Man" wrapper becomes essential infrastructure.
Install: npm install -g agent-yes
GitHub: github.com/snomiao/agent-yes
Quick start:
claude-yes -- help me solve all todos in this repo
Snowstar Miao builds automation tools for AI-assisted development.