claude-code - 💡(How to fix) Fix Feature request: option to hide or redact cwd in startup banner [1 participants]

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…
GitHub stats
anthropics/claude-code#51909Fetched 2026-04-23 07:41:39
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1
RAW_BUFFERClick to expand / collapse

Problem

The Claude Code startup banner prints the current working directory (e.g. cwd: /var/home/kieran). On many systems this directly exposes the OS username, which is a privacy issue during screenshares, recorded demos, or pair-programming sessions.

There doesn't appear to be a setting, CLI flag, or env var that hides or redacts this line. --name sets a session display name but doesn't replace the cwd output, and nothing in the settings.json schema targets the startup banner.

Requested

An opt-in way to hide or redact the cwd shown in the startup banner. Any of these would solve the problem:

  • A settings flag, e.g. "hideCwdInBanner": true or "startupBanner": { "showCwd": false }
  • A CLI flag, e.g. --hide-cwd / --redact-cwd
  • An env var, e.g. CLAUDE_CODE_HIDE_CWD=1
  • A redaction mode that replaces the home portion with ~ (so /var/home/kieran/projects/foo~/projects/foo). Useful but only a partial fix since the home directory name itself is often the username.

Full hide is the most broadly useful — users who want the path visible already have it by default.

Environment

  • Claude Code on Linux (Bazzite / Fedora Atomic), home resolves to /var/home/<user>
  • Same issue applies on macOS (/Users/<user>) and any Linux with /home/<user>

extent analysis

TL;DR

Adding a configuration option to hide the current working directory in the startup banner, such as a "hideCwdInBanner": true flag in settings.json, would address the privacy issue.

Guidance

  • Consider adding a new setting in settings.json to control the visibility of the current working directory in the startup banner.
  • Introduce a CLI flag, such as --hide-cwd, to provide an alternative way to hide the cwd.
  • Evaluate the feasibility of using an environment variable, like CLAUDE_CODE_HIDE_CWD, to enable or disable the cwd display.
  • Assess the potential impact of implementing a redaction mode that replaces the home directory with ~ on different operating systems.

Example

No code snippet is provided as the issue focuses on configuration and privacy rather than code implementation.

Notes

The proposed solutions aim to provide an opt-in way to hide or redact the cwd, addressing the privacy concern without altering the default behavior for users who prefer to display the full path.

Recommendation

Apply a workaround by requesting the addition of a configuration option, such as "hideCwdInBanner": true, to the settings.json schema, as this would provide a straightforward and effective solution to the privacy issue.

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