Skip to content

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

AgentDetectionStatus
Claude CodeAutomatic on claude commandReal-time connection indicator
Codex CLIAutomatic on codex commandReal-time connection indicator
Gemini CLIAutomatic on gemini command (v0.28.2+)Real-time connection indicator
GitHub Copilot CLIAutomatic on copilot or gh copilot commandReal-time connection indicator

How Detection Works

When you run a supported CLI agent, Secondary Terminal:

  1. Detects the agent from terminal output using pattern matching
  2. Shows status in the terminal header with a color-coded indicator
  3. Optimizes rendering -- switches from 60fps to 250fps adaptive buffering for smooth AI streaming
  4. Monitors state -- tracks whether the agent is active or disconnected

File Reference Shortcuts

Quickly send file references to your AI agent:

ActionShortcutResult
Current fileCtrl+Alt+L / Cmd+Alt+LInserts @filename with the current editor file path
All open filesCtrl+Alt+A / Cmd+Alt+AInserts all open editor file paths

Image Paste (macOS)

On macOS, you can paste screenshots directly into Claude Code:

  1. Take a screenshot (Cmd+Shift+4)
  2. Focus the terminal with Claude Code running
  3. 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.

SettingDefaultDescription
nativeNotification.enabledtrueShow OS-native desktop notifications
nativeNotification.activateWindowtrueBring VS Code window to foreground
nativeNotification.cooldownMs10000Minimum time between native notifications (ms)

Platform support:

PlatformNotificationWindow Activation
macOSosascript (Notification Center)AppleScript app activate
WindowsPowerShell ToastNotificationPowerShell SetForegroundWindow
Linuxnotify-sendwmctrl (install separately if needed)

Toast Notifications

Status bar messages inside VS Code:

SettingDefaultDescription
agentToastNotification.enabledtrueShow status bar toast notifications when an agent completes processing
agentToastNotification.cooldownMs10000Minimum time between toast notifications (ms)

Multi-Agent Workflows

Run different agents in different terminals:

  1. Open terminal 1 -- run claude
  2. Open terminal 2 -- run gemini
  3. Switch between them with Alt+1 / Alt+2 (or Cmd+Alt+1 / Cmd+Alt+2 on 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:

MetricStandardAI Agent Mode
Buffer flush interval16ms (60fps)4ms (250fps)
RenderingStandard xterm.jsWebGL-accelerated with auto-fallback
Scrollback2,000 lines2,000 lines (configurable)

Released under the MIT License.