Free & open-source extension

A real terminal anywhere in VS Code & Cursor

Portaterm puts a real terminal in the sidebar, secondary sidebar, bottom panel, or an editor tab. Split it, tab it, theme it — and use it as a home base for your AI coding agents.

ext install mhd.portaterm
  • Claude Code
  • Codex
  • OpenCode
  • Cursor

8,200+ downloads · MIT licensed · macOS, Linux & Windows

Portaterm in a VS Code sidebar: three terminal tabs, a hover preview of a source file opened from a path in the terminal output, and the embedded file tree below.

Put the terminal where you want it

Drag the Portaterm view to any of four places. Each location remembers its own tabs and state.

  • Primary sidebar

    Right next to the Explorer — a place the built-in terminal can't go.

  • Secondary sidebar

    Keep an agent running on the right while you edit on the left.

  • Bottom panel

    Where a terminal usually lives, now with tabs, split panes, and a file tree.

  • Editor tab

    Full size, beside your files, in any editor group.

Features

  • A real terminal

    node-pty backed with full shell support, WebGL rendered, and follows your dark, light, or high-contrast editor theme.

  • AI Coding Vault

    Preview Claude Code, Codex, OpenCode, Cursor CLI, and Cursor IDE history in one panel, and continue supported sessions.

  • AI-CLI aware

    Clickable file paths, syntax-highlighted hover previews, and pasted-image previews in agent output.

  • Tabs & split panes

    Recursive splits with drag-to-resize. Zoom one pane to the full tab, broadcast your typing to every pane at once, and give each tab a color and an icon. Close the active tab with Cmd+W.

  • Survives reloads

    Shells stay alive across window reloads; after a full restart, scrollback, tab titles, cwd, and layout come back. Tabs that were running Claude Code pick up their conversation where it left off.

  • Find & export

    Search the scrollback with Cmd+F. Save the full scrollback or any single command's output to a file, ANSI-stripped or raw.

  • Know which agent needs you

    A tab's status dot turns yellow when Claude Code or Cursor Agent waits for an approval, purple for an answer, and blue when a turn finished while you were elsewhere. The view icon counts waiting tabs, a status bar entry counts every agent in the window and jumps to the one that needs you, and notifications are opt-in.

  • Embedded file tree

    Git decorations, live filesystem sync, and search. Drag a row into a pane to insert its path, Shift-drop files from the Explorer or Finder (macOS), or right-click a file or editor tab → Insert Path in Portaterm. Paths are quoted for that terminal's shell.

AI Coding Vault

Every agent session, in one panel.

Claude Code, Codex, OpenCode, and Cursor all keep their history in different places. The Vault surfaces them together, with each tool's supported actions.

  • Preview first, then act. Click a row to preview it, double-click to resume it. Resume works for Claude Code, Codex, and OpenCode sessions; Cursor Resume is available for validated CLI chats.
  • No duplicate agents. A Tab mark shows which sessions are open in a terminal and moves them to the top, and names what the agent is doing — running, approve, answer, or done — in the tab dot's colour. Resume brings that tab forward instead of starting a second agent.
  • Rename once. Renaming a session renames the tab running it, and the other way round. A tab's color and icon show on its row too, and come back when you resume it.
  • Star and tag. A star stays across restarts and keeps the session near the top of its group; tags show as #tag chips you can search or click to filter. Both are kept by Portaterm, never written into an agent's files.
  • Starts with this folder. The list is scoped to the active terminal's folder by default — Show all sessions is one click away.
  • Group your way — Recent, Agent, or Folder. Sessions in a pinned tab lead their group, then your starred ones.
  • Start an agent from its group. Hover an agent's header and press + to start a new session — in the active tab if it is an untouched shell, otherwise in a new one.
  • Right-click for more: resume, reveal in Finder, copy the resume command. The gear next to search opens Portaterm's settings.

The Vault reads each tool's own local store. Nothing is sent off your machine.

How to browse and resume agent sessions →

The AI Vault panel grouped by agent, listing recent Claude Code, Codex, OpenCode, and Cursor Agent sessions with their folder and age.

Session preview

The whole story, without leaving the terminal.

  • First prompt, a timeline of tool and sub-agent steps, the latest reply, and activity stats.
  • Token use with a per-model breakdown on hover, and cost where the agent records one.
  • Sub-agents render as nested, highlighted blocks — including Codex threads and Cursor tasks.
  • Questions the agent asked you show your answer and every option.
  • Export the timeline as a Markdown file to share with your team or paste into a PR.
  • A movable floating window that remembers its size and position.
A floating session preview showing a conversation's first prompt, a timeline of tool steps, and message, token, and tool counts.

Made for AI coding CLIs

Agents flood the terminal with paths, diffs, and image attachments. Portaterm makes that output navigable.

  • Clickable paths

    Opens src/foo.ts:42:7, line ranges, tracebacks, Windows paths, and wrapped Claude/Codex output at the right line.

  • Hover to preview

    Syntax-highlighted previews with line numbers. Dotfiles and sensitive folders stay closed unless you hold Cmd/Ctrl. One setting turns previews off.

  • Pasted images

    Hover an [Image #N] placeholder to see what you actually attached — captured locally at paste time.

Get started

  1. Install Portaterm from the VS Code Marketplace, or from Open VSX for Cursor, Windsurf, Antigravity, VSCodium, and other compatible editors.
  2. Click the Portaterm icon in the Activity Bar — a session starts automatically.
  3. Drag the view to any sidebar, panel, or editor group. Add tabs or split panes from the title bar.
  4. Open the AI Vault from the panel header to browse and continue your agent sessions.

Requires VS Code 1.105+ or Cursor 3.2.21+, on macOS, Linux, or Windows. Installs alongside AnyWhere Terminal without conflicts.

Learn more

Frequently asked questions

What is Portaterm?

Portaterm is a free, open-source (MIT) extension for VS Code and Cursor. It puts a real terminal in the primary sidebar, secondary sidebar, bottom panel, or an editor tab, and adds an AI Coding Vault that previews and resumes Claude Code, Codex, OpenCode, and Cursor sessions.

How do I put a terminal in the VS Code sidebar?

Install Portaterm and click its icon in the Activity Bar: a terminal session starts in the sidebar. Drag the view to the secondary sidebar, the bottom panel, or an editor group to move it there. VS Code's built-in terminal cannot live in the sidebar. Step-by-step guide →

Does Portaterm work in Cursor, Windsurf, or VSCodium?

Yes. Portaterm is published to Open VSX, so Cursor, Windsurf, Antigravity, VSCodium, and other VS Code-compatible editors can install it by searching for Portaterm. It needs VS Code 1.105+ or Cursor 3.2.21+, on macOS, Linux, or Windows.

How do I resume a Claude Code session in VS Code?

Open the AI Vault from the Portaterm panel header, or run Portaterm: Open AI Vault. Click a session to preview it and double-click it to resume. Resume works for Claude Code, Codex, and OpenCode sessions. For Cursor, only validated Agent CLI chats can be resumed; Cursor IDE entries are preview-only. Step-by-step guide →

Does the AI Vault send my sessions anywhere?

No. The Vault reads each tool's own local store, and nothing is sent off your machine. Stars, tags, and custom names are kept by Portaterm in VS Code's storage and are never written into an agent's files.

Is Portaterm free?

Yes. Portaterm is free and open source under the MIT license, and its source code is on GitHub.

Can I install Portaterm next to AnyWhere Terminal?

Yes. Portaterm is a fork of AnyWhere Terminal by Huy Bui Dac, but it uses its own extension ID (mhd.portaterm) and settings namespace (portaterm.*), so both can be installed side by side.

Do my terminals survive a window reload or restart?

Shells stay alive across window reloads. After a full restart, scrollback, tab titles, working directory, and layout come back, and tabs that were running Claude Code resume their conversation. The shell process itself does not survive a full restart. How session restore works →