Skip to content

Bug: --trace flag doesn't pass --dangerously-skip-permissions in YOLO mode #1

@lroolle

Description

@lroolle

Problem

claude-yolo --trace . fails to add --dangerously-skip-permissions to the claude command, breaking YOLO mode's core functionality.

Root Cause

  • In claude.sh:559, when --trace is used, the command becomes claude-trace --include-all-requests --run-with
  • In docker-entrypoint.sh:167-169 (non-root) and 181-183 (root), the logic only adds --dangerously-skip-permissions when:
    if [ "$cmd" = "claude" ] || [ "$cmd" = "$CLAUDE_CMD" ]; then
  • Since cmd is "claude-trace", it doesn't match this condition

Impact

YOLO mode loses its safety bypass when tracing is enabled, defeating the purpose of running in a container.

Reproduction

./claude-yolo --trace .
# Claude runs without --dangerously-skip-permissions, causing permission prompts

Solution Options

  1. Pattern matching: Check if command contains "claude" or ends with "claude-trace"
  2. Flag detection: Parse command args to detect if claude is being invoked regardless of wrapper
  3. Environment variable: Pass a flag to indicate YOLO mode should be active

Files Affected

  • claude.sh:559 (trace command construction)
  • docker-entrypoint.sh:167-169, 181-183 (permission logic)

See DEV-LOGS.md for detailed analysis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions