What
Name the shell tool after the user's actual shell (zsh, bash, fish) instead of hardcoded bash. Detect via $SHELL at startup.
Why
The tool is called bash but ShellSession already spawns the user's login shell (usually zsh). The model sees "bash" in the tool name → generates bash idioms → zsh parses them differently → occasional escaping/quoting errors.
Tool name is a one-token NTP context signal that shifts the entire probability distribution. Naming it zsh when running zsh = zero-cost accuracy improvement.
How
ShellSession.shell_name → File.basename(ENV["SHELL"] || "bash")
Tools::Shell.tool_name → dynamic from detected shell
- Optionally: shell-specific
prompt_guidelines (zsh arrays are 1-indexed, fish uses set not export, etc.)
Full exploration: thoughts/shared/notes/2026-05-02/dynamic-shell-tool-name-from-user-shell.md
What
Name the shell tool after the user's actual shell (
zsh,bash,fish) instead of hardcodedbash. Detect via$SHELLat startup.Why
The tool is called
bashbut ShellSession already spawns the user's login shell (usually zsh). The model sees "bash" in the tool name → generates bash idioms → zsh parses them differently → occasional escaping/quoting errors.Tool name is a one-token NTP context signal that shifts the entire probability distribution. Naming it
zshwhen running zsh = zero-cost accuracy improvement.How
ShellSession.shell_name→File.basename(ENV["SHELL"] || "bash")Tools::Shell.tool_name→ dynamic from detected shellprompt_guidelines(zsh arrays are 1-indexed, fish usessetnotexport, etc.)Full exploration:
thoughts/shared/notes/2026-05-02/dynamic-shell-tool-name-from-user-shell.md