The agent inside the tab
For agents
The agent in a tab can arrange the window around its work. Clave runs an MCP server on your machine, and the Claude Code sessions it starts are connected to it: from inside its tab, an agent can open the next one, pin the page it is building, talk to a sibling, and ask you for a key it never sees.
How a session is connected
Nothing to configure: the tab arrives with its way into the app.
Clave runs an MCP server on 127.0.0.1 while it is open. When it starts a Claude Code session, in the terminal or in the chat view, it writes that session a small config file with its own token and passes it on the command line. The server knows which tab is calling from the token, so an agent can say “mine” for its own tab or group, and one tab cannot pass itself off as another.
# once, for the skills
npx plugins add antasphere/clave
# then the agent calls the app
clave_open_session
cwd: ~/work/atelier-nord groupId: mine
prompt: "Verify lane A against the brief"
clave_set_group_view
groupId: mine url: http://localhost:4720
clave_send_to_session
sessionId: parent message: "Lane A ready for review" Where it lands. Whatever the agent opens goes into its own window unless it names another window or workspace. Any tab is addressed by its id or its name, and Clave routes the call.
It survives a restart. Clave keeps the same port and the same tokens across restarts, so a tab still running after the app relaunches keeps its tools. If the port is taken, Clave says which tabs need restarting.
Pi is reached, not reaching. A Pi tab can be messaged and read by other tabs, but does not call these tools itself.
The tools
What you can do to the window, an agent in a tab can do too.
Twenty-three tools, grouped by what they act on. The descriptions here are short; the full ones, which the agent reads, live in the app’s source.
Tabs and groups
-
clave_listThe open windows, the workspaces, every group and tab, the pinned templates, and which tab is yours. -
clave_open_sessionA new tab: Claude Code, Codex, Antigravity, Pi or a plain terminal, in any folder, with an optional prompt and model, in the terminal or the chat view. -
clave_create_groupA new, empty group in the sidebar. -
clave_launch_groupStart a pinned group from a .clave file: all its sessions and its saved terminals at once. -
clave_add_group_terminalAttach a saved shell command to a group, such as a dev server, re-runnable on click. -
clave_move_sessionMove a tab into a group, out of it, or into another window. -
clave_renameRename a group or a tab. -
clave_focusBring a tab to the foreground. -
clave_close_sessionClose a tab and end its process.
Views and files
-
clave_set_group_viewPin a web page to a group: what you see when you click the group, instead of the tiled sessions. -
clave_set_session_viewPin a web page to a single tab, optionally with the command that serves it. -
clave_open_fileOpen a file as a tab for you to read; an .html file renders as a live page. -
clave_open_side_panelOpen a Markdown or HTML file, or an email, in an editor beside the agent’s own tab, for you to edit. -
clave_side_panelRead and update what is open in that panel; prepare an email, and send it only on your word.
Messages between tabs
-
clave_send_to_sessionType a message into another agent’s tab, under a header naming the sender; sent to its own tab, it logs a checkpoint. -
clave_read_sessionRead the last lines of any tab without interrupting it.
The person at the keyboard
-
clave_notifyA system notification when long work is done; clicking it opens the tab. -
clave_request_secretAsk you for a key or a token without it entering the conversation. -
clave_secret_resultFetch the outcome of a secret request you have not answered yet. -
clave_offer_copyPut a copy button in the tab’s header, holding the exact bytes of a value the agent produced.
The window
-
clave_open_windowOpen another Clave window, on the same workspace or a different one. -
clave_switch_workspaceSwitch the agent’s window to another workspace. -
clave_switch_accountMove a Claude or Codex tab to another account, the conversation resumed.
The secret
The agent asks for the key. You are the one who types it.
An agent that needs an API key calls clave_request_secret with a sentence saying what it needs and why, and the exact action to take with the value. You see both in Clave, with a masked field. The value goes where the action says, and never into the conversation.
# injected into one command, as an environment variable
clave_request_secret
description: "The Stripe test key, to set it on the repo"
action: { type: run, cwd: ~/work/shop,
command: gh secret set STRIPE_KEY --body "$SECRET" }
# or written straight into the file it belongs in
clave_request_secret
description: "The Resend key for local email"
action: { type: env-file, file: ~/work/shop/.env,
key: RESEND_API_KEY } For one action.
A run action must refer to the secret by its variable, $SECRET by
default; Clave refuses a command that does not. It runs the command in your login shell with
the value in that one process’s environment, and returns the output with the value blanked out.
Or into a file.
An env-file action has Clave write KEY=value into the file itself,
adding the line or replacing it, with no shell involved.
Never back to the agent. The agent gets the outcome: done, failed, or dismissed. Not the value. Clave does not store it on the request or write it to its logs.
In your own time.
The call waits thirty seconds by default, then answers “pending” with a request id; the agent
polls clave_secret_result until you have answered. An unanswered request expires
after ten minutes.
The plugin
Two skills that know the app from the inside.
The clave plugin lives in the app’s own repository, so the skills and the .clave format they write always ship together. It installs into Claude Code, Cursor and other hosts that read the open plugin format.
/clave:create-workspace
Write the workspace file
Creates or edits a .clave file: the groups, their sessions and saved terminals, the toolbar actions, the icons and colours. Clave picks the file up as a template you launch in one click.
/clave:recover-sessions
Bring lost tabs back
After a crash or a closed group, it scans the Claude Code transcripts on your disk, works out which project each session belonged to, and reopens them as grouped tabs with their history.
npx plugins add antasphere/clave
# or, in Claude Code
/plugin marketplace add antasphere/clave
/plugin install clave@clave From your own tools
The surface our own tools use is the one yours get.
Antasphere’s delivery runs on it. In Exos, a lane is one Clave tab; a wave is a coordinator tab that opens one tab per lane, pins each lane’s page beside it and messages the lanes as they work. Exos knows Clave only through these tools, and Clave knows nothing about Exos.
Outside a tab, Clave writes its address and a token to mcp-server.json in its app data
folder, readable by you alone. A script on the same machine can connect with them and call the same
tools, without a tab of its own: the tools that act on the calling tab, such as the copy button,
need a tab’s token.