Skip to content

[DOCS] Bash tool docs missing login-shell default behavior change and CLAUDE_BASH_NO_LOGIN context #28043

@coygeek

Description

@coygeek

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool

Section/Topic

Bash tool shell startup behavior (login vs non-login shell), shell snapshot behavior, and migration notes for previous env-var behavior.

Current Documentation

The Bash tool docs currently describe persistent sessions and command execution:

The bash tool enables Claude to execute shell commands in a persistent bash session...

The Claude Code settings page includes:

CLAUDE_CODE_SHELL — Override automatic shell detection...

But there is no documentation for login-shell startup behavior, shell snapshots, or CLAUDE_BASH_NO_LOGIN.

What's Wrong or Missing?

Release v2.1.51 introduced:

BashTool now skips login shell (-l flag) by default when a shell snapshot is available... Previously this required setting CLAUDE_BASH_NO_LOGIN=true.

This behavioral change can affect shell initialization and command execution timing, but users have no docs explaining:

  • The new default behavior
  • When login shells are still used
  • How CLAUDE_BASH_NO_LOGIN relates to current behavior

Suggested Improvement

Add a "Shell startup behavior" section to Bash tool docs with:

  • Current default behavior and conditions (snapshot available vs unavailable)
  • Backward-compatibility/migration note for prior CLAUDE_BASH_NO_LOGIN usage
  • Troubleshooting guidance for users relying on login-shell init scripts

Also add an environment-variable reference entry if CLAUDE_BASH_NO_LOGIN remains supported.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

Page Context
https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool Needs startup behavior and shell snapshot details
https://code.claude.com/docs/en/settings Environment variable docs should clarify CLAUDE_BASH_NO_LOGIN status/behavior

Total scope: 2 pages affected

Source: Claude Code release v2.1.51
Changelog entry: "BashTool now skips login shell (-l flag) by default when a shell snapshot is available... Previously this required setting CLAUDE_BASH_NO_LOGIN=true."

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions