gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Hooks - Erase Prompt Capability

Open Edilmo opened this issue 3 weeks ago • 0 comments

When a BeforeAgent hook blocks with exit code 2, it currently shows stderr to the user but leaves the prompt visible in UI/history. The design doc suggested an optional erasePrompt field to completely remove the prompt for security scenarios (e.g., detecting secrets in user input).

Code Location:

  • BeforeAgent processing: packages/core/src/hooks/hookEventHandler.ts:253-290
  • UI integration would be needed in CLI prompt handling

Edilmo avatar Dec 08 '25 17:12 Edilmo