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.
| Level | Examples | Purpose |
|---|---|---|
| Terminal | claude, -p, -c | Create or continue a session |
| Terminal | --permission-mode, --worktree | Set the mode and workspace |
| Active session | /help, /status, /doctor | Check capabilities and state |
| Active session | /context, /compact, /clear | Manage history and context |
| Active session | /diff, /permissions, /rewind | Review 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-expActive-session commands
/helpshows the capabilities of the specific version./statushelps check the current session and authorization state./doctordiagnoses the installation and environment./contextshows the context in use./compactcompresses a long history, while/clearclears the dialog./diffshows current changes,/permissionsmanages permissions, and/rewindreturns to an earlier state.
/status
/doctor
/context
/compact
/diffHow to choose the right level
- To open Claude in a project, run
claudein the shell. - For a short one-off analysis, use
claude -p "...". - To continue previous work, use
claude -c. - For the current session state or diagnostics, enter
/statusor/doctor. - To reduce history, use
/compact; this does not create a new session.
Canonical lesson source · JavaRush
Open JavaRush material