𝗠𝘆 𝗖𝗼𝗱𝗶𝗻𝗴 𝗔𝗴𝗲𝗻𝘁 𝗔𝘀𝗸𝗲𝗱 𝗣𝗲𝗿𝗺𝗶𝘀𝘀𝗶𝗼𝗻 𝗳𝗼𝗿 𝗘𝘃𝗲𝗿𝘆 𝗧𝗶𝗻𝘆 𝗦𝘁𝗲𝗽
My AI assistant had a major problem. It did not refuse to ask for permission. It asked for permission too often.
I would give it a simple task like reading a PDF. The assistant would make one move, ask for approval, run the command, and then immediately ask again for the next tiny step. One task became a treadmill of prompts.
Approval prompts are necessary. You want a local assistant to stop before it runs commands, writes files, or opens apps. But real work requires many steps. Reading a PDF involves checking for Python, finding a converter, running that converter, and reading the text.
If every single step asks for approval, you stop evaluating risk. You start clicking through interruptions just to make them go away. This trains you to ignore the safety system. That is more dangerous than having no safety at all.
The old workflow looked like this:
- Assistant chooses a tool
- Policy requires confirmation
- User approves
- Tool runs
- Assistant asks again for the next tool
The assistant missed the intent of the user. You were not approving one tiny probe. You were approving a complete task.
I changed how CliGate works. Now, once you approve the first action in a chat, the system sets a flag. This lets later steps continue without new approval rounds. The assistant still gets the real results so it can keep working.
I also added an escape hatch: /safe. This command turns explicit confirmation mode back on.
I also fixed a language bug. When the system continued a task, it sometimes changed the language of the prompts. If you spoke Chinese, the assistant would switch to English for the next prompt. Now, the assistant looks at your last real message to choose the right language.
The fix is not to disable approvals. The fix is to remember why the user gave approval.
For local tools, use task-scoped trust:
- Ask before crossing a major boundary
- Remember the approval for the current task
- Provide a way to return to strict mode
- Do not let system messages change the user intent
This is how I build approvals in CliGate. It is my local control plane for Claude Code, Codex CLI, and Gemini CLI.
How do you handle approval fatigue? Do you approve per tool call, per task, or per session?
내 코딩 에이전트가 아주 사소한 단계마다 허락을 구했다
최근 몇 가지 다양한 AI 코딩 에이전트를 사용해 보고 있습니다. 어떤 것들은 놀라울 정도로 유능하고, 어떤 것들은... 글쎄요, 조금 덜 유능합니다.
하지만 최근 사용한 에이전트 중 하나는 단순히 유능하지 않은 것을 넘어, 정말 짜증 나는 방식으로 작동했습니다. 바로 모든 사소한 단계마다 저에게 허락을 구했다는 점입니다.
허락의 루프
새 파일을 만들려고 할 때마다, npm install을 실행하려고 할 때마다, 심지어 단순히 파일의 내용을 읽으려고 할 때조차 에이전트는 멈춰서 물었습니다.
"새 파일을 생성해도 될까요?" "이 명령어를 실행해도 될까요?" "이 파일을 읽어도 될까요?"
이것은 마치 극도로 불안해하는 인턴을 돌보고 있는 것 같은 기분이 들게 했습니다. 저는 에이전트가 스스로 판단하고 작업을 진행하기를 원했지, 모든 작은 움직임에 대해 승인 버튼을 누르는 '승인 버튼 머신'이 되고 싶었던 게 아니었습니다.
왜 이런 일이 발생할까요?
이런 현상은 주로 에이전트의 시스템 프롬프트(System Prompt) 또는 설정된 가드레일(Guardrails) 때문에 발생합니다.
많은 개발자들이 에이전트가 시스템을 망가뜨리거나 예기치 않은 비용을 발생시키는 것을 방지하기 위해 "모든 도구 사용 전에 사용자에게 확인을 받으라"는 지침을 프롬프트에 포함합니다. 안전을 위한 좋은 의도이지만, 에이전트의 자율성을 완전히 죽여버리는 결과를 초래합니다.
해결 방법: 자율성 부여하기
이 문제를 해결하는 방법은 간단했습니다. 시스템 프롬프트를 수정하여 에이전트에게 더 많은 권한을 부여하고, 어떤 상황에서 허락이 필요하고 어떤 상황에서 스스로 진행해도 되는지 명확한 가이드라인을 제공하는 것이었습니다.
저는 프롬프트를 다음과 같이 수정했습니다:
당신은 자율적인 코딩 에이전트입니다.
다음 규칙을 따르세요:
1. 파일 읽기, 파일 생성, 테스트 실행과 같은 일반적인 개발 작업은 사용자에게 묻지 않고 직접 수행하세요.
2. 하지만 시스템 환경 변수를 변경하거나, 대규모 삭제 작업을 수행하거나, 외부 API 키를 다루는 것과 같이 위험할 수 있는 작업은 반드시 사용자의 승인을 받으세요.
3. 작업의 흐름을 끊지 말고, 작업이 완료된 후에 결과를 보고하세요.
결과
이 작은 변화만으로도 경험이 완전히 달라졌습니다! 이제 에이전트는 제가 지시한 작업을 수행하기 위해 필요한 도구들을 스스로 사용하며, 제가 개입해야 할 때만 질문을 던집니다. 이제야 비로소 진정한 '에이전트'처럼 느껴집니다.