Agent Shells
Launch and manage Claude, Codex, opencode, and Lore sessions in VS Code editor
terminals. Sessions open as tabs beside the open files, survive window reloads,
and come back with their titles and activity in a Secondary Side Bar view.
Features
- Native terminal sessions: Each agent runs in a real VS Code editor
terminal, so scrollback, wheel scrolling, and text selection behave exactly
as in a normal terminal. A new session opens as a tab in the active editor
group.
- Sessions survive reloads: Reloading the window reconnects the live agent
process. Quitting VS Code or closing the window ends the agent, and the next
launch resumes the same conversation in its original working directory. To
restart a session after its window closes, the extension sets
terminal.integrated.persistentSessionReviveProcess to
onExitAndWindowClose by default. VS Code applies this to every terminal,
and a value set in the user settings takes precedence.
- Live session view: The view in the Secondary Side Bar lists every active
session. A spinner shows while the agent works, and an attention icon shows
while it waits for an approval or input. A Claude session keeps its spinner
while a background shell, subagent, or Monitor watcher it started is still
running.
- Session order by drag and drop: Dragging one or more selected rows onto
another row moves them above that row when they move up and below it when
they move down. A drop on the empty space under the list moves them to the
end. The view keeps the order for the workspace across window reloads, and a
new session still opens at the top.
- Titles from the agent: Each row shows the title Claude, Codex, or
opencode gave the session. Until a title exists, the row shows a short form
of the first prompt.
- Prompt cache hint: An idle Claude or Codex session whose provider prompt
cache has probably expired gains a watch symbol in its title while the agent
icon stays, and its tooltip says so. Claude caches for 5 minutes or 1 hour
depending on the plan, and Codex for 30 minutes. The next message to an
expired session starts without that cache.
- Lore chat: Lore runs Claude Code as a chat over a personal wiki. When its
lore command is installed, Start Lore opens a Lore chat from any window,
with or without a folder open, and Past Sessions lists every Lore chat. The
lore command loads no Claude hooks, so a Lore chat's working and waiting
state comes from its transcript alone and an approval prompt shows no
attention icon.
- Custom agents: Add a launcher, such as a Claude container wrapper or any
other agent command, with the + button or the
agentShells.customAgents
setting. See Custom agents. A Claude or Lore custom agent
loads no Agent Shells hooks, so its working and waiting state comes from its
transcript alone and an approval prompt shows no attention icon.
- Past Sessions: Resume any previous Claude, Codex, opencode, or Lore
session from the history picker. The picker lists the sessions started in the
folders open in the window, or in any folder when the window has no folder
open. The
agentShells.pastSessionsFromEveryFolder setting lists the
sessions of every folder that still exists. A session resumes in the folder
where it started.
Remote Control runs a
Claude Code session on this machine that the Claude app or claude.ai/code
drives. A Remote Control session shows in the list. A session that a script
runs through the Claude Agent SDK or claude -p does not, and resumes only
by its pasted session ID. While a claude remote-control server runs, the
server and a resumed session both write to the same transcript, so a Remote
Control session is resumed after its server stops. The picker opens with the
list from the last load in the workspace and refreshes the rows while it is
open. The trash action hides an unwanted entry without touching provider
data. Pasting a session ID into the picker adds a Resume session ID row
that resumes that session from any folder and any agent, in the folder where
it started, including a Claude or Lore session started through the SDK. A
session that is already open in the window shows its tab instead.
- Dangerous mode: Option-click on the Claude, Codex, or custom agent
button, or on Past Sessions, starts or resumes the agent without approval
prompts and without the sandbox. A dangerous session shows a warning mark
before its title, also after a window reload. opencode and Lore have no
dangerous mode.
/usage dashboard: A terminal-style editor tab shows Claude and Codex
token usage from local provider records, refreshed every minute. Account
limits and credits need the separate status-line data in
Requirements.
- Full session control: Rename, close, interrupt, and copy session IDs from
the view. Ctrl+C interrupts the running agent. A second Ctrl+C within one
second closes the session. Option+Command+C copies all selected session IDs
from the view, or the active one while a managed terminal is focused.
- Read-only: The extension reads provider transcript stores and never
modifies them.
Requirements
Install VS Code 1.106
or newer on macOS or Linux. Session launch requires /bin/sh. Install and sign
in to each CLI through its official setup guide:
Claude Code,
Codex, or
opencode. Its command must be reachable from the
login shell. Provider service use requires that provider's account.
A Start button appears only for an agent CLI the login shell finds. After
installing a CLI, reload the window.
The installed Codex CLI must expose codex app-server daemon start for
protocol access. A terminal can launch without the daemon, but Codex attention
and protocol access remain unavailable.
For opencode history, the VS Code Extension Host must provide node:sqlite.
When the host does not provide it, opencode history is empty.
Account limits and credits in /usage require a separate status-line producer.
It must provide statusline-command.sh and statusline-cost-state.json in the
Claude configuration directory under the home directory. Agent Shells does not
install that producer. Without it, local transcript usage remains available,
but account fields without state show as unavailable.
Getting started
- Install Agent Shells from the Marketplace.
- Open the Secondary Side Bar from the View menu and select the Agent Shells
icon.
- Select the Claude, Codex, opencode, or Lore symbol to start a session. The
down-arrow button lists every installed agent, and the warning button on a
row starts that agent in dangerous mode.
- Open the view's
... menu and select /usage to open the usage dashboard.
Titles come from the agent. Use the pencil beside a session, or Agent Shells:
Rename Session, to set a manual title. A manual title is never replaced by
the agent's title.
Commands
| Command |
What it does |
Agent Shells: Start Claude |
Launch a Claude session in a terminal editor tab |
Agent Shells: Start Codex |
Launch a Codex session in a terminal editor tab |
Agent Shells: Start opencode |
Launch an opencode session in a terminal editor tab |
Agent Shells: Start Lore |
Launch a Lore chat in a terminal editor tab |
Agent Shells: Start Custom Agent |
Pick a custom agent and launch it in a terminal editor tab |
Agent Shells: Start Agent |
Pick any installed agent; the row's warning button starts it dangerously |
Agent Shells: Add Custom Agent |
Add a custom agent in five steps and reload the window |
Agent Shells: Start Claude (Dangerous) |
Launch a Claude session in dangerous mode |
Agent Shells: Start Codex (Dangerous) |
Launch a Codex session in dangerous mode |
Agent Shells: Past Sessions |
Open the history picker for previous sessions |
Agent Shells: Past Sessions (Dangerous) |
Open the history picker; the picked session resumes in dangerous mode |
/usage |
Open the usage dashboard from the view's ... menu |
Agent Shells: Rename Session |
Set a custom session title |
Agent Shells: Close Session |
End a session and remove its row from the view |
Agent Shells: Interrupt Active Session |
Interrupt the agent; a second Ctrl+C within one second closes the session |
Agent Shells: Copy Session ID |
Copy the selected provider session identifiers |
Settings
| Setting |
Default |
Description |
agentShells.pastSessionsFromEveryFolder |
false |
Folder scope of Past Sessions; see Features |
agentShells.experimentalCodexAttention |
true |
Show an attention icon while Codex waits for approval or input |
agentShells.customAgents |
[] |
Extra launchers; see Custom agents |
agentShells.experimentalRemoteSupervision and
agentShells.experimentalLocalWifiSupervision are experimental, unfinished,
and off by default. The development guide in the source repository describes
them.
Custom agents
The + button in the title bar adds a custom agent in five steps: command,
label, family, dangerous arguments, and icon. The button saves the entry in the
user setting agentShells.customAgents and reloads the window. Removing or
editing an entry happens in settings.json.
The setting adds launchers for commands that behave like claude or lore, or
run any command in a plain terminal. VS Code reads the setting from the user
settings, or from Remote settings in a remote window, never from workspace
settings. Each entry has these fields:
id: starts with a lowercase letter, then lowercase letters, digits, and
hyphens. claude, codex, opencode, and lore are reserved. The id is a
stable key. Changing it orphans the sessions saved under the old id.
label: the name shown in the picker and the view.
command: a bare command name found on the login shell PATH, or an absolute
path. Relative paths, spaces, and shell characters are rejected. The command
of a claude or lore agent must accept --session-id <id> and
--resume <id> like claude.
agent: claude, lore, or other. The first two select the session store
and transcript format the custom agent shares. other runs command with no
extra arguments in a terminal and lists no history, so the command needs no
--session-id or --resume support.
dangerousArguments: optional list of arguments appended in dangerous mode.
When absent, a claude agent uses --dangerously-skip-permissions plus
--settings with the sandbox off, and lore and other agents have no
dangerous mode. An empty list also means no dangerous mode. A dangerous start
of an agent without one shows a warning and starts nothing.
icon: optional absolute path to an SVG or PNG, used in both themes.
"agentShells.customAgents": [
{
"id": "clauded",
"label": "Claude (Docker)",
"command": "clauded",
"agent": "claude",
"icon": "/path/to/clauded.svg"
},
{
"id": "lored",
"label": "Lore (Docker)",
"command": "lored",
"agent": "lore",
"icon": "/path/to/lored.svg"
}
]
The first four agents get their own title-bar buttons, in setting order and
before the built-in buttons. The tooltip of each reads "Start Custom Agent N",
because VS Code gives extensions no way to change it. A button uses the agent's
icon, or the Claude, Lore, or terminal symbol of its agent family when the
agent has none. An icon change can need a full VS Code restart, because VS Code
caches icon images.
The down-arrow button lists every agent, so agents beyond the fourth start from
there. Right-click a title-bar button and select Hide to remove it from the
bar. A hidden custom slot follows the slot position, not the agent: after the
setting order changes, the hidden slot holds another agent.
Agent Shells: Start Custom Agent shows in the Command Palette whenever the
setting holds a valid entry. It starts the only configured agent directly; with
more than one, it opens a QuickPick. A missing command fails in its terminal
like any shell command. A keybinding starts one directly through the command
argument:
{
"key": "cmd+alt+d",
"command": "agentShells.createCustomAgentSession",
"args": "clauded"
}
A session a custom agent starts stays listed under that agent. Other Claude and
Lore sessions stay with Claude and Lore. A settings change needs a window
reload. Removing an entry hides its sessions from the restored session list and
lists its transcripts under Claude or Lore in Past Sessions until the entry is
added back.
Privacy
Agent Shells runs locally. It reads Claude, Codex, opencode, and Lore
transcript stores on the local machine and modifies only its own extension
state. The extension itself makes no external calls; the agent CLIs connect to
their own services under the user's accounts.
License
MIT