Overview
Qwen Code’s interactive mode provides a rich terminal UI for conversing with AI in real-time. When you runqwen without arguments, you enter an interactive session where you can chat naturally, issue commands, and see AI actions unfold live.
Starting Interactive Mode
Key Features
Real-Time Streaming
The interactive UI streams responses as they’re generated, showing:- AI thinking and reasoning
- Tool calls being executed
- File edits with syntax highlighting
- Command outputs with proper formatting
Visual Feedback
- Tool Execution
- File Operations
- Subagent Activity
When AI executes tools, you see:
- Tool name and arguments
- Progress indicators for long-running operations
- Success/failure status with colored indicators
- Structured output formatting
Terminal Controls
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+C | Cancel current operation |
Ctrl+D | Exit session |
Shift+Tab | Cycle through approval modes |
Esc | Cancel pending slash command |
↑ / ↓ | Navigate command history |
Tab | Auto-complete commands and paths |
Vim Mode
Enable Vim-style keybindings for input:Escenters normal modei,a,oenter insert modeh,j,k,lfor navigationw,b,efor word movement
Session Management
Starting Fresh
/clear resets the conversation history and frees up context, but preserves your configuration and settings.Resuming Sessions
- List of recent sessions with timestamps
- Session descriptions (first user message)
- Fuzzy search to filter sessions
- Arrow keys to select, Enter to load
Exiting Gracefully
- Total session duration
- Number of turns
- Token usage statistics
Advanced UI Features
Debug Mode
Enable detailed logging:- API request/response details
- Tool execution traces
- Performance metrics
- Internal state changes
Stats and Monitoring
Theme Customization
- Light
- Dark
- High Contrast
- Solarized
- Custom themes via settings
Rich Formatting
The interactive UI renders:- Markdown
- Code
- Data Structures
- Headers and emphasis
- Code blocks with syntax highlighting
- Lists (ordered and unordered)
- Tables
- Blockquotes
- Links (not clickable, but visible)
Context Indicators
The footer displays:- Current approval mode (plan/default/auto-edit/yolo)
- Token usage (current/limit)
- Active model name
- Session ID
- Working directory
Press
Shift+Tab to cycle approval modes on-the-fly without opening the settings dialog.Accessibility
Screen Reader Support
Enable screen reader mode:- Announces AI responses
- Reads tool execution status
- Provides audio feedback for state changes
- Simplifies visual output for clarity
Keyboard Navigation
All features are keyboard-accessible:- Tab through interactive elements
- Arrow keys for list navigation
- Enter to confirm, Esc to cancel
- No mouse required
Performance Considerations
Large Outputs
The UI handles large outputs efficiently:- Virtual scrolling for long conversations
- Pagination for tool results
- Compression of old context
- Memory-efficient rendering
Memory Management
- Replaces old messages with summaries
- Preserves semantic meaning
- Reduces token usage
- Allows longer sessions
Troubleshooting
UI is slow or unresponsive
UI is slow or unresponsive
Try:
- Compress context with
/compress - Start a new session with
/clear - Reduce model token limits in settings
- Disable debug mode if enabled
Text is garbled or misaligned
Text is garbled or misaligned
- Ensure terminal supports UTF-8
- Resize terminal window
- Try a different theme with
/theme - Check for font issues
Colors not displaying correctly
Colors not displaying correctly
- Verify terminal supports 256 colors
- Try
export TERM=xterm-256color - Use high contrast theme
- Check terminal emulator settings
Keyboard shortcuts not working
Keyboard shortcuts not working
- Check for terminal keybinding conflicts
- Disable Vim mode if enabled
- Try alternative shortcuts
- Verify terminal emulator compatibility
Best Practices
- Use
/clearperiodically to free up context and maintain performance - Enable Vim mode if you prefer modal editing
- Customize your theme for optimal readability
- Use
/statsto monitor token usage and stay within limits - Leverage
/compressbefore hitting context limits - Resume sessions to continue previous work
- Use shortcuts to speed up common operations
Next Steps
Session Commands
Learn all available slash commands
Approval Modes
Control how AI tools are approved
Headless Mode
Run non-interactively for automation
Subagents
Delegate tasks to specialized agents
