This message will self-destruct in five seconds.

Good morning, Agent.

Your mission, should you choose to accept it, involves a compromised system. During a routine surveillance sweep, we intercepted a distress signal from your terminal:

[WARN] - (starship::utils): Executing command "/opt/homebrew/bin/node" timed out.

Initial analysis suggested a minor calibration issue. We were wrong. Further investigation revealed a far more serious problem: your primary operating interface – the shell – takes three full seconds to initialize.

Three seconds. In the field, that is a lifetime. Targets move. Windows close. Intelligence goes cold.

In Protocol Zero Friction , we outfitted you with top-tier equipment: Starship, Zoxide, Fzf, Bat, Eza. A world-class kit. But we failed to inspect the weapon itself. The gun was loaded. The scope was calibrated. And the safety was jammed.

Your mission: identify and neutralize every source of latency in .zshrc. Restore operational readiness to under 100 milliseconds.

Phase 1: Reconnaissance

Every operation starts with intelligence gathering. We need to know the exact scope of the threat.

The Starship warning was the first lead. A quick containment – disable the Node.js module in ~/.config/starship.toml:

[nodejs]
disabled = true

But that was a decoy. The real target was hiding deeper. We ran diagnostics:

time zsh -i -c exit
zsh -i -c exit  2.71s user 0.81s system 117% cpu 2.996 total

Then we established a baseline – a clean shell, no loadout:

time zsh --no-rcs -i -c exit
zsh --no-rcs -i -c exit  0.00s user 0.00s system 72% cpu 0.008 total

Eight milliseconds clean. 2,996 milliseconds loaded. The threat is not the shell. The threat is inside the configuration. We have a mole.

Phase 2: Interrogation

A line-by-line sweep of .zshrc identified four hostiles and one security breach.

Target 1: brew --prefix

Threat level: HIGH

Found at the top of the file, sitting in plain sight:

ZSH_BREW_PREFIX="$(brew --prefix)"

And again, further in:

if type brew &>/dev/null; then
  FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
fi

Each invocation of brew --prefix launches a Ruby subprocess. Cost: 200-400ms per call. Two calls. That is up to 800ms burned before a single plugin loads.

Neutralization: The Homebrew prefix on Apple Silicon is a known constant. There is no reason to ask the system what it already knows.

BREW_PREFIX="/opt/homebrew"

Static assignment. Zero cost. Target eliminated.

Target 2: Oh My Zsh

Threat level: CRITICAL

In the original briefing, we designated Oh My Zsh as “the foundation.” That assessment was flawed.

Oh My Zsh is a framework. It loads a plugin manager, a theme engine, an auto-update daemon, and compatibility shims for dozens of configurations. Our deployment used exactly one plugin: git.

We deployed an aircraft carrier to run a single reconnaissance drone.

Neutralization: Strip the framework. Replace it with the one thing it was actually providing – a completion system:

autoload -Uz compinit
if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then
  compinit
else
  compinit -C
fi

The -C flag skips the security check and reuses the cached dump. We only rebuild once every 24 hours. Surgical. Minimal. Effective.

Target 3: Dynamic Completion Generation

Threat level: MODERATE

Two tools were regenerating their entire completion scripts on every single shell launch:

source <(_HASS_CLI_COMPLETE=zsh_source hass-cli)
source <(openclaw completion --shell zsh)

Each source <(...) forks a subprocess, generates the script, and pipes it back into the shell. Cost: 100-300ms per tool. Every. Single. Time.

Neutralization: Generate once. Cache to disk. Source the file.

# One-time generation (run manually):
mkdir -p ~/.zsh_comp_cache
_HASS_CLI_COMPLETE=zsh_source hass-cli > ~/.zsh_comp_cache/hass-cli.zsh

# At startup (near-instant):
[[ -f ~/.zsh_comp_cache/hass-cli.zsh ]] && source ~/.zsh_comp_cache/hass-cli.zsh

When the tool updates, delete the cache. It regenerates on the next manual run. Reading a file from disk costs microseconds. Spawning a process costs hundreds of milliseconds. Choose accordingly.

Target 4: Missing History Protocol

Threat level: OPERATIONAL

This was not a performance issue. It was a data loss risk. Oh My Zsh had been silently providing history configuration. With the framework removed, those settings vanished. Without them, your command history – your operational log – does not persist between sessions.

Neutralization: Explicit history configuration:

HISTFILE=~/.zsh_history
HISTSIZE=50000
SAVEHIST=50000
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt SHARE_HISTORY
setopt APPEND_HISTORY

Never rely on a framework for something this critical.

Security Breach: Exposed Credentials

Threat level: SEVERE

During the sweep, we discovered something that should never have been there. Passwords. API keys. Auth tokens. All hardcoded directly in .zshrc:

export PROXMOX_PASSWORD='...'
export TAILSCALE_AUTH_KEY='...'
export HASS_TOKEN='...'

If this file ever reaches a public repository, a dotfiles backup, or a pastebin, those credentials are burned. Every system they protect is compromised.

Neutralization: Immediate extraction to a classified file with restricted access:

# ~/.zsh_secrets (chmod 600 -- owner read/write only)
export PROXMOX_PASSWORD='...'
export HASS_TOKEN='...'

# In .zshrc -- load only if the file exists:
[[ -f ~/.zsh_secrets ]] && source ~/.zsh_secrets

Add ~/.zsh_secrets to your global .gitignore. This file never touches version control. Ever.

Phase 3: Confirmation

All targets neutralized. Time to verify.

# BEFORE
time zsh -i -c exit
# 2.71s user 0.81s system 117% cpu 2.996 total

# AFTER
time zsh -i -c exit
# 0.06s user 0.03s system 88% cpu 0.099 total

From 3 seconds to 100 milliseconds. A 30x improvement.

Every new terminal window. Every tmux pane. Every shell spawn from your editor. Operational in the time it takes to blink.

Classified: The Final Configuration

The complete, field-tested .zshrc:

BREW_PREFIX="/opt/homebrew"

# History
HISTFILE=~/.zsh_history
HISTSIZE=50000
SAVEHIST=50000
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_VERIFY
setopt SHARE_HISTORY
setopt APPEND_HISTORY

# Completions
FPATH=${BREW_PREFIX}/share/zsh-completions:$FPATH
autoload -Uz compinit
if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then
  compinit
else
  compinit -C
fi
[[ -f ~/.zsh_comp_cache/hass-cli.zsh ]] && source ~/.zsh_comp_cache/hass-cli.zsh

# Prompt
eval "$(starship init zsh)"

# Plugins
source ${BREW_PREFIX}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source ${BREW_PREFIX}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# Tools
eval "$(zoxide init zsh)"
source <(fzf --zsh)
eval "$(direnv hook zsh)"

# Aliases
alias ls="eza --icons --git"
alias ll="eza -l --icons --git --no-user --no-time"
alias tree="eza --tree --icons"
alias cat="bat"

export FZF_CTRL_T_OPTS="
  --preview 'bat -n --color=always {}'
  --bind 'ctrl-/:change-preview-window(down|hidden|)'"

# Path
. "$HOME/.local/bin/env"
export PATH="${BREW_PREFIX}/bin:$PATH"
export PATH="${BREW_PREFIX}/sbin:$PATH"

# Secrets
[[ -f ~/.zsh_secrets ]] && source ~/.zsh_secrets

Debrief

The mission is complete. Four hostiles eliminated. One security breach contained. System boot time reduced by 97%.

The takeaway for all agents in the field: frameworks are convenient. Convenience breeds complacency. Complacency breeds bloat. And bloat will slow you down when you can least afford it.

Know your tools. Measure your systems. Cut what does not serve the mission.

This message has self-destructed.

Good luck.