Skip to content

feat: Document and test Claude Code CLI passthrough args #21

@martymcenroe

Description

@martymcenroe

Context

Issue #6 covers the mechanism (converting bash aliases to shell functions so $@ passes through). The Python side already works — parse_known_args() consumes unleashed flags and forwards the rest to claude.cmd.

This issue tracks which Claude Code CLI args should be supported, tested, and documented.

Args to Support

Session Management

  • --continue — Resume the most recent conversation in the current directory
  • --resume <session-id> — Resume a specific conversation by ID
  • --name <name> — Name a session for easier resumption

Model Selection

  • --model <model> — Override the default model (e.g., sonnet, haiku)

Input

  • --prompt <text> — Start with an initial prompt (non-interactive)
  • -p <text> — Short form of --prompt
  • --stdin — Read initial prompt from stdin (pipe-friendly)

Behavior

  • --allowedTools <tools> — Restrict which tools Claude can use
  • --disallowedTools <tools> — Block specific tools
  • --max-turns <n> — Limit autonomous turns
  • --verbose — Enable verbose output

Output

  • --output-format <format> — Change output format (e.g., json, stream-json)

Testing Matrix

Each of these should be tested with the shell function approach from #6:

# Continue last session
unleashed-c-18 --continue

# Resume specific session
unleashed-c-18 --resume 65fc85a1-d85e-443f-acbc-d48c48bff1e4

# Named session
unleashed-c-18 --name "hermes-email-fix"

# Model override
unleashed-c-18 --model sonnet

# Turn limit
unleashed-c-18 --max-turns 50

Considerations

  • Some args may conflict with unleashed's own flags (unlikely since unleashed uses --mirror, --friction, --joint-log, --cwd)
  • --prompt and --stdin might not play well with the PTY wrapper since they change Claude's interactivity mode
  • --output-format json would break pattern matching entirely — may need to warn or block

Depends On

Acceptance Criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions