Two interaction levels

Launch commands are entered in a regular terminal and create a session. Slash commands are entered inside Claude Code and control the active dialog.

This separation helps avoid confusing startup parameters with session commands.

LevelExamplesPurpose
Terminalclaude, -p, -cCreate or continue a session
Terminal--permission-mode, --worktreeSet the mode and workspace
Active session/help, /status, /doctorCheck capabilities and state
Active session/context, /compact, /clearManage history and context
Active session/diff, /permissions, /rewindReview changes and work state

Launching from the terminal

First go to the project directory so Claude receives the correct starting point. For a one-off request or an isolated experiment, you can use separate startup options.

cd ~/projects/commerce-os

# Interactive session
claude

# One-off request
claude -p "Give me a concise overview of this project’s structure"

# Continue the previous session
claude -c

# Separate permission mode or worktree
claude --permission-mode plan
claude --worktree ../commerce-os-exp

Active-session commands

  • /help shows the capabilities of the specific version.
  • /status helps check the current session and authorization state.
  • /doctor diagnoses the installation and environment.
  • /context shows the context in use.
  • /compact compresses a long history, while /clear clears the dialog.
  • /diff shows current changes, /permissions manages permissions, and /rewind returns to an earlier state.
/status
/doctor
/context
/compact
/diff

How to choose the right level

  1. To open Claude in a project, run claude in the shell.
  2. For a short one-off analysis, use claude -p "...".
  3. To continue previous work, use claude -c.
  4. For the current session state or diagnostics, enter /status or /doctor.
  5. To reduce history, use /compact; this does not create a new session.

Canonical lesson source · JavaRush

Open JavaRush material