Skip to content

Improve warning messages when running in dangerous directories #20

Description

@lroolle

Problem

Current dangerous directory warnings are unclear and don't help users understand the risks or provide clear next steps.

Current State

Existing warnings (claude.sh:180-200):

  • Basic detection for home directory and system paths
  • Generic warning text
  • Requires manual 'yes' confirmation
  • No guidance on safer alternatives

Issues:

  • Warning message is vague about actual risks
  • No suggestion of where to run instead
  • Users might not understand why their home directory is dangerous
  • No detection of other risky locations (Desktop, Documents, etc.)

Desired Improvements

Better Risk Communication

Clear explanation that Claude gets FULL ACCESS to all files in the directory tree, including personal files, credentials, SSH keys, browser data, etc.

Clear Alternative Guidance

Suggest creating dedicated project directories like ~/projects/my-claude-work before running.

Enhanced Detection

  • Desktop, Documents, Downloads folders
  • Root filesystem paths
  • Network mounted drives
  • Version control repository roots (detect .git and warn about full repo access)

Progressive Warnings

  • First-time users: Detailed explanation
  • Repeat users: Shorter reminder with skip option
  • Expert mode: Minimal warning

Example Improved Flow

Show specific risks (personal documents, SSH keys, browser data) and provide quick fix command to create safer workspace.

Priority

Medium - Security UX improvement that helps prevent user mistakes.

Related

  • CLAUDE.md documents current safety checks
  • Installation safety is mentioned in README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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