[FEATURE] ! shell command mode doesn't load interactive ZSH plugins (zsh-autosuggestions, zsh-autocomplete)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
In Claude Code's command-line mode (invoked by typing ! to run shell commands directly without AI), interactive ZSH plugins do not work. Specifically:
- zsh-autosuggestions: Typing a command prefix (e.g., ls) should show grey inline suggestions from history; pressing Right arrow accepts the suggestion; Up/Down arrows cycle through matching history entries
- zsh-autocomplete (brew install zsh-autocomplete): IDE-like real-time type-ahead completion that pops up as you type
These features work perfectly in a normal terminal session (iTerm2, Terminal.app, VS Code integrated terminal, etc.) but are completely absent in Claude Code's ! mode.
## Current Behavior
When running shell commands via ! in Claude Code:
- No history-based inline suggestions appear while typing
- Up/Down arrows do not cycle through filtered history
- Right arrow does not accept inline suggestions
- The shell behaves as if ZSH plugins are not loaded
## Expected Behavior
The ! command mode should behave like a normal interactive ZSH session, respecting the user's .zshrc configuration and loaded plugins (Oh My ZSH, zsh-autosuggestions, zsh-autocomplete, etc.).
## Environment
- Claude Code version: 2.1.145 (Claude Code)
- OS: macOS 26.3.1 (a) — Darwin 25.3.0, arm64 (Apple Silicon T6030)
- Shell: ZSH 5.9 (arm64-apple-darwin25.0)
- Framework: Oh My ZSH
- Enabled plugins in .zshrc: git
- Installed but relevant: - zsh-autosuggestions (in ~/.oh-my-zsh/plugins/)
- zsh-autocomplete v25.03.19 (via Homebrew, currently commented out in .zshrc)
- Node.js: v22.22.0
- npm: 11.4.2
Proposed Solution
This issue affects users who rely on shell plugins for productivity. The ! mode is meant to be a quick way to run shell commands without leaving Claude Code, but the lack of plugin support makes it significantly less
usable than a regular terminal for users with custom shell configurations.
Possible root cause: the ! command mode may be spawning a non-interactive shell (missing -i flag) or not sourcing the user's .zshrc/.zshenv, which prevents Oh My ZSH and its plugins from initializing. Ensuring the
subprocess is started as an interactive login shell (e.g., zsh -i -l) may resolve this.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗