Skip to content

AI Integration

Secondary Terminal is built for CLI-based AI workflows, not just general shell usage. It can detect supported agents automatically, show live status in each terminal header, render streaming output at high speed, and notify you when an agent completes processing.

Supported CLI Agents

AgentDetection triggerNotes
Claude CodeRun claudeWorks with file reference shortcuts and image paste on macOS.
Codex CLIRun codexStatus appears in the terminal header automatically.
Gemini CLIRun geminiRequires Gemini CLI v0.28.2+ for supported detection.
GitHub Copilot CLIRun copilotSeparate from Copilot Chat activation.

What Detection Changes

Once a supported CLI agent is detected, Secondary Terminal treats that terminal as an AI-aware workspace.

BehaviorWhy it matters
Real-time status indicatorSee whether the agent is connected, disconnected, or idle.
Fast rendering pathStreaming responses render with adaptive buffering up to 250fps.
Message routing supportThe active agent terminal can be targeted reliably by related workflows.

Agent Status Model

The extension distinguishes between actual runtime state and user intent. That means status changes only when an agent really starts or stops, not when you type an exit command.

StatusMeaning
ConnectedThis is the currently active CLI agent terminal.
DisconnectedThe agent is still running, but another terminal is the active agent.
NoneNo supported CLI agent is currently running in that terminal.

This is important if you keep several agents open at once. The most recently started supported agent becomes the active one, and older agents remain available as disconnected terminals instead of disappearing from the UI.

Performance for Streaming Output

Secondary Terminal switches to a more aggressive render path for AI output:

MetricStandard terminal modeAI-aware mode
Flush cadence~16ms~4ms
Approximate frame rate~60fpsup to 250fps
Rendering backendWebGL with fallbackSame backend, tuned for streaming

That reduces lag when an agent prints text continuously for several seconds.

Completion Notifications

When an agent completes processing, Secondary Terminal can notify you with toast messages inside VS Code and OS-native desktop notifications.

SettingDefaultDescription
secondaryTerminal.agentToastNotification.enabledtrueShows toast notifications for completion.
secondaryTerminal.agentToastNotification.cooldownMs10000Throttles repeated toasts.
secondaryTerminal.nativeNotification.enabledtrueShows OS-native notifications for completion.
secondaryTerminal.nativeNotification.activateWindowtrueOptionally brings VS Code to the foreground on completion.
secondaryTerminal.nativeNotification.cooldownMs10000Throttles repeated native notifications.

Example configuration:

json
{
  "secondaryTerminal.agentToastNotification.enabled": true,
  "secondaryTerminal.nativeNotification.enabled": true
}

File and Context Shortcuts

ActionShortcutResult
Insert current fileCtrl+Alt+L / Cmd+Alt+LSends the active editor path into the terminal.
Insert all open filesCtrl+Alt+A / Cmd+Alt+ASends all open editor paths.
Activate Copilot ChatCtrl+K Ctrl+C / Cmd+K Cmd+COpens GitHub Copilot Chat from the terminal workflow.

These shortcuts are especially useful when your agent expects file paths in the prompt rather than direct editor integration.

sh
# Terminal 1
claude

# Terminal 2
codex

# Terminal 3
copilot

Use Alt+1..5 or Cmd+Alt+1..5 to jump between active terminals. The header indicators show which terminal currently owns the connected AI status.

Released under the MIT License.