Coding agents in Kyon
Kyon runs the coding agents you already use (Claude Code, Codex, Gemini, OpenCode and pi) in its terminals, and adds a toolbar, notifications, an overview of every agent, turn reviews and tools the agent can call. Kyon's own agent has its own chapter: Kyon's agent.
Starting an agent
A new agent tab opens in the folder you choose, on this machine or on a host.
- Open the new-session menu with the new-tab button, or press ⌃⌘T.
- Highlight Claude Code, Codex, Gemini, OpenCode or Pi. A panel beside it lists Local, each saved host and Manage targets…. Press → to move into it, or click a place. The place you used last is highlighted.
- Choose the directory. It's prefilled with the directory of the pane in front, or the host's own directory. The first row, Launch … in …, starts the agent there.
To start somewhere else, type a path:
- Kyon lists the folders in the directory typed so far, read from the host when you're on one. Tab completes into the first. Moving past the last one with the arrow keys or scroll wheel shows more.
- Directories you used before on that machine are marked used before.
- On this machine, Browse… opens the system's folder chooser.
The agent's command is typed into the tab's own shell, so it gets your PATH and shell setup, and the shell remains when the agent exits. Session › Claude › Claude: Start session also opens Claude Code in the directory of the session in front, or switches to the tab where it already runs in that folder.
How Kyon recognises an agent
Any terminal becomes an agent tab when an agent runs in it, including one where you typed claude yourself. Kyon checks the program in the terminal's foreground, whatever alias or wrapper started it and including in a terminal kept running while Kyon restarts, and the command your shell reports it ran. It knows several other agents by name too, such as Amp, Copilot, Cursor and Goose. To treat a command of your own as an agent, add a pattern to Commands that enable the toolbar.
The command set under Launch Claude Code with (and its like for each agent) counts too: typing it starts that agent as surely as its own name does.
An agent you started yourself comes back when Kyon restarts, as one chosen in the menu does, once it has named its conversation, which Kyon's plugin reports. Kyon starts it again with the program and options you typed, along with any variables you set in front of it, or, where it was recognised some other way or the line was more than one command, with the command its Launch … with setting gives. What you asked it on that line, a prompt in quotes, is not asked again.
Resume a Claude session in the palette lists the archived Claude Code sessions for the repository you are in, and opens the one you pick in a new tab. The sessions are those of the machine the window is pointed at: with a terminal on a host in front, Kyon asks the host for the sessions archived there, which takes a moment to arrive, and the one you pick goes on in a terminal on that host, in the folder it ran in, started the way the host's Launch Claude Code with setting says. The list comes from the remaimber archive, which has to be installed on the machine whose sessions are listed; without it the list says so. If Claude is already running in that folder on this machine, its tab is brought forward instead; another worktree of the same repository is a different folder. A session whose folder has since been removed is not started anywhere else: Kyon says the folder is no longer there.
Recognition says which agent it is. What it is doing comes from Kyon's plugin or hooks: see Connecting an agent to Kyon. Until the plugin first reports, or Kyon sees the agent's own program running in the terminal, the agent's mark beside the tab is drawn faintly, since what is running may still be a script that starts the agent rather than the agent itself. A terminal kept running while Kyon restarts is the exception: an agent Kyon launched there is shown as running even where its command is your own wrapper that keeps the agent's program out of sight.
A picture pasted into a pane where an agent is running, a screenshot say, goes to the agent: here it reads it from the clipboard itself, and on a host it is saved there and its path typed in. Where Kyon knows of no agent running, the picture is not pasted, and the pane says so.
The agent toolbar and Rich Input
While an agent runs, a toolbar along the bottom of its terminal keeps common actions one click away:
- + chooses a file and puts its path in your prompt, unsent.
- File explorer docks the file tree beside the panes.
- Rich Input ⌃G opens or hides Rich Input.
- Terminal opens a shell below the agent in its directory, a fifth of the height. Click again to close it.
- On the right: the working directory, and a gear for Settings › Agent › Third party CLI agents.
Rich Input
Rich Input lets you write a prompt in Kyon's editor and send it when it's ready. Press ⌃G while the toolbar shows.
- ↩ sends; ⇧↩ or ⌥↩ adds a line. Submit Rich Input with Ctrl+Enter swaps this to ⌃↩.
- Paste pictures to attach them, up to 20 a prompt; each is saved where the agent runs and named in the prompt.
- ! typed first switches to the agent's shell mode where it has one.
- Esc or ⌃G closes it and keeps your draft.
The prompt is typed in the way each agent expects, so several lines arrive as one prompt. With the plugin installed, Rich Input can follow the agent's status: out of the way while it asks you something, back while it works or when it's done. Closing it by hand stops that until the agent starts again.
Knowing when an agent needs you
You can run several agents and let Kyon tell you which ones are waiting.
Status and the blue dot
A connected agent's tab shows its status: Ready, In progress, Done or Blocked. A tab waiting on you (an agent asking something, an answer you haven't read, or a bell) carries a blue dot in the tab bar and the vertical list. Settings › Appearance › Layout offers Show how long an agent has been in its state and Sort tabs by agent status.
Notifications
When an agent finishes or needs permission in a tab you aren't looking at, a notice appears in the window; click it to go there. While Kyon isn't in front, a desktop notification says what was asked and how the answer ends, and clicking it brings you to the pane. In Settings › System, under Notifications, turn on Receive desktop notifications from Kyon (off by default), then choose Notify when an agent completes a task and Notify when a command or agent needs your attention to continue. Show in-app agent notifications controls the notices in the window.
Every agent at once
The overview lists every coding agent and Kyon agent conversation in every window: first those asking you something, then finished and unread, finished, working and ready. Each row shows the agent, its folder and what it is asking or last said.
| Command | Keys | What it does |
|---|---|---|
| Show every agent, the ones waiting for you first | ⌘⌥A | Opens the overview over the window. Type to filter, ↩ to go to an agent in any window. |
| Dock the agents beside the panes | View menu | Keeps the overview beside your work. |
| Go to the next agent waiting for you | ⌘J | Goes to the next agent asking or with an unread answer, cycling through them. |
The Dock icon shows how many agents are waiting for you.
Sending context to an agent
Hand an agent what you're looking at without copying it. Press ⌘⌥↩ (Send to agent: the selection, the file or the commands chosen):
- A selection in a file goes with its path and line numbers.
- A file with nothing selected goes as its path, for the agent to read.
- Commands chosen in a terminal (⌘↑/⌘↓) go with their output.
It goes to the agent working closest to that file, in this tab first, or the only agent in the tab or window. Kyon switches to it with the text in its prompt, unsent, so you can add your question.
Connecting an agent to Kyon
Connecting lets Kyon see what an agent is doing and gives it Kyon's tools. Status, notifications, the overview's ordering and turn reviews depend on it.
- Claude Code, Codex and pi use Kyon's plugins, published together in one public repository and installed by each agent's own command line. Where your setup copies Claude Code's plugins into Codex, the copy reports for Codex too. Where a command called
claudeearlier on your path wraps Claude Code with plugins of its own, Kyon passes over it and installs with Claude Code's own command line: the firstclaudeon your path, or in~/.claude/local, that can list its plugin marketplaces. - Gemini and OpenCode use hooks Kyon writes beside their own settings.
When an unconnected agent runs, Kyon offers once per machine and run, here or on a host, where the agent keeps its settings: Enable notifications for Claude Code, Connect for the others, and Update (Update Kyon plugin for Claude Code) when what is installed is older than this build needs. A plugin on this machine that is out of date is offered as an update when Kyon starts, whether or not its agent is running, since one too old to report leaves its agent's tabs looking like plain terminals. Later, use Session › Every Agent › Connect the agent in front to Kyon: its status, and Kyon's tools.
| Agent | To finish installing |
|---|---|
| Claude Code | Run /reload-plugins. |
| Codex | Run /hooks to trust the Kyon plugin's hooks, then start Codex again. |
| pi, Gemini, OpenCode | Start the agent again. |
Outside Kyon the plugin offers no tools, so the agent reports nothing broken. The same goes for an agent in a shell that kept running while Kyon was closed: it has no Kyon tools while Kyon is closed, and they come back by themselves within a few seconds of Kyon opening again, after an update too, without reconnecting the agent.
Kyon's tools for agents
A connected agent can show you things in Kyon's window. Each terminal has its own token, so Kyon knows which agent called. When an agent connects, Kyon tells it to show you what it made or found with open_file rather than describing it, so you need not ask.
| Tool | What it does |
|---|---|
open_file | Shows a file beside the agent, the keys staying with the agent: a picture (PNG, JPEG, GIF, WebP or SVG) in the image preview, a Markdown document rendered, anything else in the editor, optionally at a line. The file is read on the machine the agent runs on, a server included. A file that isn't there is refused, and the agent is told why. |
show_message | Shows you a short message. |
recent_commands | Reads what was run in the tab's other terminals, with output; secrets masked where redaction is on. |
propose_change | Shows a new version of a file in the review, to accept, edit or reject. |
settings | Reads how Kyon is set up: where the settings file and its schema are, what a setting is for and takes, with examples, and what it is set to now. It changes nothing: to change a setting, the agent edits the settings file, asking as it would for any other file, and Kyon reads the file again when it changes. A value that may be a credential, such as an endpoint's extra header, is left out. |
ask_private_agent | Asks Kyon's private agent, which answers in words and changes nothing. You're asked first, per Ask before a private answer goes to a coding agent in Settings › Agent › Agent. |
A proposed change is written to the file at once, and the review beside the agent shows it against what was there. Edit it in the editor if you like, then press [ Accept ] to keep the file as it now is, or [ Reject ] to put back the original (also Session › Proposed Changes). Closing the review, or five minutes without an answer, rejects it. On a host, the host's file is changed.
Reviewing what a turn changed
See exactly what the agent's last turn did, not what changed before it or since. Kyon keeps the working tree as you ask and again as the agent answers, in a git repository here or on a host.
- Press ⌘⌥⇧J (Review the agent's last turn); while the agent works, the turn before is shown.
- Or turn on Review each turn's changes to open the review by itself whenever a turn changes files.
Comment on lines, then click Send to Agent: the comments go into the prompt of the agent that made the turn, for you to read and send.
Use agent and asking on the side
Use agent brings Kyon's agent into a command that is still running: press ⌘⇧↩. It reads what the program shows and types into it, asking first. Show "Use Agent" footer in Settings › Agent › Agent shows the offer under running commands.
To ask a question without interrupting a coding agent or spending its context, press ⌘⌥I (Ask on the side, beside the coding agent in front). Kyon's agent opens beside it, told what the agent was last asked and answered, and leaves changing files to it.
Agents that keep running
Quitting with tabs open asks first, offering Keep Shells and Quit. With Keep shells running on (Settings › Terminal › General), shells and the agents in them go on after a quit or crash, and each pane returns to its shell. Where a shell didn't survive, an agent Kyon launched, or whose plugin named its conversation, is started again in that conversation. One you ended is not.
The conversation is looked for where the agent keeps them, honouring CLAUDE_CONFIG_DIR, CODEX_HOME, PI_CODING_AGENT_DIR and PI_CODING_AGENT_SESSION_DIR where your shell sets them. Claude Code keeps conversations by folder: if the one to go back to belongs to the folder the agent last reported rather than the one the shell came back in, Kyon starts it from that folder. If no conversation is found, or Claude Code keeps it under some other folder and so would not go back to it from here, Kyon says so in the terminal and starts a new one.
On a host, sessions outlive the connection, so an agent keeps working while you're away. See Remote hosts.
The Third party CLI agents page
Settings › Agent › Third party CLI agents (or the toolbar's gear) holds:
- Review each turn's changes: open each turn's review by itself.
- Show coding agent toolbar, and under it Auto show/hide Rich Input based on agent status (needs the plugin), Auto open Rich Input when a coding agent session starts, Auto dismiss Rich Input after prompt submission, Submit Rich Input with Ctrl+Enter and Commands that enable the toolbar.
- Launching on this machine: Launch Claude Code with and the same for Codex, Gemini, OpenCode and Pi, a program and fixed arguments placed before the agent's own. Empty uses the agent's command.
See the settings reference and the shortcut reference.