Using with AI Agents
Secondary Terminal is designed to work seamlessly with CLI-based AI agents. It auto-detects running agents and optimizes the terminal experience for AI-assisted workflows.
Supported Agents
| Agent | Detection | Status |
|---|---|---|
| Claude Code | Automatic on claude command | Real-time connection indicator |
| Codex CLI | Automatic on codex command | Real-time connection indicator |
| Gemini CLI | Automatic on gemini command (v0.28.2+) | Real-time connection indicator |
| GitHub Copilot CLI | Automatic on copilot or gh copilot command | Real-time connection indicator |
How Detection Works
When you run a supported CLI agent, Secondary Terminal:
- Detects the agent from terminal output using pattern matching
- Shows status in the terminal header with a color-coded indicator
- Optimizes rendering -- switches from 60fps to 250fps adaptive buffering for smooth AI streaming
- Monitors state -- tracks whether the agent is active or disconnected
File Reference Shortcuts
Quickly send file references to your AI agent:
| Action | Shortcut | Result |
|---|---|---|
| Current file | Ctrl+Alt+L / Cmd+Alt+L | Inserts @filename with the current editor file path |
| All open files | Ctrl+Alt+A / Cmd+Alt+A | Inserts all open editor file paths |
Image Paste (macOS)
On macOS, you can paste screenshots directly into Claude Code:
- Take a screenshot (
Cmd+Shift+4) - Focus the terminal with Claude Code running
- Paste with
Cmd+V
The image is sent directly to the AI agent.
OS-Native Notifications (v0.3.4+)
Desktop notifications that work even when VS Code is not in the foreground. When an AI agent completes processing, you'll get an OS-level notification and optionally VS Code will be brought to the front.
| Setting | Default | Description |
|---|---|---|
nativeNotification.enabled | true | Show OS-native desktop notifications |
nativeNotification.activateWindow | true | Bring VS Code window to foreground |
nativeNotification.cooldownMs | 10000 | Minimum time between native notifications (ms) |
Platform support:
| Platform | Notification | Window Activation |
|---|---|---|
| macOS | osascript (Notification Center) | AppleScript app activate |
| Windows | PowerShell ToastNotification | PowerShell SetForegroundWindow |
| Linux | notify-send | wmctrl (install separately if needed) |
Toast Notifications
Status bar messages inside VS Code:
| Setting | Default | Description |
|---|---|---|
agentToastNotification.enabled | true | Show status bar toast notifications when an agent completes processing |
agentToastNotification.cooldownMs | 10000 | Minimum time between toast notifications (ms) |
Multi-Agent Workflows
Run different agents in different terminals:
- Open terminal 1 -- run
claude - Open terminal 2 -- run
gemini - Switch between them with
Alt+1/Alt+2(orCmd+Alt+1/Cmd+Alt+2on Mac)
Each terminal independently tracks its agent status. Session persistence ensures you can pick up where you left off after restarting VS Code.
GitHub Copilot Chat Integration
Activate GitHub Copilot Chat directly from the terminal:
- Shortcut:
Ctrl+K Ctrl+C/Cmd+K Cmd+C - Setting:
enableGitHubCopilotIntegration(default:true)
This sends the current context to Copilot Chat in #file: format.
Performance
AI agent rendering is optimized for high-throughput output:
| Metric | Standard | AI Agent Mode |
|---|---|---|
| Buffer flush interval | 16ms (60fps) | 4ms (250fps) |
| Rendering | Standard xterm.js | WebGL-accelerated with auto-fallback |
| Scrollback | 2,000 lines | 2,000 lines (configurable) |