From 3c39e907e2f9a92a50ef90e505c08579608c187b Mon Sep 17 00:00:00 2001 From: Yurii Chukhlib Date: Sat, 10 Jan 2026 10:53:50 +0100 Subject: [PATCH 1/2] fix: disable zsh history expansion to prevent commands with ! from failing Fixes #807 Added `setopt NO_BANG_HIST` to the zsh initialization in ShellIntegrationManager. This prevents zsh from interpreting the `!` character as a history expansion character, which causes commands like `--collectCoverageFrom="!pattern"` to fail with "event not found" error. This is similar to how we already handle other zsh-specific issues like PROMPT_EOL_MARK for special characters in output. Co-Authored-By: Claude --- src/integrations/terminal/ShellIntegrationManager.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/integrations/terminal/ShellIntegrationManager.ts b/src/integrations/terminal/ShellIntegrationManager.ts index ce747438516..7ca5fb192f6 100644 --- a/src/integrations/terminal/ShellIntegrationManager.ts +++ b/src/integrations/terminal/ShellIntegrationManager.ts @@ -36,6 +36,10 @@ export class ShellIntegrationManager { const zshrcContent = ` source "${shellIntegrationPath}" + # Disable history expansion (!) to prevent commands with ! from failing + # Fixes issue where commands like --collectCoverageFrom="!pattern" would fail + # with "event not found" error + setopt NO_BANG_HIST ZDOTDIR=\${ROO_ZDOTDIR:-$HOME} unset ROO_ZDOTDIR [ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv" From 079dffd17e2612ac22f5aaf9430f18363088c4cd Mon Sep 17 00:00:00 2001 From: Yurii Chukhlib Date: Sat, 17 Jan 2026 12:23:28 +0100 Subject: [PATCH 2/2] docs: add changeset for PR #4926 --- .changeset/fix-disable-zsh-history-expansion.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-disable-zsh-history-expansion.md diff --git a/.changeset/fix-disable-zsh-history-expansion.md b/.changeset/fix-disable-zsh-history-expansion.md new file mode 100644 index 00000000000..b63fc7988e2 --- /dev/null +++ b/.changeset/fix-disable-zsh-history-expansion.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +fix: disable zsh history expansion (#4926)