Skip to main content
All posts

Agents that drive the window

Every Claude Code tab Clave starts is connected to the app over MCP. The agent in it can open tabs, show a file, pin a page, talk to another tab, and ask for a secret it never reads.

A sidebar of grouped tabs with a side panel open, in deep reef green.

Clave runs coding agents in tabs. A Claude Code tab also gets something the agent can use: a connection to an MCP server inside Clave itself. Through it, the agent can act on the window it runs in, much as a person does with the mouse.

The server exposes 23 tools, all named clave_*. Clave connects the Claude Code sessions it starts, in the terminal and in the chat view, by handing each one its own config file and token. Codex, Antigravity and Pi tabs are not connected yet: another tab can message them and read their output, but they cannot call the tools.

Tabs and groups

clave_open_session opens a new tab: Claude Code, Codex, Antigravity, Pi or a plain terminal, in any directory, with an optional first prompt and model. Other tools close, move, rename and focus tabs, and create groups. clave_add_group_terminal adds a saved command to a group, such as a dev server, and clave_launch_group starts a pinned .clave template.

clave_list shows what is open: windows, tabs, groups and pinned templates. An agent addresses any tab by its session id or its name, and Clave routes the call. What it opens lands in its own window unless it names another.

What the person sees

  • clave_open_side_panel opens a document the agent drafted in an editor beside the tab, for the person to review and change. clave_side_panel reads it back, updates it and sends it.
  • clave_open_file opens a file in a tab; an HTML file renders live.
  • clave_set_group_view and clave_set_session_view pin a web view to a group or to a tab: a dashboard, a preview, a dev server.
  • clave_notify tells the person that long work has finished.
  • clave_offer_copy puts a copy button in front of them, with the exact bytes the agent produced.

Tabs that talk to each other

clave_send_to_session sends a message to another tab. The target parent reports back to the tab that opened this one. clave_read_session reads a tab’s recent output without interrupting it. Together they let one agent split work across parallel tabs and collect the results itself.

clave_switch_account moves a tab to another account, and clave_switch_workspace brings another workspace into view when the person should look at it.

A secret the agent never reads

Agents often need a key. The usual path is to paste it into the chat, where it stays in the transcript for as long as the transcript exists.

clave_request_secret is the other path. The agent describes what it needs and why, and names what should happen with the value: run a command, or write it into an env file. Clave shows the person that description and the exact action, with a masked field. The person types the value there, and nowhere else.

The value never comes back to the agent. For a command, it is injected as an environment variable that the command refers to by name, and the output returns with the secret redacted. For an env file, Clave writes the KEY=value line itself, with no shell. If the person has not answered yet, the agent gets a pending status and asks again with clave_secret_result.

The clave plugin

The tools say what an agent can do. The clave agent plugin adds two skills that put them to work:

  • /clave:create-workspace writes a .clave workspace file: groups, sessions, terminals, toolbar actions and icons.
  • /clave:recover-sessions rebuilds lost tabs and groups from the Claude Code transcripts already on disk, with their history.

Install it with npx plugins add antasphere/clave.

Workspaces you can share

A group can be pinned to a .clave file, and that file can be committed beside the code. Clave discovers nested .clave files as templates. A teammate keeps a personal copy: Clave reads {workspaceId}.clave first and falls back to default.clave, so one person can change their layout without touching anyone else’s.

More from the journal

  • A chat transcript and a terminal side by side, in reef green. release

    Clave 2.0: a chat view beside the terminal

    Clave 2.0.0, released on 30 September, opens Claude Code and Codex in a native chat view, holds several accounts per agent, and runs plugins that shape the app.

    Luca Derumier

  • An installer window on a pale reef green ground. windows

    Clave on Windows, early

    Since v1.89.0 every Clave release carries a Windows installer. What works on Windows today, what does not yet, and what the first install looks like.

    Luca Derumier

All posts