claude-code - 💡(How to fix) Fix [FEATURE] ! shell command mode doesn't load interactive ZSH plugins (zsh-autosuggestions, zsh-autocomplete)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

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.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING