𝗠𝘆 𝗖𝗼𝗱𝗶𝗻𝗴 𝗔𝗴𝗲𝗻𝘁 𝗔𝘀𝗸𝗲𝗱 𝗣𝗲𝗿𝗺𝗶𝘀𝘀𝗶𝗼𝗻 𝗳𝗼𝗿 𝗘𝘃𝗲𝗿𝘆 𝗧𝗶𝗻𝘆 𝗦𝘁𝗲𝗽
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?
Meu agente de codificação pedia permissão para cada pequeno passo
Eu estava construindo um agente de codificação usando LangChain e OpenAI.
O objetivo era ter um agente que pudesse navegar autonomamente em uma base de código, entender a estrutura e implementar funcionalidades.
No entanto, encontrei um grande obstáculo: o agente pedia permissão para cada ação individual.
'Posso ler src/main.py?'
'Posso listar os arquivos em tests/?'
'Posso executar pytest?'
'Posso criar src/utils.py?'
Era exaustivo. Eu sentia que estava cuidando de um estagiário muito lento.
O problema era a minha implementação do padrão 'Human-in-the-loop'. Eu o configurei para que cada chamada de ferramenta exigisse aprovação manual.
Embora isso seja seguro, acaba com a experiência "agêntica".
Para resolver isso, implementei três estratégias:
- Escopo de Permissões: Em vez de pedir permissão para cada arquivo, dei ao agente permissão para ler qualquer coisa dentro do diretório
src/. - Agrupamento de Ações: Permiti que o agente executasse uma sequência de comandos (como
ls,cat,grep) sem perguntar, desde que fossem apenas de leitura. - Limiares de Confiança: Só solicitei intervenção humana se a confiança do agente na próxima etapa fosse inferior a um determinado limite, ou se ele tentasse uma ação "destrutiva" (como
rm -rfougit push).
Isso transformou a experiência de uma interrupção constante em um papel de supervisão de alto nível. Eu não era mais um microgerenciador; eu era um supervisor.