Session Commands
Session commands help you manage conversation sessions, maintain context, and organize your security testing workflow.
🎬 GIF: session-commands.gif
Session management commands in action
Session Management
/clear
Clear the current conversation and start fresh.
/clearRemoves all messages from the current session while keeping the same session ID.
Info
Use /clear to reset context without losing your session history.
/compact
Summarize and compact the session to reduce context size.
/compactCreates an AI-generated summary of the conversation, replacing detailed history with a condensed version.
When to use:
- Session is getting long
- Token usage is high
- Context window approaching limits
- Want to continue without losing key information
Example output:
Session compacted:- Target: example.com- Discovered: 3 subdomains, 15 open ports- Findings: 2 SQL injection, 1 XSS- Current task: Testing authentication/share
Create a shareable link to the current session.
/shareGenerates a URL that others can use to view your session.
Options:
/share --public # Anyone with link can view/share --team # Team members only/share --expires 24h # Link expires after timeSession History
/history
View session history.
/historyLists recent sessions with timestamps and summaries.
Output:
Session History━━━━━━━━━━━━━━━
1. [2025-01-15 10:30] Web app scan - example.com2. [2025-01-14 15:45] Network recon - 192.168.1.0/243. [2025-01-14 09:00] Code review - auth module4. [2025-01-13 14:20] Bug bounty - target.com/resume
Resume a previous session.
/resumeOpens a session picker to continue a past conversation.
/resume 1 # Resume session by number/resume abc123 # Resume by session ID/sessions
List all saved sessions.
/sessionsShows all sessions with filtering options:
/sessions --today/sessions --week/sessions --target "example.com"/sessions --agent web-applicationContext Management
/context
View current context information.
/contextOutput:
Session Context━━━━━━━━━━━━━━━
Working Directory: /home/user/projects/webappTarget: example.comAgent: web-applicationModel: anthropic/claude-sonnet-4-20250514
Memory:- 3 discovered subdomains- 15 open ports identified- 2 vulnerabilities found
Token Usage:- Input: 45,230- Output: 12,450- Total: $0.42/memory
Manage session memory.
/memoryShows stored memories for the current context.
/memory add "Target uses PostgreSQL 14.2"/memory list/memory clear/memory export/cost
View token usage and costs.
/costOutput:
Token Usage (Session)━━━━━━━━━━━━━━━━━━━━━
Input Tokens: 45,230Output Tokens: 12,450Cache Hits: 32,100Total Cost: $0.42
Breakdown:- Recon phase: $0.15- Scan phase: $0.20- Report: $0.07Export and Save
/export
Export session data.
/exportOptions:
/export --format markdown # Export as Markdown/export --format json # Export as JSON/export --format html # Export as HTML/export --file report.md # Save to fileMarkdown export:
# Security Assessment: example.com
## Summary- Date: 2025-01-15- Duration: 2h 15m- Findings: 3 high, 2 medium, 5 low
## Findings
### SQL Injection (High)Location: /api/users.../save
Save the current session.
/saveSaves session to disk with automatic naming.
/save "example-com-scan" # Custom nameSession Configuration
/rename
Rename the current session.
/rename "Web App Security Scan - Example.com"/tag
Add tags to the session.
/tag security webapp high-priorityView tags:
/tags/note
Add a note to the session.
/note "Remember to test payment flow tomorrow"Quick Actions
/undo
Undo the last message/action.
/undoReverts to the previous state, removing the last exchange.
/retry
Retry the last prompt with fresh generation.
/retryRe-sends the previous prompt for a new response.
/continue
Continue from where the AI left off.
/continueUseful when response was truncated or incomplete.
Session Templates
/template
Use or create session templates.
/template list/template use webapp-scan/template save my-templateTemplates include:
- Initial context
- Agent selection
- Permission settings
- Memory presets
Examples
Starting a New Scan
/clear/memory add "Target: example.com"/memory add "Scope: *.example.com"
Let's begin reconnaissance on example.comMid-Session Management
/compact # If context is getting long/save # Save progress/cost # Check usageEnding a Session
/export --format markdown --file report.md/share --team/save "completed-scan-example-com"Tip
Use /compact regularly during long sessions to maintain performance and reduce costs.
Related Documentation
- Slash Commands Overview - All commands
- Navigation Commands - Navigation
- Keyboard Shortcuts - Quick access