Skip to content

Embedded terminal panel inside Claude Code session #24

@dougss

Description

@dougss

Today, running dev servers (pnpm dev, npm start) requires creating a separate Shell session and switching between sessions with Cmd+1/Cmd+2. Pain: visual context switching when both are needed simultaneously (e.g., reading Claude's output while watching dev server logs).

Proposal: embedded terminal panel inside Claude Code sessions (similar to VS Code integrated terminal):

  • Toggle via shortcut (Cmd+J? Cmd+`?)
  • Split horizontal: Claude on top, terminal panel on bottom
  • Resizable divider between Claude and terminal
  • Terminal runs zsh -il in session.cwd (same as standalone shell sessions)
  • Persist toggle state per session (showing/hidden)
  • Persist split ratio in LocalStorage

Trade-offs:

  • More UI complexity (2 PTYs per session when terminal visible)
  • Need to handle focus management (Tab navigation between Claude and terminal)
  • Shell session type still useful for terminal-only contexts

Implementation considerations:

  • New PTY only spawned when user toggles ON (lazy)
  • xterm.js instance per terminal panel
  • DECK_SESSION_ID injected to embedded terminal too (consistency)
  • Branch switcher and Open in IDE work on session.cwd, no change

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions