Reference
Single-page view · as markdown
The clackatoo Command
clackatoo / Reference
clackatoo [--font <FAMILY>] [--font-size <POINTS>] [--renderer <API>] [--remote <HOST> | --connect-picker]
clackatoo <COMMAND> [OPTIONS]
With no command, clackatoo opens the window,
starting the daemon first if none is running. With --remote, the daemon is
on another machine. With --connect-picker,
the window first asks which machine, from those you've connected to, your ssh
config and Tailscale (see
picking a machine).
On failure, every command prints clackatoo: <what went wrong> to stderr and
exits with status 1.
daemon #
clackatoo daemon [--scrollback-compaction <WHEN>] [--fresh]
Runs the daemon in the foreground until interrupted. Its log goes to stderr,
at the level RUST_LOG sets (default info). Terminals live exactly as long
as the daemon does: when it stops, their programs are hung up.
Upgrading it doesn't stop it. Ctrl+C,
closing the terminal it runs in, or SIGTERM stop it the way stop
does; under nohup it outlives a hang-up, upgrades included. The programs in
its terminals take those signals as usual, however the daemon was started.
CLACKATOO_AGENT gives Claude Code, the agent
chats talk to unless told otherwise, another
command: one speaking the Agent Client Protocol (ACP), split at spaces.
CLACKATOO_UDP_PORTS sets the UDP ports connections from other machines can
move onto: a port, a range
such as 60000-61000 (the default), or off.
CLACKATOO_LSP_TRACE names a file every message to and from
language servers is added
to, a line each: the time in UTC, the server and its pid, then -> for what
it's sent, <- for what it sends, or !! for a line it wrote to stderr. Only
you can read the file it makes, and it must be a plain file.
CLACKATOO_ACP_TRACE names a directory every message to and from each agent
chats talk to is written to, in the same form,
a file for each agent the daemon starts, with obvious secrets taken out (see
tracing agents).
CLACKATOO_DISPLAY=off leaves the programs the daemon starts with its own
WAYLAND_DISPLAY, DISPLAY and the like, rather than
the desktop's display
as you sign in and out, which they follow by default.
CLACKATOO_PASTES names the folder images
pasted into terminals are kept
in, an absolute path, or off to keep none, refusing them. By default it's
clackatoo/pastes in $XDG_CACHE_HOME (or ~/.cache).
CLACKATOO_WORKSPACES names the file the daemon keeps its workspaces in, or
off to keep none. By default it's workspaces in
$XDG_STATE_HOME/clackatoo/ (or ~/.local/state/clackatoo/).
The daemon keeps your workspaces, tabs and panes in that file as they change,
about a second after each change, and once more as it stops or upgrades. A
daemon starting afresh makes them again (see
the window); an upgrade
doesn't need to. A file that can't be read, or is from a newer clackatoo, is
renamed workspaces.unreadable, and the daemon starts with none. Each file
read is copied to workspaces.previous, so panes that couldn't be made, as on
a disk not mounted, aren't lost. Only one daemon keeps the file at a time (it
locks .workspaces.lock); another keeps nothing.
| Option | |
|---|---|
--scrollback-compaction <WHEN> | When scrollback is compacted to save memory: lazy (the default), eager or off. See scrollback. |
--fresh | Start with no workspaces this once, rather than making again those kept from the last run. The file is left as it is until something changes. |
The daemon keeps its files in a per-user runtime directory:
$XDG_RUNTIME_DIR/clackatoo/, or /tmp/clackatoo-<uid>/ if XDG_RUNTIME_DIR
is unset.
| File | |
|---|---|
daemon.sock | The Unix socket clients connect to. |
daemon.lock | Locked while a daemon runs, so only one runs at a time. A second clackatoo daemon fails with "a clackatoo daemon is already running". |
window.sock | Where clackatoo hands its window to the process of windows; window-<hash>.sock, to that of a group of windows that differ from it. Only your own programs are answered. It's as powerful as daemon.sock: a window asked for carries the asker's environment, which what the window starts runs with. |
shell/ | The scripts that make shells mark their commands, written by the daemon when it starts, and display, the desktop's display shells follow, written whenever it changes. |
Anyone who can connect to the socket can run commands as you, so the directory
must be accessible only by you. The daemon creates it with mode 0700, and
refuses to start if it exists with any group or other permissions, or belongs
to someone else. Every client, the window and clackatoo commands included,
refuses a socket another user's program listens on, as one could in /tmp by
making the directory first: it says "the daemon's socket is another user's".
So sudo clackatoo …, which runs as root, can't reach your daemon either.
Unix socket paths are limited to about 100 bytes. A very long
XDG_RUNTIME_DIR makes the daemon fail with "path must be shorter than
SUN_LEN".
A daemon the window starts runs in the background, with its log in
daemon.log in the runtime directory.
Staying quick on a busy machine #
When the machine is loaded, with builds on every core and memory short, the daemon still echoes your keys at once. It asks for two things as it starts, neither needing root, and says how it went in one line of its log:
-
A higher priority for its event loop, the thread that takes your keys and sends the screen. Linux shares the CPU among threads by their nice, from 19, least, to -20, most; you can only lower your own programs'. RealtimeKit (
rtkit-daemon), which desktops run so sound keeps up, raises the loop to the most it allows, -15 as it comes. Never real-time scheduling: rtkit grants that only to a program that agrees to be killed if it's busy for 200 ms without a break, and the daemon can be, taking in a huge paste, with every terminal in it. -
A place of its own, under systemd. A cgroup is a group of programs the kernel shares the CPU, memory and disk among by weight, group against group. The daemon asks your systemd for a scope, a cgroup of its own, called
app-clackatoo-PID.scope(systemctl --user status 'app-clackatoo-*'shows it), and divides it in three:daemon, itself alone, at ten times the usual weight, its memory the last of yours to be swapped out;terminals, at the usual weight, for your shells and everything run in them, and what the daemon runs for you, such as git and ssh; andagents, at a fifth of it, for agents, language servers, the browser, installs, and the terminals and background tabs agents start. A build in a terminal takes all the CPU the daemon doesn't need, and never what it does.agentsis divided again. What the daemon starts goes inagents/serve, and within a couple of seconds each program those start gets a cgroup of its own, with everything it has started: each Claude Code process Claude Code's adapter runs for a chat, a command Codex runs, a command in a terminal an agent started. What those start later starts in theirs. When memory runs short, systemd-oomd kills whole cgroups, the one reclaiming the most memory first. Before, that was all ofagents, every agent at once; now it's one chat's Claude Code process and the build it was running, and that chat's session is opened again, its answer going on (see What lasts). Empty ones are taken away. Ifagentscan't be divided, the daemon says why in its log and keeps it whole, as before.
Nothing the daemon starts gets either: every program starts at nice 0 and the usual scheduling, in its own group, never the daemon's. A program goes to its group within milliseconds of starting, taking with it whatever it has started by then, as your shell's rc file might have; what it starts afterward starts in its group. The window's thread asks rtkit too.
rtkit asks polkit, the service that decides what users can ask of system
services, and polkit as it comes says yes only to programs of a local desktop
logon. A daemon a window started from your desktop qualifies; one started from
an ssh logon doesn't, and runs at the usual priority, as clackatoo priority
then says. An administrator can let your programs have it from anywhere with a
polkit rule:
// /etc/polkit-1/rules.d/49-clackatoo-priority.rules
;
Lingering #
The place of its own needs you to linger. Your systemd, the user manager, is a program that runs for you while you're signed in, and the scope is part of it. As it comes, it stops when your last logon ends, a few seconds after you sign out of the desktop and close your last ssh session, and stops everything in it. A daemon in a scope would stop with it, closing your terminals, which are meant to outlive your sign-ins. Lingering keeps your user manager running from boot, signed in or not:
loginctl disable-linger undoes it. Some systems allow it only to
administrators; then it's sudo loginctl enable-linger $USER. So the daemon
takes a scope only while you linger, or if systemd started it; otherwise it
stays where it started, with its higher priority alone, and says so:
- Once, in a window's bar, the first time a window on this machine
connects after the daemon has said so: "clackatoo would keep agents' builds
from slowing your typing with
loginctl enable-linger". No other window says it again until what the daemon says changes, or you sign in again. - Any time, with
clackatoo priority, which prints the daemon's priority, its place or why it has none, and what lingering would change. - In a chat's
:Capabilities, as Daemon priority.
After loginctl enable-linger, clackatoo upgrade gives the
running daemon its place, keeping your terminals; the programs already running
stay where they are, and those started from then on go in their groups. Memory
is protected only as far as the groups above the scope protect it: as systemd
comes, they don't.
Upgrading keeps both. Without rtkit, or systemd, the daemon runs as it always
did. To turn it off, set daemon.machine.priority = false in the
daemon's config, which also
stops windows saying you could linger, or CLACKATOO_PRIORITY=off in the
daemon's environment; CLACKATOO_DISPLAY=off turns it off too, as for tests.
Either takes effect when the daemon next starts afresh. The window's is
priority = "normal" in
startup.toml.
priority #
clackatoo priority
Prints how the daemon on this machine
runs ahead of your other programs, as it
said when it started or upgraded: priority: its event loop's nice through
RealtimeKit, or why it's the usual; place: its scope, or why it stays where
it started, and if only lingering stands in the way, what to do.
It fails, saying so, while no daemon is running, or until the daemon has said,
a moment after it starts.
upgrade #
clackatoo upgrade
Moves the running daemon onto this build of clackatoo without stopping it. Its terminals, the programs in them, their history and the workspaces all carry on, and so do agents, with all they run and the turns they're answering, unless the upgrade has to stop them (see Agents). Run it after building or installing a new clackatoo.
The daemon replaces its own program with this one, keeping its process, so the programs in its terminals stay its children. It hands its state over as it goes: everything on screen and in history, the cursor and modes, workspaces and tabs. Every connection drops for a moment. Windows on this machine reconnect by themselves; windows on other machines say the connection was lost, and Enter reconnects them. Recordings stop.
Before handing anything over, the daemon checks that the new program is a
clackatoo that can take over from it. If it isn't, or starting it fails, the
daemon carries on as it was, and upgrade says why; the daemon's log has the
details. A daemon won't upgrade to a build speaking an older protocol; one
speaking the same, such as the build before, it will. Daemons from before
protocol 11 can't upgrade at all: upgrade says so, and clackatoo stop is
the way to replace them, closing their terminals.
update #
clackatoo update [--check] [--channel <CHANNEL>] [--to <VERSION>] [--rollback]
Installs the latest release of clackatoo in place of this one, then moves the running daemon onto it, as upgrade does. Releases come from github.com/clackatoo/clackatoo. Each has its checksums signed with clackatoo's release key, whose public half every build carries, and nothing is installed unless the signature is that key's, it names the release being installed, and the download is what the checksums say.
The new build is written beside the old one, run once to be sure it works on
this machine, then renamed over it, so the program is never missing or half
written. The old one is kept beside it as clackatoo.previous. Windows
already open keep the old build until they're opened again.
| Option | |
|---|---|
--check | Only say whether there's a newer release. |
--channel <CHANNEL> | stable (the default). nightly isn't published. |
--to <VERSION> | Install this version, newer or older, instead of the latest. |
--rollback | Swap back to the build the last update replaced, and move the daemon onto it if it can. Run again, it goes forward again. |
Versions are YEAR.MONTH.N: 2026.10.0 is October 2026's first release,
2026.10.3 its fourth. clackatoo --version also says the commit and the day
it was built.
The first release to install, before there's a clackatoo to update with, is installed by hand, checking its signature first: the README shows how.
desktop #
clackatoo desktop install [--force]
clackatoo desktop remove [--force]
Puts clackatoo in your desktop's app launcher, with its icon, or takes it out.
install writes clackatoo.desktop to ~/.local/share/applications and the
icon to ~/.local/share/icons/hicolor/scalable/apps (under $XDG_DATA_HOME
if it's set). The entry starts the program install was run as, by its full
path, so run it as the clackatoo you want the launcher to start. Docks group
clackatoo's windows under it.
The entry tells the launcher that clackatoo reports its startup, so a window opened from the launcher takes focus as it opens and the launcher's spinner stops. The token the launcher hands the window goes no further: the daemon and your shells never see it. An entry written by an earlier clackatoo gains this the next time update rewrites it.
The entry's right-click menu offers a new window; "Connect to…", which opens the window as the picker of a machine; and "Connect to HOST" for each of the last three machines you connected to. When the last machines you've connected to change, the window rewrites a marked entry to list them, still starting the program the entry started. If a pinned launcher keeps showing the old menu, GNOME has a copy of the entry cached: unpin clackatoo and pin it again, or sign out and back in.
Both files are marked as clackatoo's (X-Clackatoo-Managed=true in the
entry). An entry or icon without the mark is yours: install leaves it as it
is and prints the entry it would have written, and remove leaves it too.
--force replaces or removes it anyway. To keep your own changes to an entry
clackatoo wrote, delete its X-Clackatoo-Managed line.
update brings a marked entry and icon up to date with the build it
installs, and leaves unmarked ones alone. The README's install runs
desktop install too.
File managers #
The entry tells file managers which files clackatoo opens: plain text, and the
commonest kinds of source code and data that are text, such as Markdown, C,
Rust, Python, JSON and YAML. So every file manager offers clackatoo under
"Open With" for those, never for an image or anything else that isn't text.
Choosing it runs clackatoo open with them, which opens each in a
new editor tab. Started from the launcher, with nothing to open, the entry
opens a window. A marked entry from an earlier clackatoo gains all this the
next time update rewrites it; until then, a window rewriting its
machines leaves it as it is, as the program it starts might not have open.
The entry doesn't claim folders, so your desktop never opens a folder with
clackatoo by itself, as it would wherever no file manager is set to open them,
xdg-open included. A file manager that lists every app, as GNOME Files'
"Open With Other Application" does, still offers it for a folder, which then
opens in a new terminal tab, there. The menus below offer it for folders
everywhere else.
install also adds "Open in clackatoo" to the right-click menus of the file
managers you have, for folders and text files selected, and for the folder
shown:
| File manager | What install writes |
|---|---|
| Dolphin (KDE) | A service menu, ~/.local/share/kio/servicemenus/clackatoo.desktop. |
| Nemo (Cinnamon) | Two actions, clackatoo.nemo_action and clackatoo-here.nemo_action, in ~/.local/share/nemo/actions. |
| Thunar (Xfce) | A custom action in ~/.config/Thunar/uca.xml, with the ID clackatoo-open, beside your own. With no file of your own, it starts as a copy of the system's, which yours would otherwise hide. |
| Files (GNOME) | An extension, ~/.local/share/nautilus-python/extensions/clackatoo.py, if nautilus-python is installed (python3-nautilus or nautilus-python). Without it, Files offers clackatoo under "Open With" only. |
Each is written only if its file manager is installed, so after installing
one, run clackatoo desktop install again. Dolphin and Nemo show the item at
once. Thunar and GNOME Files read their menus as they start, and keep running
in the background, so they show it once stopped and started again: thunar -q
stops Thunar, which runs that way under thunar --daemon, as Xfce starts it,
and nautilus -q stops GNOME Files; install says so. Thunar writes all its
custom actions back whenever they're saved from its "Configure custom actions"
window, so saving there from a Thunar started before install takes
clackatoo's out again; run install again if it does. remove takes them all
away, even if the launcher's entry is someone else's, and update
brings the ones there up to date with the build it installs.
Each file is marked as clackatoo's, as the entry is, and treated alike: one
without the mark is left as it is, unless --force. Thunar's uca.xml holds
your own actions too, so clackatoo changes only its own action there, leaving
the rest of the file byte for byte, comments and all; a file it can't be sure
of reading right, such as one with an action inside another, it leaves alone,
and says so. If you had no uca.xml of your own and the system's can't be
read that way, it writes none, rather than one that would hide the system's
actions. Taking clackatoo's action out leaves the file as it was, and removes
it if all that's left is what clackatoo started it with.
The paths a file manager hands on can hold anything: spaces, quotes, line
breaks, a leading -. Each reaches clackatoo open as it is: Dolphin, Nemo
and the extension run it without a shell, and Thunar, which runs every action
with sh -c, quotes each path itself.
forget #
clackatoo forget HOST
Forgets the identity key the daemon knows the machine of its connection HOST
by, in known_machines, after that machine's clackatoo chose a new one, as
when its machine file was deleted: the key it shows next is taken, and kept.
Until then, a connection to it is refused, and says so. It's the key of the
machine HOST last proved it was, or was expected to be: never one HOST only
said it was. A connection that was stopped is tried again at once, and takes
whatever machine is there now, as :connect does, so a machine whose state
was wiped, with a new ID and key, is taken this way too. HOST can be a
machine's ID instead, its 32 hex digits, which is taken as one first, to
forget the key that machine is known by, connected to or not. See
machines passed on.
lent #
clackatoo lent
clackatoo lent reclaim N
Lists the panes this daemon has
lent to another machine,
numbered, with the machine each is lent to and when it was last heard from.
reclaim N takes one back: it becomes one of this daemon's own workspaces,
named after the machine it was lent to, as from-laptop.
display #
clackatoo display
Shows the desktop's display the daemon on this machine gives the programs it
starts, and where it came from, then each variable as NAME=VALUE:
from: systemd (the desktop you're logged in to)
WAYLAND_DISPLAY=wayland-0
DISPLAY=:0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.Q2ZXV3
XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=ubuntu:GNOME
from: is systemd while you're signed in to the desktop, inherited for
the daemon's own display, or none. A variable not listed is removed from
what the daemon starts. See
the desktop's display
for where each comes from. It reads what the daemon wrote for its shells, so
it fails, saying so, while no daemon is running, or the daemon hasn't written
it: CLACKATOO_DISPLAY is off, it hasn't read the display yet, or it
couldn't write the file, which its log says. A file an earlier daemon left is
passed over. It shows this machine's daemon only: for another machine's, run
it there, as ssh desk clackatoo display.
stop #
clackatoo stop
Stops the daemon, closing every terminal and hanging up their programs. The
daemon is sent SIGTERM and stops as it would at sign-out or shutdown: it tells
its language servers to shut down, ends what agents started, writes the
boards' last changes, writes the workspaces as they were, and tells windows on
other machines why, all within about 3 seconds. One that hasn't gone after 5
seconds is killed; a daemon from before 2026.10.17 dies at once. stop works
on a daemon from any build of clackatoo, which matters because a build refuses
to talk to a daemon speaking another version of the protocol: other commands
then fail with "the daemon is from another version of clackatoo", and suggest
clackatoo upgrade where the daemon can upgrade. If no daemon is running,
stop says so and succeeds.
config #
clackatoo config [<NAME> [<VALUE>]] [--unset <NAME>]
Shows or changes the window's settings
in client/startup.toml:
- With no arguments, prints every setting as the file would hold it, with those the file doesn't set commented out at their defaults.
- With a name, prints that setting's value, without quotes, so scripts can use it.
- With a name and a value, sets it. The value is checked first:
clackatoo config renderer metalfails, saying which valuesrenderertakes. - With
--unset, removes the setting, so it takes its default.
Changes keep the rest of the file, comments included, as it was, and the file is replaced all at once, so a window starting at the same moment reads either the old file or the new one.
language #
clackatoo language list
clackatoo language install <NAME>... | --all [--no-servers]
The languages files are
parsed and colored in. Each is a
pack in ~/.local/share/clackatoo/languages (or
$XDG_DATA_HOME/clackatoo/languages).
listlists the languages clackatoo knows where to get, with where each comes from, marking those installed and naming each one's language server, then any other packs installed.installdownloads each language's grammar and highlight queries, with curl, from the grammar's own repository, at the version clackatoo was tried with, and checks each file is exactly what was tried. Then it installs the language's server, unless it's onPATH,--no-serversis given, or clackatoo can't install it (it says how to).--allinstalls every languagelistlists. Installing one again replaces it, and a language once declined in a window is offered again.
Files opened after a language is installed are parsed in it. A file that was already open is parsed once a window attaches to it again, as when the window is next opened.
web #
clackatoo web password [--unset]
Sets the password devices pair with
the web app, asking for it
twice, or reading it from standard input if that isn't a terminal. It must be
at least 8 characters. Only its hash is written, to web-password in
clackatoo's state directory (~/.local/state/clackatoo), which only you can
read, never to the config; the daemon reads it when it next starts or
upgrades. --unset takes the password away, so devices pair only by asking a
window; it takes it out of an old daemon/web.toml not moved yet too, so
moving that can't bring it back.
devices #
clackatoo devices
clackatoo devices allow <CODE>
clackatoo devices deny
clackatoo devices revoke <N>
clackatoo devices unlock
Lists the devices paired with
the web app, as :devices
does. allow lets in the device asking to pair that shows CODE; deny
turns down every device asking; revoke unpairs device N, cutting it off if
it's connected; unlock lets devices pair with the password again after too
many wrong ones locked it. It takes --socket and --remote, as the
client commands do.
agent #
clackatoo agent login antigravity
Signs in with Google for Gemini through Antigravity, on the machine whose daemon runs the chats.
bridge #
clackatoo bridge [--replace]
Passes everything on its standard input to the daemon, and everything the
daemon sends to its standard output, starting the daemon first if none is
running. It exits when either side hangs up. --remote runs it on the other
machine through ssh; see another machine.
| Option | |
|---|---|
--replace | Replace the daemon that's running first, as when it's from another build: upgrade it if it can, keeping its terminals, or else stop it, closing them. |
open #
clackatoo open [--] [PATH]...
Opens files and folders in the window, as a file manager's "Open With" does,
and as the file managers' menus do: each folder in a new
terminal tab, starting in it, and each file in a new
editor tab, one tab each, in order, in the
workspace last used (or a new one, if there's none). The window you used last
then switches to the last of them and comes to the front, at most once a
second, so that nothing can keep taking the focus. With no window open, one
opens on it, in the
process of windows if
one is running, at once. With no paths, open opens a window, as clackatoo
alone does.
Put -- before the paths, so one starting with - isn't taken for an option.
A relative path is from the current directory. Paths are taken byte for byte,
never through a shell, but the daemon takes only UTF-8 paths: one that isn't
is said, and left out, and the rest opened, and open then fails.
The window chosen is the one on this machine whose user was there last, even
if you've since gone to the file manager, so with several windows open, only
that one switches. A window on another machine, through --remote or
:connect, never does, nor a phone. And only something on this machine can
ask: the daemon refuses another machine's daemon or window, and a phone.
open passes on the token the desktop launched it with: a window it opens
takes the focus with it. A window already open comes to the front on X11, and
on GNOME; other Wayland desktops might only show that it wants attention, as a
window can't use a token once it's open, and the launcher might show a busy
cursor until it gives up on one.
Client commands #
The other commands talk to a running daemon. Each accepts:
| Option | |
|---|---|
--socket <PATH> | Connect to this socket instead of the one in your runtime directory. |
--remote <HOST> | Use the daemon on another machine (host, user@host, host:port, or a name from your ssh config), through ssh, starting it there if it isn't running. See another machine. |
--remote-command <COMMAND> | With --remote, the command that runs clackatoo there. Default: clackatoo, or CLACKATOO_REMOTE_COMMAND. |
Terminals are named by the number new prints and list shows. Numbers are
never reused while the daemon runs.
list #
clackatoo list
One line per terminal: its ID, the PID of its program (- for a
chat, which has none), its size, its status
(running, exited (<code>), or killed (signal <n>)), and the window title
its program set.
new #
clackatoo new [--size <COLSxROWS>] [--cwd <DIR>] [--record <FILE>] [-- <COMMAND>...]
Starts a terminal and prints its ID.
| Option | |
|---|---|
--size <COLSxROWS> | The terminal's size, like 120x40. Default 80x24. Each dimension must be between 1 and 4096. |
--cwd <DIR> | The working directory. Default: the current directory. |
--record <FILE> | Write everything the program prints to FILE, as a recording. The path is on the daemon's machine. |
-- <COMMAND>... | The program to run, and its arguments. Default: the daemon's $SHELL, or /bin/sh. A $SHELL that starts another shell rather than becoming it, as sh -c fish does, gets nothing typed into it by clackatoo (see keeping a terminal running): set it to the real shell. |
What a program sees in its environment is described in terminal emulation.
bg #
clackatoo bg [--workspace <NAME>] [--cwd <DIR>] [--size <COLSxROWS>] -- <COMMAND>...
Starts the command, its words joined with spaces, in a new
background tab of a
workspace, and prints its terminal's ID, for capture and the rest. It's
typed at a new shell's prompt, as you would type it, so the shell's marks say
when it runs and how it ends, and it shows in the window's list of background
tabs, out of the tab bar. A workspace from another machine can't have one
started.
| Option | |
|---|---|
--workspace <NAME> | The workspace, by its name. Default: the one last used. |
--cwd <DIR> | The directory the shell starts in. Default: the current directory. |
--size <COLSxROWS> | The terminal's size, like 120x40. Default 80x24. |
keep #
clackatoo keep <TERMINAL> [restore|always|off]
Marks the terminal to
keep running the
command its shell runs, or ran last, as its shell said: restore, the
default, runs it again by itself as the daemon starts afresh; always also
runs it again as it ends; off takes the mark away. It says what it keeps
running, or why it can't, as when the shell hasn't said what it ran.
trust #
clackatoo trust [FOLDER]
clackatoo trust --list
clackatoo untrust [FOLDER]
Trusts the folder, the
current directory if there's none, to run its language servers, which might
run its code, as :trust does: those of its files open start at once, and its
files aren't asked about. Chats there load the project's
skills and specialists too. A folder is trusted with everything inside it, but
for any folder inside it marked not trusted. untrust marks it not trusted,
stopping its servers, and it isn't asked about again. --list lists the
folders marked, a line each. An agent's run_in_terminal and
run_in_background refuse a command running clackatoo trust, as they do
clackatoo keep: a guard against mistakes, not a boundary, as anything that
can run commands as you can run this.
edit #
clackatoo edit [PATH]
Edits the file at PATH, or shows the
folder's listing, from the
current directory, which is the folder shown if there's no PATH, in a new
tab of the workspace last used, or in a new workspace if there are none: the
daemon's own, never one shown from another machine. A file already being
edited gets another pane on it. The window doesn't switch to the new tab;
open does.
files #
clackatoo files [PATH]
Shows the folder at PATH in a
file explorer, as a tree, in a new tab of the
workspace last used, or in a new workspace if there are none: the daemon's
own, never one shown from another machine. With no PATH it shows the current
directory. A relative PATH is from the current directory here, even with
--remote, as for edit; one starting ~ is from the home directory of the
daemon's machine, so with --remote it's the other machine's. Put -- before
a PATH starting with -. A file, or a folder that isn't there, makes no
pane, and says why. The window doesn't switch to the new tab; open
does. clackatoo edit DIR shows a folder too, but as an editor's
listing, not a tree.
run #
clackatoo run <TERMINAL> <WORDS>...
Types the words, joined with spaces, into the terminal, then presses
Enter (a carriage return, \r).
send #
clackatoo send <TERMINAL> <TEXT>
Types TEXT exactly as given, without pressing Enter. To send
control keys, use your shell's escapes: \e (Escape) or \r
(Enter) in fish, $'\e' in bash. Fails if the terminal's program
has exited.
capture #
clackatoo capture <TERMINAL> [--ansi]
Prints what the terminal is showing: one line per row, without trailing spaces
or trailing blank lines. With --ansi, colors and attributes are kept as
escape sequences, so printing the result in another terminal reproduces the
screen. A terminal whose program has exited still shows its last screen.
resize #
clackatoo resize <TERMINAL> <COLSxROWS>
Changes the terminal's size, such as clackatoo resize 1 120x40. Its program
is told (the kernel sends it SIGWINCH), and lines on the screen are
rewrapped to the new width. A recording started with new --record stops
here, because a recording has a single size.
close #
clackatoo close <TERMINAL>
Closes the terminal and forgets it. Its program is hung up (sent SIGHUP by
the kernel), as when a terminal window closes.
ping #
clackatoo ping [--count <N>] [--interval <MS>]
Times how long the daemon takes to answer, and how long a key takes to come
back from a program, which is most useful with --remote. It starts a
terminal of its own running cat, and for each round:
- waits, then times a request that does nothing, which is what the connection costs;
- waits again, then times a key, from sending it to the update that shows
cat's echo, which is what typing costs.
With --remote, each round also says whether it went
over UDP or through ssh.
To the same machine, where the network costs next to nothing:
$ clackatoo ping --remote localhost --count 5
connected to localhost in 146.1 ms
PING localhost: a request, then a key echoed by cat
round 1: request 0.168 ms, key echo 0.216 ms (over UDP)
round 2: request 0.147 ms, key echo 0.226 ms (over UDP)
round 3: request 0.158 ms, key echo 0.187 ms (over UDP)
round 4: request 0.147 ms, key echo 0.187 ms (over UDP)
round 5: request 0.151 ms, key echo 0.178 ms (over UDP)
--- localhost ping statistics ---
request min 0.147 ms, median 0.151 ms, p90 0.168 ms, max 0.168 ms
key echo min 0.178 ms, median 0.187 ms, p90 0.226 ms, max 0.226 ms
The connection time includes ssh signing in. When it's done, ping closes its terminal.
| Option | |
|---|---|
-c, --count <N> | How many rounds. Default: 10. |
-i, --interval <MS> | The wait before each request and each key, in milliseconds. Default: 200. The first message after a pause is the slowest, because whatever carries it has to wake up, and typing always has pauses, so a short interval flatters the result. |
--soak keeps the connection open until Ctrl+C, typing
into a terminal every -i milliseconds, and logs each echo's time and every
drop, reconnect and its reason: for watching a bad network over hours.
The Window
clackatoo / Reference
The window is a client of the daemon, like the clackatoo command. It shows a
workspace's terminals, keeps up with them as their programs print, and sends
your keys to the one with the focus. Closing the window closes nothing: the
terminals keep running in the daemon, and the next window shows them again,
laid out as they were.
These pages cover the window, each listed with its sections:
- The Frame and Modes: Opening it, Windows share one process, The frame, Keyboard help, Settings, A daemon from another build, Losing the daemon, Modes, The cursor, Drawing, Not supported, Learning clackatoo, What's new.
- Workspaces, Tabs, and Panes: Workspaces, tabs, and panes, After a restart, Keeping a terminal running, Background tabs, The command line, Resizing panes, Moving around, Macros and marks across panes, Ctrl+B, The finder.
- Typing, Scrolling, and the Mouse: Typing, Pasting an image, Scrolling, The mouse.
- Normal Mode in a Terminal: Normal mode, Selecting and copying, Text objects, Commands, Searching, Lists.
The Frame and Modes
clackatoo / Reference
The window has a top bar of workspaces and tabs, and two modes: insert mode types into the program, and normal mode is clackatoo's.
Opening it #
With no command, clackatoo opens a window on your
workspaces: the
one last used, at the tab and pane last used. If there are none, it makes one,
showing your newest running terminal, such as one started with
clackatoo new, or else a new terminal running your $SHELL. If no daemon is
running, it starts one in the background first. Until the daemon answers, the
window says it's connecting, and Esc quits. That daemon logs to
daemon.log in the runtime directory, and keeps
running after the window closes.
Windows share one process #
Every window opens in one process, the process of windows, which sets up the GPU once, for its first window: that's most of the time a window takes to open, so every window after it opens at once, in tens of milliseconds rather than a few hundred. What's left is mostly your desktop making the window.
clackatoo hands its window to the process of windows over a socket only you
can reach, window.sock in the
runtime directory, and returns as soon as
the window is open, rather than staying until it closes. When none is running,
it forks one first, apart from itself: in a session of its own, with no
terminal, so closing the terminal you ran clackatoo in,
Ctrl+C or Ctrl+Z there, touch no
window. ps shows it as clackatoo-win, with the command line of the
clackatoo it was forked from. The launcher's token goes with the window, so
it takes focus. A window opened from another, as the
machine picker opens one,
opens in the same process too.
Each window is its own: its own view, mode and focus, its own connection to
its daemon, on this machine or another, and its own run of init.lua. What a
window starts, the daemon, ssh for a machine, a link's opener,
clackatoo update, is started with the environment and directory of the
clackatoo that opened the window, so a window opened from a shell with its
own PATH, virtualenv or SSH_AUTH_SOCK uses them. If one window fails, it
closes and the others stay open. If the GPU is lost, as when its driver
resets, each window opens again in a process of windows started afresh; if
it's lost a third time within a minute, the windows close instead. The process
ends with its last window.
A window gets a process of its own, which takes no others but those it opens,
when it couldn't be the window it would be in the process of windows, whose
own environment it shares: it's shown on another display (WAYLAND_DISPLAY,
DISPLAY); has another HOME, config, state, or cache directory
(XDG_CACHE_HOME), or desktop bus (DBUS_SESSION_BUS_ADDRESS); would draw
with another renderer, GPU, or driver (WGPU_*, DRI_PRIME,
__NV_PRIME_RENDER_OFFLOAD, __GLX_VENDOR_LIBRARY_NAME, VK_ICD_FILENAMES,
VK_DRIVER_FILES, MESA_*) or libraries (LD_LIBRARY_PATH, LD_PRELOAD);
has another locale (LANG, LANGUAGE, LC_ALL, LC_CTYPE, LC_MESSAGES,
LC_COLLATE, LC_NUMERIC, LC_TIME, LC_MONETARY, LC_IDENTIFICATION),
cursor theme (XCURSOR_*) or fontconfig (FONTCONFIG_*); or is from an older
build of clackatoo than the process. Windows like it share a process of
windows of their own, which listens on a socket named after what they share.
The build is the program's file, so a build of your own counts as new even at
the same version: the first window of a newer build, as after
clackatoo update or a new build put in place of the old, starts a process of
windows for itself and the windows after it, and the old process ends with its
last window. :update reopens only the window it's typed in, in the new
build.
The window opens in the clackatoo you ran itself only if no process of
windows takes it within a few seconds, if its environment is too big to hand
over (more than a megabyte), or with CLACKATOO_WINDOW_HOST=off, which also
keeps the windows it opens out of it.
Every window logs to window.log in clackatoo's state directory (see
logs), each line with its process's
ID, which windows in one process share. A font installed while the process of
windows runs is used once it has ended and started again, after its last
window closes.
The window sizes itself so that its one pane holds 100×30 cells. Resizing the window resizes each pane's terminal to fit, and its program is told the new size. When several windows show one terminal, the terminal takes the size of whichever was last opened on it, resized or focused.
With --remote <HOST>, the window shows the workspaces on another machine,
through ssh. See another machine.
From a file manager, "Open in clackatoo" in its menu, or "Open With"
clackatoo, opens each folder in a new terminal tab and each file in a new
editor tab, in the window you used last, which switches to them and comes to
the front; with none open, a window opens on them.
clackatoo desktop install sets
this up, and clackatoo open is what runs.
| Option | Environment variable | Setting | |
|---|---|---|---|
--font <FAMILY> | CLACKATOO_FONT | font | The font family. Default: your system's monospace font. |
--font-size <POINTS> | CLACKATOO_FONT_SIZE | font-size | The text size. Default: 12. |
--renderer <API> | CLACKATOO_RENDERER | renderer | The graphics API to draw with: vulkan (the default) or opengl. See drawing. |
--remote <HOST> | Use the daemon on another machine. | ||
--remote-command <COMMAND> | CLACKATOO_REMOTE_COMMAND | The command that runs clackatoo there. Default: clackatoo. |
An option on the command line wins over its environment variable, which wins
over the font and fontsize that init.lua sets as it runs, which win over
the setting. startup.toml's font is what the window opens in before config has
run; config nearly always runs first, so the window opens in config's font.
The frame #
The window draws its own frame, in place of the desktop's:
- The top bar holds your
workspaces,
each with a colored dot and how many tabs it has (unless its name is only a
number, as unnamed workspaces' are), the one shown picked out, and a
+after them that makes a new one, asking which machine once the daemon is connected to another. A workspace from another machine (see:connect) has a ring in place of its dot: in its color while connected, in the warning color while its connection is down, and filled amber while it needs a password. Hold the mouse over it to see which machine it's on, and how its connection is. The window's buttons sit at whichever end your desktop puts them, in the same order. Drag the bar to move the window, double-click it to maximize or restore it, and right-click it for the desktop's window menu. A workspace's chats mark it after its name, as tabs do (see Workspaces, tabs, and panes). When there are more workspaces than fit, the bar shows those around the one shown, with a quiet count at either end of how many are hidden that way, such as‹3or5›; select a count to scroll that way. While a chat has access to the window, a teal badge before the buttons names the chat and the access, asAgent Control · chat 3: select it to go to the chat, or its gold×to revoke the access. Only the top bar shows it, never the window's title, which a program could set to look the same. - The bottom bar starts with the window's mode, then the tabs of
the workspace shown, with a
+after them that opens a new one. When there are more tabs than fit, the tab shown stays in view, and a quiet count at either end, such as‹3or5›, says how many are hidden that way; select it to scroll. On the bar's right are how far the view is scrolled or a message, how many panes the tab has, and a reminder of the key to press next. These take the room the tabs leave; when there are more tabs than fit, a quarter of the bar is kept for them. A message too long for its room is cut short with…: hold the mouse over it to read it all. A tab's chats mark it after its name. - The panes fill the space between the bars, side by side with a thin line between them. When a tab has more than one, a gold line runs round the focused pane. Gold is kept for focus and for what to act on: the cursor in normal mode, the focused pane, the button to press and a chat waiting for you. Links and matched letters are blue, and headings bold.
- The palette opens in the middle of the window for anything typed to clackatoo itself: commands, searches, and new names.
Drag the window's edges or corners to resize it. Interface text, such as the names in the bars, is in your desktop's interface font. On GNOME, both the font and where the buttons go come from its settings. If the desktop names a font that isn't installed, it's your system's sans-serif font, as fontconfig picks it, or else the first installed of Noto Sans, Cantarell, Inter, DejaVu Sans, Liberation Sans and Roboto. The bottom bar is drawn in the terminal's font, as Vim's status line is.
With the mouse:
- Select a workspace or tab to show it, and a pane to focus it.
- Select a
+to make a workspace, or open a tab. - Right-click a workspace or tab for Rename or Close. Rename opens the palette with the old name selected: typing replaces it, and an arrow key, Home or End keeps it to edit. Clearing a tab's name names it after its focused pane's program again. Close closes every pane in it, hanging up their programs.
Keyboard help #
Press Ctrl+? in the native window to see shortcuts for the current pane,
mode, prompt or popup. On a keyboard where ? is
Shift+/, press
Ctrl+Shift+/. Plain
Ctrl+/ still goes to the terminal program.
Type to filter by key or description. Up/Down or Ctrl+P/Ctrl+N scroll through matches, PageUp/PageDown move a page, and the mouse wheel scrolls too. Esc, Ctrl+;, Ctrl+? again, or selecting outside it closes help. The draft, selection, open popup, and unfinished command underneath are kept: after Ctrl+B, for example, help lists bindings starting with that prefix, and closing help lets you finish it.
The list uses the current Lua-configured mappings and their desc labels, so
replacements, unbindings and mode restrictions appear immediately. Built-in
entries are generated from the same key definitions that dispatch commands,
and Vim continuations come from its parser. They follow the current pane and
temporary state, including completion, pending operators and file-operation
confirmations; there is no separate built-in shortcut catalog to keep in sync.
Keys handled inside terminal programs, and arbitrary Lua keypress callback
logic, cannot be enumerated; terminal help identifies which keys pass through
to the program. Ctrl+? is reserved for this window-level
help.
Settings #
Settings you rarely change, or change to tune how the window starts, live in
startup.toml: $XDG_CONFIG_HOME/clackatoo/client/startup.toml, or
~/.config/clackatoo/client/startup.toml. The window reads it before anything
else starts, which takes a few microseconds.
= "JetBrains Mono"
= 12
= "opengl"
= "normal"
priority = "high", as it starts, has the window's thread, which draws it and
takes your keys, ask to run ahead of your other programs, as
the daemon's does;
"normal" leaves it as other programs are. CLACKATOO_PRIORITY=off in the
environment does the same.
clackatoo config shows and changes them, keeping the rest of the file,
comments included, as it was:
In the window, :setpersist
saves them too, as :setp fontsize=13 or :setp renderer=opengl, the same
way. renderer and priority take effect in windows opened after.
A mistake in the file never stops the window opening. Each setting with a mistake, such as an unknown name or a value of the wrong kind, is reported on stderr and left at its default, and the rest still apply.
Keys, and what the window does, are configured in Lua instead, in init.lua
beside startup.toml. See configuration.
The settings are on this machine. With
--remote, the window's settings come from the
machine the window opens on.
A font family is named as fontconfig knows it, as fc-list : family prints.
Characters the font doesn't have, such as CJK text or emoji, come from
fallback fonts, found the same way.
A daemon from another build #
Each build of clackatoo speaks one version of the protocol between windows and the daemon, and refuses a daemon speaking another. When the window finds a daemon from another build, it says so, and what Enter does depends on which is older:
- An older daemon, from protocol 11 on: Enter upgrades it. The daemon becomes this build without stopping, so its terminals and the programs in them carry on, and the window opens on them.
- An older daemon, from before protocol 11: it's too old to upgrade, so Enter stops it and starts a new one. This closes every terminal in the old daemon, and hangs up their programs.
- A daemon newer than the window: the window says to open a window from the newer build instead. It never offers to replace a newer daemon.
Esc quits, leaving the daemon running.
clackatoo upgrade and clackatoo stop
do the same from the command line.
Losing the daemon #
If the connection to the daemon is lost, because the daemon stopped or, on another machine, the network went, the window says so and why, in place of the terminal:
- Enter reconnects, starting a daemon if none is running. If the workspace shown is still there, the window returns to it, with each pane as it was, in the same mode and scrolled to the same place.
- Esc quits.
When the daemon upgrades, every connection to it drops for a moment. A window whose daemon on this machine is still there afterward reconnects by itself, without asking.
Modes #
The window is in one of two modes, like Vim:
- Insert mode, where it starts. Keys go to the program.
- Normal mode. Keys drive clackatoo. The bottom bar starts
NORMAL, on gold, in place ofINSERT, on lilac. A visual selection showsVISUAL,V-LINEorV-BLOCK, on blue.
The mode is the window's, not each pane's: every pane, tab, and workspace
shares it. Panes with no insert mode, such as the explorer, a board, a review
or a lesson, show NORMAL and leave the window's mode as it was. But whatever
you open or close from one, with a key, the mouse, or a command, leaves the
window in normal mode.
| Key | In | Does |
|---|---|---|
| Ctrl+; | any | Switches to normal mode: from insert mode, and out of a visual selection, a search or the command line. |
| Shift+Esc or Ctrl+\ | any | The same. |
i | normal mode | Switches to insert mode, back at the live screen. |
| Ctrl+\, twice | insert mode | Sends a real Ctrl+\ to the program. |
| Ctrl+C | either | Interrupts the program. |
Plain Esc always goes to the program, since programs such as Vim
and less use it. Ctrl+; costs programs nothing: a
terminal has no code to send them for it, so none can be listening for it.
It's found by where the key is, so on layouts where ; takes
Shift, such as German, it's Ctrl and the key to the
right of L.
The cursor #
In insert mode, the cursor has the shape the program asks for: a block, an underline or a bar, which Vim and shells in vi mode switch between. If the program hasn't asked, it's a bar. In normal mode it's always clackatoo's yellow block. In panes without the focus, and while the window isn't focused, either cursor is drawn as an outline.
Drawing #
The window draws with the GPU, and only when something changed: a quiet terminal costs no CPU. It redraws at most once per frame, so a flood of output costs one frame's drawing per frame.
On a machine with two GPUs, the window uses the one the system lists first,
which is the one driving the screen: on a desktop, usually the graphics card
the monitors are plugged into, and on a laptop, the integrated GPU. Frames
drawn on the other GPU might never reach the screen. To choose differently,
set WGPU_POWER_PREF to high for the faster GPU, or low for the one that
uses less power.
The window draws with Vulkan, or with OpenGL where Vulkan can't draw. On some laptops with two GPUs, OpenGL opens a window much sooner: to choose between them, Vulkan asks both about themselves, and that can take more than a second, while OpenGL can use the screen's GPU without asking the other. When setting up the GPU takes over half a second, the window says so on stderr, and suggests trying OpenGL:
If the API chosen can't draw, the window uses the other.
Box-drawing characters (─ │ ┌ ╭ ═…) and block elements (█ ▄
░…) are drawn by clackatoo rather than taken from the font, so that borders
in htop, tmux or Vim join up across lines at any size. The diagonal lines come
from the font.
A character with others joined to it, such as a letter with accents, an emoji sequence joined with zero-width joiners (👩💻), or a keycap (#️⃣), is shaped: the font's own rules decide which glyphs draw it and where they go. An emoji presentation selector (U+FE0F, as in ❤️) draws the character from an emoji font.
A flag (🇬🇧) or an emoji with a skin tone (👍🏽) is drawn as one emoji, if the emoji font has it. Each keeps the columns programs count for its parts, so a skin-toned emoji is followed by two blank columns.
Not supported #
- Moving panes to another place in the layout.
- History lines are shown at the width they were printed at. A line that wrapped in a narrower window doesn't rewrap when the window gets wider.
Learning clackatoo #
:Tutor teaches clackatoo a lesson at a time, as vimtutor teaches Vim. It
opens the finder on the lessons, each with how far you've got;
Enter opens the one picked, and :Tutor NAME opens one by name,
such as :Tutor text-objects. The lessons are basics, text-objects, words,
registers, mouse, blocks, substitute, wrap, markdown, font, indenting,
snippets, explorer, shell, finder, agents, remote, and background.
A lesson opens in a tab of its own: the lesson on the left, and on the right a practice pane, an editor on a file made for it or a terminal running your shell. Do what the step says in the practice pane: once it's done, its heading lights up, then stays green with a ✓ beside it, and the next step is lit and scrolled to. A step with nothing to do is to read. Lessons draw code as chats do, on a background of its own and never split between rows, with step titles in bold, and a lesson's explorer is headed with the lesson's name.
| Keys | Does |
|---|---|
]s | Skips to the next step, in normal mode in a lesson's tab. |
[s | Goes back to the step before. |
:q, in either of a lesson's panes | Ends the lesson, closing both. |
The lesson can't be changed: a change to it is put back. Lessons work in a
folder of their own, clackatoo/tutor in $XDG_CACHE_HOME (or ~/.cache),
which goes when the lesson ends; a lesson's explorer can't leave it. A file of
yours opened in the practice pane is left as it is, unsaved changes and all,
when the lesson ends. Where each lesson was left is kept in clackatoo/tutor
in $XDG_STATE_HOME (or ~/.local/state), so the next window picks up there.
A lesson's panes always run on the machine of the window's own daemon, where
its files are, even in a workspace of another machine's after :connect. With
--remote, the daemon there makes the lesson's files, in tutor in its
runtime folder ($XDG_RUNTIME_DIR/clackatoo), and removes them as the lesson
ends. Only that window may change or remove them; those of a window that has
gone are removed once they've been left a week, or as more than 16 build up,
the oldest first. A daemon there from before protocol 143 can't make them, and
the bar says it needs updating.
What's new #
The first time a window of a new build opens, if the build has something new,
the bottom bar says clackatoo updated · :Tutor new until the next key; a
first install says Welcome to clackatoo · :Tutor to start. :Tutor new
lists what's been added, newest first, those not listed before first and
marked new; Enter opens the lesson that teaches it.
Workspaces, Tabs, and Panes
clackatoo / Reference
A workspace holds tabs, and a tab holds panes, laid out as splits; the command line and Ctrl+B make them and move between them.
Workspaces, tabs, and panes #
The window shows your work at three levels:
- Workspaces, one for each piece of distinct work, such as a project. Their names run along the top bar. Often there's only one.
- Tabs, inside a workspace. They run along the bottom bar, numbered, and
named after the title of their focused pane's program, or, for a terminal
whose program set none, the folder its shell is in (
~for your home, or for a terminal on another machine, yours there), unless you've named them. A program's title, or a folder's name, shows without control characters or anything that shows nothing itself, as a mark that turns text round, so it can't hide or move what's beside it, in a tab's name, the window's title or a notification. Only the zero-width joiners and non-joiners that emoji and scripts such as Persian need stay, between two characters past ASCII that show, three in a row at most, so 👩👩👧 shows as one; agents' words to each other keep them by the same rule. - Panes, which a tab is split into, side by side or stacked. Each shows a terminal, a chat with an agent, a file being edited, or one of the other kinds: an explorer, a board, a review, or a chat's browser page. A split shares its space equally until you resize it.
Workspace names are unique on each machine, so one from another machine can
share a name with one of yours. It then shows its machine after its name, as
notes@desk; showhost changes when.
:workspace notes@desk switches to it by its machine, and :workspace notes
alone to your own.
A tab says what its chats are doing after its name: ⋯ while one's agent is
at work, ? while one asks you something, and • when one finished while
this window wasn't showing it. A workspace in the top bar says the same of all
its chats, so a chat in another workspace that wants you shows there. Where
several would say different things, the one that needs you most shows: ?,
then ⋯, then •. A tab whose program says how far a long task has got ends
with that last: 42%, … busy, ‖ paused, or ✗ failed (see
progress).
What's unseen is each window's own: a chat counts as seen once its tab is
shown in a focused window, and a chat finished while no window or phone was
looking is unseen to a window that comes to it later. A chat that starts again
loses its •. While the daemon is out of reach, no chat is said to work or
ask. A window also shows a
desktop notification
for a chat it marks, as it finishes or asks.
The daemon keeps all of them, as it keeps terminals. Closing the window closes nothing, and the next window opens on the workspace, tab and pane last used. Each window shows one workspace, so two windows can show two workspaces, or two tabs of one.
Zooming a pane #
Ctrl+B z, or :zoom, zooms the focused pane: it
fills its tab, and the tab's other panes are hidden, still running. The tab's
name ends with Z while it's zoomed. The same key, or :zoom again, puts
the splits back as they were.
Going to another of the tab's panes, as Ctrl+B h or
Ctrl+L does, or splitting a pane in it, puts the splits
back first, as tmux does. So does the zoomed pane closing. Looking at another
of its terminals on your phone doesn't, on this machine or through another, as the
phone shows one terminal at a time anyway.
The zoom belongs to the tab, which the daemon keeps, as it keeps the layout: every window showing the tab shows it zoomed, and goes to the zoomed pane. It stays zoomed through an upgrade and a restart.
Opening again what was closed #
Ctrl+Shift+T, or :reopen, opens again the
pane or tab you closed last, as a browser does. Each time opens the one before
it, back through the last 20. What comes back is what a
restart brings back:
- a terminal, as a new shell in the folder its shell was in, offering the command it was running, which R puts at the prompt;
- an editor, on its file, with its cursor and view where they were;
- an explorer or a folder, on its root;
- a chat, on its agent's session, which it goes on with.
A pane goes back where it was: beside the panes it was beside, on the same side, as big as it was. If those have gone, it goes beside the focused pane, or into a tab of its own if the tab has gone too. A tab goes back to its place among its workspace's tabs. Either gets the focus.
Only what you close is kept: a pane or tab closed with
Ctrl+B x, :close, :q and the like, in any window
or with the clackatoo command. A terminal whose program ends isn't, nor is a
subagent sent back to its
parent, which is still there. One that closes with its parent's tab, as
its parent closed first, is kept with the tab, and comes back under its
parent. A terminal you kept running
comes back offering its command, not running it. The list is the daemon's:
any window can open again what another closed. It's kept through an upgrade,
but not through a restart.
After a restart #
The daemon keeps your workspaces, tabs and panes, so they come back after a
restart, a crash or a power cut: with their names, order, splits and sizes,
and the tab and pane you were on. Each terminal comes back as a new shell in
the folder it was in, or your home if that's gone. Each editor comes back on
its file with its cursor and view where they were, still in the directory its
file was opened from (or its file's own folder if that's gone), and with its
changes not saved if it had any, as [No Name] files do; explorers and
folders keep their root; boards and reviews come back too, and chats on their
sessions, a subagent still
its chat's. Running programs don't, but what each terminal printed does (see
Scrollback after a restart). An editor whose
file has been deleted is left out.
A shutdown or reboot keeps them too, even though it ends your shells along
with the daemon. Before the machine shuts down, systemd's login manager,
logind, tells the daemon and waits for it. The daemon writes the workspaces as
they are, lets the shutdown go on, and then writes nothing more, so shells
that end with everything else don't take their panes or workspaces with them.
If the shutdown is called off, logind goes away, or the daemon is still
running a minute later, it writes them again at once and carries on keeping
them.
It also writes them before the machine sleeps. If logind can't be asked, as on
a system without systemd, the daemon's log says why in one line;
CLACKATOO_LOGIND=off in the daemon's environment stops it asking, as
CLACKATOO_DISPLAY=off does for tests. A terminal
whose shell a signal ended (SIGTERM, SIGHUP or SIGKILL, which a shutdown or
systemctl stop sends) keeps its pane for 2 seconds. If the daemon is asked
to stop in that time, the pane is kept and comes back like any other, in the
folder its shell was in. Otherwise it closes. A shell that exits by itself,
with exit or Ctrl+D, still closes its pane at once,
even as the daemon stops, and so does a terminal an agent started.
Signing out stops nothing while you
linger, and a daemon that isn't in a
scope of its own outlives your sign-outs too.
A terminal whose shell was running a command shows "was running: cargo watch"
at its bottom right. In normal mode, R puts the command at the new shell's
prompt, where you read it and press Enter to run it; Esc
dismisses it, and selecting either does the same. Nothing runs by itself.
Typing into the terminal dismisses it too, in every window. This works in
bash, zsh, and fish 4 when clackatoo starts them as your shell: their
integration marks each command with a secret only it and clackatoo know, and
only a command marked so is offered, never one a program printed. A command
the shell keeps out of its history is never offered: one typed with a space
before it, one bash leaves out (HISTCONTROL, HISTIGNORE), one your
zshaddhistory or fish_should_add_to_history turns away, and everything in
fish --private. bash is cautious here: with ignoredups (part of
ignoreboth) or erasedups, running the same command twice in a row gives no
offer for the second. A terminal started with a command of its own, or a shell
started any other way, comes back without an offer. An offer not yet taken or
dismissed stays through an upgrade, which makes no new ones, and shows in a
workspace on
another machine
too. An upgrade from a release before this one, which can't hand its offers
over, takes those still open from the workspaces it kept, once, unless what's
kept differs from the panes it hands over, as when its last write failed.
To start once with none, run clackatoo stop, then
clackatoo daemon --fresh.
Scrollback after a restart #
Each terminal's history comes back with it, above the new shell's prompt: its
last 10,000 lines, with their colours, weights and underlines, and the lines
on its screen. A window draws them dimmed, under a line across the pane that
says when the restart was: ── restarted 9 Nov 14:02 ───. That line is drawn
by the window, not printed into the terminal, so no program can write over
it; a window or phone from before this release shows its text as a plain
line. It's history only: nothing in it runs, or reaches the new shell.
Restarted again, a terminal keeps the lines from before each restart, each
restart's line among them.
When it's written: the daemon notes which terminals printed something, and
writes theirs every 30 seconds, as it stops or upgrades, and before the
machine sleeps or shuts down (logind waits for it, as it does for the
workspaces). A crash, a power cut or kill -9 keeps what was written last.
Writing happens on a thread of its own: the daemon only takes a copy of each
terminal's newest lines, which it can do in a moment, and leaves turning them
into a file to the thread. A terminal printing without a pause is put off a
few rounds, until its output rests. A daemon started with
--scrollback-compaction off keeps fewer lines: the newest that fit in 2 MiB
of cells.
Where: a file for each terminal in ~/.local/state/clackatoo/history, a
folder only you may open (0700), each file only yours to read (0600), written
beside its old copy, synced and renamed over it, so a crash leaves the old one
or the new, never half of one. Each holds at most 10,000 lines and 8 MiB of
text, compressed. A terminal you close takes its file with it, and a restart
removes the files of terminals that didn't come back. Only the daemon that
keeps the workspaces keeps terminals' history.
What's never kept:
- an agent's own terminals, and the panes that show what an agent's command printed;
- a terminal you marked off (below), but for the commands you kept;
- what a program marked
nosaveorsecret(see secret regions), and a line you typed a password on unseen: a run of them comes back as[secret output not kept]. A program can ask for what's kept to be forgotten too, as:forgetdoes.
Your say over it:
| Command | What it does |
|---|---|
:forget | Drops what's kept of the focused terminal at once, and what it shows now: only what comes after is kept. |
:keep history off | Keeps none of its history from now on. The mark is kept with the layout, so it lasts across restarts. |
:keep history on | Keeps it again. |
gs in normal mode | In a terminal marked off, keeps the command the cursor is on, with what it printed, all the same. |
These are yours alone: no agent's tool asks them, and a device on the web app can't.
Settings, in the daemon's environment:
| Variable | Default | What it does |
|---|---|---|
CLACKATOO_HISTORY | ~/.local/state/clackatoo/history | The folder it's kept in, or off to keep none. |
CLACKATOO_HISTORY_LINES | 10000 | The most lines kept of each terminal. |
CLACKATOO_HISTORY_EVERY | 30 | How often, in seconds, what changed is written. |
Images programs show aren't kept: what comes back is the text around them.
Keeping a terminal running #
:keep marks the focused terminal to run its command again by itself as the
daemon starts afresh, in its folder: the one exception to nothing running by
itself, and only because you asked. Its command is the one its shell runs, or
else ran last, as the shell's integration said it with its secret, taken as
you mark it and kept: never what a program printed, nor whatever runs later. A
shell that hasn't said, as one clackatoo didn't start as your shell, can't be
marked. A terminal marked so offers nothing after a restart: it runs. The
secret is one of the shell's variables, so any code running in the shell, a
command typed at it, yours or an agent's, a function or a script it sources,
can read it. What the shell said a command is stays, whatever that command
prints with the secret while it runs; but once it has printed the marks that
say it ended (D;0), it can say another started, with the secret, and that's
the command an offer or :keep would then take. The secret tells a program
from the shell, not code you let into the shell from the shell itself, which
could as well edit your ~/.bashrc. Read what :keep says it keeps.
| Command | Does |
|---|---|
:keep | Runs its command again as the daemon starts afresh. |
:keep always | That, and runs it again as it ends: a second after its shell's prompt comes back after that very command, never after one you ran since, and in a new shell in its pane if the shell itself ends. Each time it ends again within ten seconds of starting it waits twice as long, up to a minute, and after five such ends in a row it gives up until you mark it again. |
:keep off | Takes the mark away. |
It's only ever typed at the shell's prompt, while the shell has the terminal
to itself. The marks that say a command ended and a prompt began aren't
signed, so a program can print them; so a command's end is taken for one, and
anything typed, only while the terminal's foreground process group is the
shell's, the shell is still the program it started as, not one it exec'd,
and it runs nothing in its own group, as a shell without job control does; and
typing waits a tenth of a second to see that still holds. That leaves a
little: a program that has left the shell's group yet reads the terminal, or a
command line whose programs follow one another faster than that, could still
be typed into. So could the shell's own read, select or zsh's vared,
which the shell runs itself, so nothing tells them from its prompt: a kept
command that's a function or script printing text it fetched, then asking with
read, could have that text mark an end and a prompt, and the command would
be typed as the answer. A run the daemon typed is the command's even if your
shell doesn't sign it, as bash doesn't sign a command it leaves out of its
history with ignoredups.
A $SHELL that starts another shell rather than becoming it, as sh -c fish,
a distrobox or toolbox wrapper, or a nix-shell does, never has its terminal
to itself: nothing is typed into its terminals, by this or by agents'
run_in_terminal, and what's said names the cause. Set the daemon's $SHELL
to the real shell.
Typing into a terminal kept running always, as Ctrl+C to
stop it, or a command typed ahead while it runs, pauses running it again: the
user has taken over. Its tab says ↻‖, and as the command ends it offers R
to run it again, as after a restart. Marking it again, :keep always, ends
the pause. So does running the command there again yourself, but only when
your shell signs it: bash with ignoredups or ignoreboth, as Ubuntu sets
it, doesn't sign the same command twice in a row, so R and Enter
leave it paused, and :keep always is the way out. The mark stays for the
next fresh start meanwhile, and the pause, and the waits between runs, outlast
an upgrade and the tab going to the background and back.
A tab holding a terminal kept running says ↻ after its name, ↻‖ while
paused, and ↻✗ once it has given up; so does a
background tab in the list. Only you set the mark, from a
window or with clackatoo keep, and a device
on the web app can't.
Agents' tools
don't set it, and refuse a command line that runs clackatoo keep or
clackatoo bg; but that's a guard against mistakes, not a boundary: a command
an agent types into a terminal follows the
ask-before-running rules,
and a script it runs could do anything you could. clackatoo keep run in the
terminal itself keeps the command before it, never itself. The mark is kept
with the workspaces, and handed over as the daemon upgrades, which keeps
terminals running anyway. A terminal on another machine can't be marked from
here.
A pane closes when its program exits, as in other terminals. A tab closes with its last pane, and a workspace with its last tab, unless it has a background tab still running, which comes back in its place. When the last workspace closes, so does the window.
Background tabs #
A background tab is a tab kept running out of the tab bar, as a web server or
a trail serve you only glance at now and then, so it doesn't take a tab's
place. It keeps its splits, and holds terminals alone. Each workspace has its
own; the daemon keeps them, so every window and the
web app sees them, they're handed over as the
daemon upgrades, and they come back after a restart as tabs do, each terminal
a new shell offering R to put what it ran at its prompt. A window from
before protocol 96 doesn't show them, and leaves them be.
| Keys | Command | Does |
|---|---|---|
Ctrl+B b t | :bg | Sends the tab shown to the background. The workspace's only tab can go too: a shell in its folder takes its place. |
Ctrl+B b p | :bgpane | Sends the focused pane to the background, in a tab of its own. A tab's last pane takes the tab with it. |
Ctrl+B b l | :Background | Lists the background tabs. Selecting the icon after the tabs does too. |
:bg CMD | Starts CMD in a new background tab of the workspace shown, typed at a new shell's prompt in the focused pane's folder, as you would type it, so its shell's marks say when it runs and how it ends. Nothing is shown. clackatoo bg does the same from a shell, and an agent can too, with run_in_background. |
After the tabs, an icon says how many of the workspace's background tabs are
running: ⚙ 2. A tab counts as running while a command runs in one of its
terminals, as their shells' marks say, which bash, zsh and fish 4 make when
clackatoo starts them as your shell; one whose shell is at its prompt again is
idle, and a terminal whose shell doesn't mark its commands counts as running
while it's alive. With none running, the icon goes. A command in one that
fails, or a shell in one that exits with a failure, turns the icon red with
its exit status, as a failed command's mark is, ⚙ 1 ✗ 2, until a window
lists them.
The list is the finder's, with this workspace's background tabs
first, then the other workspaces': each with its name (its program's title,
else the command its shell runs or ran last, else its folder), how it's
getting on (running, idle, exited 2, with any failure since in red), the
TCP ports its programs listen on (· :8080), and the workspace of one from
another. Beside them is the last screenful of the one picked. Both are looked
at again every two seconds while the list is open, and never while it's
closed: the daemon finds the ports apart from its other work, from the sockets
the processes of each terminal's shell's session hold, so a server that leaves
its shell's session, as a daemon does, isn't seen. Typing narrows them.
| Key, in the list | Does |
|---|---|
| Enter | Brings it back as a tab of its workspace, after the others, going there. A terminal of it whose shell has exited starts again as a new shell in its folder, offering R to put what it ran at the prompt. |
| Ctrl+D | Dismisses it, closing its terminals. One still running asks first, in the list's top right: a second Ctrl+D within three seconds ends it. |
| Ctrl+F | In a window on another machine than the daemon, or for a background tab of another machine's workspace, forwards the ports it listens on here, each to the same port, as :portforward 8080 does. |
| Esc | Closes the list. |
A background tab whose terminals have ended stays, its last screen readable, until it's dismissed or brought back: nothing vanishes by itself. Closing a workspace closes its background tabs with it; a window from before protocol 96, which doesn't know they're there, can't. A workspace keeps 64 background tabs at most, and chats don't go to the background, only terminals.
A workspace on
another machine
shows its background tabs here as your own do: in its icon, in the list, with
the ports they listen on and their ↻ marks, and everything above works on
them, on that machine: :bg, :bgpane, :bg CMD (in its focused pane's
folder there), Enter, Ctrl+D and :keep.
:bg CMD beside a pane of one of your own workspaces borrowed from another
machine runs the command on that machine, in that pane's folder: a new shell
it lends you, in a background tab of your workspace, which shows how it's
getting on as that machine says. It's kept, once its program ends, until you
dismiss it, which closes it there (once that machine is reached again, if it
can't be now), or bring it back, as a tab of your workspace, a new shell there
if it had ended. It comes back after either machine restarts, and through
either upgrading. That machine needs this release of clackatoo or later. A
borrowed pane itself can't go to the background, nor can a tab holding one.
The command line #
In normal mode, : opens a command line, in the palette in the middle of the
window. Enter runs the command. Esc, or
Backspace past the colon, closes it.
While it's open, the bottom bar keeps the mode and the tabs, and the focused
pane's cursor is drawn hollow, since what you type goes to the line. The same
holds for a search, a new name, the finder and the machine picker. Suggestions
appear as you type without changing your text, with short descriptions beneath
their names. Commands, options, and argument choices explain their purpose;
file, workspace, and machine suggestions explain what selecting them does.
Tab completes the word before the caret: a command's name, a kind
of pane after a split's mark (:|Te), an option after :set, with no or
inv before a switch and name= before a choice's values, a file or folder
after :e, :w, :Editor and :Explore (spaces in names are written \ ),
a workspace after :ws, a machine after a kind of pane's @ and after
:ws new@, a lesson after :Tutor, and the words :gitsigns, :devices and
:Review take. One choice goes in when you press Tab. With more,
Tab and Shift+Tab, or
Ctrl+N and Ctrl+P, cycle through
the matches; once cycling, Down and Up do too, and past
either end back to what you typed. Enter runs only the text in the
prompt, and Escape closes it. Files are looked up in the background
and complete only when the focused pane's files are on this machine; a slow
folder says listing… while it's read. Connected host names are suggested as
you type; explicit Tab also includes SSH config and recent
connections.
Up and Down go back through the commands you've typed,
in this window and others, keeping to those that start with what's typed.
They're kept in clackatoo/history under $XDG_STATE_HOME, the last 100,
readable only by you; a line you start with a space isn't kept, nor is a
device's pairing code, and a line of either kind is left out when the file is
read, if an older build kept it. Left, Right,
Home and End move the caret, and Ctrl or
Shift with Left or Right move it a WORD,
anything between blanks, as Vim's command line does. The command line, every
pane's search (a terminal's, an editor's, a chat's, an explorer's, a board's,
and a review's) and an editor's new name all take keys this way; the names and
entries typed into an explorer or a board, and the finder, don't.
Ctrl+U deletes everything before the caret, and
Ctrl+W or Ctrl+Backspace the word
before it. Alt and a key types the key's character.
Ctrl+R and a register's name puts in what the register
holds: Ctrl+R Ctrl+W the word
under an editor's cursor, Ctrl+R : the last command,
and Ctrl+R / the last search. A count before : in an
editor starts the line with that many lines, 5: giving :.,.+4; in any
other pane, 5: opens the command line as : does. From a selection it's
'<,'>, count or not.
| Command | Does |
|---|---|
:portforward 8080, :portforward 3000:host:8080, :portforward, :portforward! 8080 | In a window on another machine, forwards a port here to one there, lists the forwards, or stops one: see Forwarding ports. |
:Terminal | Opens a terminal in a new tab. |
:|Terminal | Splits the focused pane, with a new terminal to its right. |
:|<Terminal | The same, to its left. |
:-Terminal | The same, below it. |
:-^Terminal | The same, above it. |
:Terminal@desk, :|Terminal@desk… | The same, on the machine named after @: one the daemon is connected to, by its connection's name, or local for the daemon's own. Any kind of pane takes one: :Editor@desk PATH, :Explore@desk, :Agent@desk codex. |
:Agent, :|Agent… | Opens a chat with an agent, the one named after it (:Agent codex) or the agent option's, in a new tab or beside the focused pane. |
:Board NAME, :Boards | Opens a board shared with agents, making it if there's none; :Boards picks one in the finder. |
:update, :update HOST | Installs the latest release here, as clackatoo update does, and says in the bar how it went; with HOST, on the remote daemon's machine, in a tab of its own. Once a day the window looks for a new release and says so quietly in the bar; it never installs one by itself. |
:Tutor, :Tutor NAME, :Tutor new | Opens the tutor: its lessons in the finder, the lesson called NAME, or what's new. |
:Editor PATH, :|Editor PATH…, :e PATH, :e | Edits the file, in a new tab or beside the focused pane; :e in place of the file an editor shows, and alone, an explorer beside an empty file. |
:Files, :Grep PATTERN, :Buffers, :Diagnostics, :Symbols, :ProjectSymbols NAME | Opens the finder, with what follows typed. |
:Registers, :reg | Lists what an editor's registers hold, by its cursor. |
:nohlsearch, :noh | Stops lighting up what the last search matched in the focused pane, an editor's, a terminal's, a chat's or a list's, until the next search, n or N. Esc in normal mode does too. |
:Messages, :mes | Shows what the bottom bar has said lately, above it, until the next key. |
:Marks | Opens the finder on the marks the focused file can go to. |
:1, :2… | In an editor, goes to that line, as Vim does, as do :$, :+3 and :'a. Elsewhere, moves to that tab of the workspace shown. |
:s/old/new/, :%s/old/new/g… | Replaces text in the focused editor, with Vim's ranges and flags. |
:g/pattern/d, :v/…, :d, :y, :m, :t, :normal | Vim's commands for lines, in the focused editor. |
:workspace NAME, :ws NAME | Switches to the workspace called NAME, making it if there's none. Without a name, makes a new workspace, named with the lowest number no workspace has. :ws new@desk NAME makes one on desk, as does :ws NAME@desk if desk has none of that name. |
:rename NAME | Renames the workspace shown. |
:bg, :bgpane, :Background | Sends the tab shown, or the focused pane, to the background, or lists the background tabs. |
:close | Closes the focused pane, hanging up its program. A subagent's pane only closes: the chat goes on in the background, a card in the chat that started it. |
:reopen | Opens again the pane or tab closed last. |
:zoom | Zooms the focused pane to fill its tab, or puts the splits back. |
:hints | Labels what's worth picking in the focused pane, as hints say. |
:q | The same, unless the pane is the last showing a file with changes that aren't written. :q! closes it anyway, throwing them away. |
:bd, :bdelete | Closes the focused chat for good, pane and all: a subagent's too, which :q and :close only send back to the background. |
:w, :wq, :e!… | Write the focused pane's file, and the rest of Vim's commands for files: see Editing files. |
:reload | Runs the config again, from the start. |
:set nonu, :set rnu!… | Changes options, or shows them, as Vim's :set does. |
The first character of a split says which way the divider runs, | upright or
- flat, and < or ^ after it puts the new pane first. A mark alone opens
a terminal, so :| is :|Terminal. Capitalised words name kinds of pane:
Terminal, Agent, Editor, which takes the file's path after it, and
Explore (or Ex), which takes a folder, and Review; :|Explore and
:-Review open a new explorer or review beside the focused pane.
Canonical names use capitals for panes, pickers and overlays (Terminal,
Files, Registers, Marks, Messages), and lowercase for actions
(write, format, agentundo, reviewkeep). Command names and their
aliases ignore case: :Terminal, :terminal, and :TERMINAL do the same
thing. Autocomplete always shows the canonical spelling and matches regardless
of case. Existing spellings still work. Arguments keep their case, including
filenames, hosts, patterns, option values and Normal-mode keys. Mixed-purpose
commands such as set and connect are named for their primary action;
edit operates in the current editor, while Editor opens a pane.
A number goes to that line in an editor, or else that tab. A command with a
range of lines before it, or one of Vim's for lines, goes to the focused
editor; from visual mode, : starts with '<,'>.
A new pane goes on the machine of the pane it's made from: the one split, or
the focused one for a new tab or explorer, so :Terminal, :e, :Explore
and the finder in a pane on desk are desk's. @host after a kind of pane
picks the machine instead (see
a pane on another machine).
A new terminal starts in the directory that the pane it splits is in. A new tab's terminal starts in the directory of the workspace's focused pane. That's the directory of whatever is in front in that pane, such as a nested shell or an editor that changed directory, or else the shell's own.
Workspace names are unique, and can't contain @, which names workspaces on
other machines. If a command fails, such as renaming a workspace to a name
another has, the bottom bar says why until the next key, in red, and if that's
too long for the bar, whole above it for a few seconds. :Messages shows what
the bar has said lately. A command, an option or a lesson that isn't one says
only so, as no command ‘nonsens’, and offers the nearest name when a letter
or two is off: :Fils asks did you mean ‘:Files’?, and :set nonumbr asks
about ‘:set nonumber’. It never offers :q or :wq for a slip. Suggestions
list the matching names as you type.
Resizing panes #
Drag the gap between two panes to move it. It moves a whole column or row at a time, and the programs on either side are told their new size as it goes. A double click on the gap shares that split's space equally again.
In normal mode, Alt+H, Alt+J, Alt+K and Alt+L move the focused pane's edge on that side by a column or row, so Alt+L widens a pane with a pane to its right. A pane with no edge on that side moves its other edge instead, so Alt+L narrows the rightmost pane. No pane gets smaller than one cell.
A new pane in a split gets the split's average share, so a split you never resized stays equal. Sizes are kept by the daemon, like the rest of the layout, and other windows show the change.
Moving around #
In normal mode, Ctrl+H, Ctrl+J,
Ctrl+K and Ctrl+L move to the pane
to the left, below, above or right. Tabs are :1, :2 and so on, and
workspaces :ws NAME. Ctrl+B does all of
this in either mode.
Wherever you go, you arrive in the window's mode. That holds when you move,
use the mouse, switch tabs or workspaces, jump, or open a pane, and when the
pane you were in closes because you closed it, or its program ends right after
you typed into it, as after exit or Ctrl+D. Arriving
in insert mode, a terminal goes back to its live screen and a chat to its
message box. An editor types at its cursor once its file's text has come;
until then, what you type waits for it, and any other key, such as
Esc or Ctrl+B, is had at once in normal mode.
A chat that's asking something is arrived at in normal mode, so a key can't
answer it by chance. If anything else moves the focus, such as another window
or an agent closing the pane or opening a file in it, you arrive in normal
mode and the window goes to normal mode, so nothing you type lands where you
didn't choose. Leaving a pane ends a selection, a half-typed command, a search
or the command line. The pane keeps its place in history, or its cursor.
The window remembers where you've been, as Vim's jump list does: the panes you
moved between, and the places you jumped from in files, folders, terminals,
chats and lists. Long moves such as gg and G, and accepted searches
including n and N, are jumps. Search previews do not add places.
| Keys | In | Does |
|---|---|---|
| Ctrl+O Ctrl+I | normal mode | Back and forward through the places in the tab shown. A count goes that many places: 3 Ctrl+O goes back three, or nowhere if there aren't three. |
| Ctrl+Shift+O Ctrl+Shift+I | either mode | Back and forward through everywhere: panes, tabs, and workspaces. |
Going back first remembers where you are, so going forward comes back to it. Going back and then jumping somewhere new forgets the way forward. Panes that have closed are skipped. Each window has its own list.
Hints #
Ctrl+B f, or :hints, labels everything worth picking
in the focused pane with a letter or two, as kitty's hints and tmux-fingers
do: URLs, file paths with their :line:col, mail addresses, IP addresses, and
git hashes (7 to 64 hex digits, holding a digit and a letter). It reads what
the pane draws, so it works the same in a terminal, an editor, an explorer, a
board, a review or a chat. A link wrapped over two rows of a terminal is one
hint. Those nearest the bottom get the home row's letters first.
| Type | Does |
|---|---|
| A label | Opens it, as Ctrl+click does: a URL with your browser, asking first for one that isn't a plain web link or a mail address; a path in an editor at its line, from the pane's folder; a mail address in your mail program. What can't be opened, such as a hash, is copied. |
| A label, Shift on its last letter | Copies it, as Ctrl+Shift+C copies. |
| A label, Alt on its last letter | Types it into the pane, as a paste: at the prompt, at an editor's cursor, or in a chat's box. |
| Backspace | Takes back the last letter typed. |
| Esc, or any other key | Puts the labels away. |
The hintpattern option adds a
regular expression of your own, as Rust's regex crate reads it:
client.opt.hintpattern = [[CLACKA-\d+]] labels issue numbers too, and
several join with |. One that can't be read is said in the bar, and left
out. A Markdown file shown rendered has nothing labelled yet.
Macros and marks across panes #
In normal mode, q and a register start recording, q stops, and @a, 3@a
and @@ replay, in editors, terminals, chats, explorers, boards and reviews.
The keys can move between panes and continue there. Explorer, board, and
review panes close with Q so q is available for recording. See
macros for registers,
waiting, and stopping on a failed command.
ma sets a mark in the current file or pane; mA sets a window-wide mark.
Backtick and the letter return to its position, and apostrophe and the letter
to its line. Capital marks can take you between pane kinds. '' returns to
the place before the last jump in this file or pane, and again comes back.
Saved terminal positions follow line numbers while history grows. A new snapshot or history renumbering invalidates them. Chat positions use absolute turns, so loading older messages preserves them; replacing a branch invalidates them. Folded chat content opens when returning to its mark. Marks on live activity cards are not kept until their content is part of a turn. Boards and reviews restore entries by identity, and an explorer remembers its path. Known missing items and closed panes are skipped in jump history; a missing named mark reports that its position is unavailable. Marks and jump history are local to this window and are not kept on restart.
Ctrl+B #
Ctrl+B and one more key work in either mode, as tmux's
prefix does. While Ctrl+B waits, the bottom bar marks it
^B by the mode, and a panel above the bar lists every key it takes, with
what each does; a key that starts others says + and what follows. With two
panes or more, each shows its number. Other keys that start others, as
Space does in normal mode, are marked at once and list theirs after
whichkeydelay, so keys typed quickly never flash the panel. The panel is
made from the bindings: a key your config binds says what its desc says, or
"from your config" without one, and a key that starts others says + and its
group's name, as Space p says +project, or else what they
share, or how many keys can follow. Esc, or any other key, cancels.
These keys, and the others on this page that the window takes rather than the
program, are bindings like any you make, so
the config can change them or take them away.
| Ctrl+B, then | Does |
|---|---|
1–9 | Moves to that tab. |
c | Opens a new tab. |
] [ | Moves to the next tab, or the one before, round from the last to the first. |
, | Renames the tab. |
p, then 1–9 | Moves to that pane. Each pane shows its number, counting left to right and top to bottom. |
h j k l | Moves to the pane to the left, below, above or right. |
| - | Splits the pane, with the new one to the right or below. |
a | Opens a chat with an agent to the right. |
x | Closes the pane; a subagent's goes back to the background. Ctrl+Shift+T opens it again. |
z | Zooms the pane to fill its tab, or puts the splits back. |
f | Labels what's worth picking in the pane, as hints say. |
u | From a subagent's pane, goes to the chat that started it. |
w | Opens the workspace picker. |
r | Opens the machine picker, to open a window on another machine, as :connect does. |
o i | Back and forward through the tab's places, as Ctrl+O and Ctrl+I do in normal mode. |
b, then t p l | Sends the tab or the pane to the background, or lists the background tabs. |
| Ctrl+B | Sends Ctrl+B to the program. |
The workspace picker lists the workspaces whose names hold what you type, those starting with it first. Up and Down, or Tab and Shift+Tab, pick one, and Enter moves to it. If nothing matches, Enter makes a workspace by the name typed.
The finder #
The finder picks a file from the project the focused pane is in: the files git
doesn't ignore, leaving out hidden ones; or with :Grep, the lines in them a
pattern matches; or the files open. It looks from the project's root: the one
the file's language server was started for, or else its repository's, or for a
terminal, the repository its program is in. Outside your home directory, only
a project is searched, never a bare directory.
| Keys, in normal mode | Opens |
|---|---|
<Space>pf | The project's files |
<Space>bs | The symbols in the focused editor's file: its functions, types and their fields, in the order of the file's outline, each indented inside what it's in, with what it is; past 5000, the count ends + |
<Space>ps | The shared index's project symbols, matched by identifier and path word prefixes as typing pauses, with previews and partial-index status |
<Space>bo, <Space>bO | Toggle the editor's outline panel, or focus it without closing it |
<Space>e | Opens the tab's file explorer, goes to it, or closes it |
<Space>a | Mentions the focused editor's selection, or its file, in the chat beside it, as :Ask does (see Mentioning files) |
<Space>pgf | A grep of them, as you type |
<Space>? | The files open, [+] after those with changes |
<Space>ds | What's wrong in the project's files, as their language servers say, the worst first: the files open, and those not open that a server has checked, as rust-analyzer checks a whole crate, each error, warning, info or hint in the editor's color for it |
What you type matches as fzf's does: letters in order, words each on their
own, 'word exactly, ^word at the start, word$ at the end, !word leaves
out. A grep's pattern is a regular expression, or plain text if it isn't one.
The letters it matched are picked out, in every list.
The project symbol finder
uses the shared code index and installed grammars. It does not need a language
server, and shows partial results while indexing. An older daemon keeps its
language-server symbol search. <Space>bs remains the language-server file
picker. The outline panel
uses the shared index and follows the editor's file and cursor.
When nothing matches what you type, the list says so once it has finished looking.
| Key | Does |
|---|---|
| Down, Ctrl+N; Up, Ctrl+P | The next or previous one |
| Page Down, Page Up | A page further or back |
| Home, End | The first or the last |
| Enter | Opens it in place of the focused pane's file, as :e does |
| Ctrl+V, Ctrl+X | Opens it beside the focused pane, or below |
| Ctrl+T | Opens it in a new tab |
| Ctrl+U, Ctrl+W | Deletes what's typed, or its last word: its last letters and digits, and anything after them, as in a list's prompts |
| Esc | Closes the finder |
A click picks one, a double click opens it, and the wheel moves through them.
A paste is typed on one line, its line breaks as spaces. The
machine picker and the
start page take the same keys
for what's typed, for moving, and for the mouse. Beside the list, if the
window is wide enough, is the file round the line picked, colored as an editor
colors it, with a grep's match picked out in its line. A file that's open is
colored as its buffer is; one that isn't is colored by the language its name
ends in. A name with no ending such as Makefile, a language that isn't
installed, or a daemon older than protocol 84 leaves it plain, and a preview
from the middle of a file can be colored wrongly inside a long comment. An
empty file says so. Opening one is a
jump, so
Ctrl+O comes back. Space starts these keys in
normal mode, so Space alone doesn't move the cursor, unless a
command is half typed, as in d<Space>.
Daemon background work #
The bottom bar's Working · N indicator opens the daemon's live work list.
:Work opens it too. See Background work
for progress, cancellation and recent outcomes.
Typing, Scrolling, and the Mouse
clackatoo / Reference
In insert mode, what you type goes to the focused terminal's program, and the wheel follows the mode of the pane under the pointer.
Typing #
In insert mode, keys reach the program the way xterm sends them, which nearly every program understands:
- Text types itself. Ctrl with a letter sends its control character (Ctrl+C, Ctrl+D…). Alt sends Escape before the key.
- Enter, Backspace, Tab, Shift+Tab, and Escape send their usual codes. Ctrl+Backspace deletes a word in most shells.
- Arrows, Home, End, Insert, Delete, Page Up, Page Down and F1 to F12 send escape sequences, with any modifiers held.
- When a program asks for them, arrows and the number pad send application codes, which Vim and less expect.
Ctrl+Shift+V pastes, and
Ctrl+Shift+C copies text
selected with the mouse; neither reaches the program. If the
program has asked for bracketed paste, the text is marked as pasted, so
editors don't treat it as typing and shells don't run it line by line.
Otherwise newlines are sent as Enter, but for those at the very
end, which are dropped, so the last line pasted waits at the prompt rather
than running, even with blank lines copied after it, as yj over a command
and the blank line under it copies. Only the end is kept from running: every
line before the last still runs, as Enter would run it. Either way,
control characters other than tab and line breaks are left out, as xterm
leaves them out, so text a program
copied can't act as keys when you
paste it: an escape as an arrow, or Ctrl+C. Whether the
program asked for bracketed paste is as the window last saw it, so a paste
right after a command starts can reach a program, or a shell, that has turned
it off since, and be typed as keys. The phone pastes the same way, and asks
first when lines before the last would run.
Typing while scrolled up returns the view to the live screen.
Pasting an image #
Ctrl+Shift+Alt+V pastes the image
on the clipboard, such as a screenshot, into the program, in insert, normal or
visual mode; in a chat it attaches the image to
the message, as Ctrl+Shift+V does there. In a
terminal, the daemon whose terminal it is, on this machine or
another,
keeps the image in a file of its own, ~/.cache/clackatoo/pastes/ then the
time it was pasted, as 20261108-224501-1.png, and pastes the file's path, as
dropping a file on the terminal does. Claude Code, Codex, and other programs
that take images read a pasted image path as the image. At a shell's prompt
(bash, zsh, or fish) the path is quoted if it needs to be and has a space
after it; any other program gets the path as it is. What you type while the
image is on its way, as Enter, follows the path, never goes before
it. A path with a control character in it, from a folder named so with
CLACKATOO_PASTES, is never typed: the bar says so. The folder is only yours,
as is each file, and images are deleted after three days, the oldest first
once together they're over 256 MiB. An image is at most 16 million pixels and
about 6 MiB as PNG, as in chats.
With :set pasteimage=clipboard, the daemon instead puts the image on its own
machine's clipboard, with wl-copy or xclip, in the desktop session it
follows, then types
Ctrl+V, for a program that reads the clipboard itself,
as Claude Code does. wl-copy or xclip runs with the daemon's own
environment, with the desktop's display variables in place of the daemon's,
never a terminal's or an agent's. That needs you signed in to that machine's
desktop: if you aren't, or neither program is installed, it pastes the path
instead, and the bottom bar says why.
Ctrl+Shift+V pastes text only. When the
clipboard holds an image and no text, the bottom bar says which keys paste it:
PasteImage's, as you've bound them. :Tutor has a step on it.
Text can be typed through an input method, as Chinese, Japanese and Korean
are, such as IBus on GNOME. What's being composed shows underlined where it
will go, at the cursor or in the bottom bar, with the input method's choices
beside it, and the text chosen is typed as if keyed. The input method is used
in insert mode, the command line and searches; in normal mode, keys are
clackatoo's commands, so it's left out, and it's never used for a password.
:set noime turns it off.
Scrolling #
The mouse wheel scrolls the pane under the pointer. Over a window bar or gap, it scrolls the focused pane instead; this also works for editors, explorers, boards and reviews, including smooth scrolling and trackpad motion. In a terminal, it scrolls history in either mode. On the alternate screen, which full-screen programs use and which has no history, the wheel sends arrow keys instead in insert mode, so less, Vim and htop scroll themselves. In normal mode it moves normal mode's cursor up and down there, and never reaches the program. The wheel follows the mode of the pane under the pointer, and the focused pane's is the window's. A program that takes the mouse gets the wheel itself, in insert mode.
While the view is scrolled up, a pill at the pane's bottom right says how far,
and how to get back: ↓ 42 lines · G to return in normal mode,
type to return in insert mode, where typing goes back to the live screen. A
pane without the focus says only how far. In a pane too small for the pill,
the bottom bar's note says it instead, as ↑42. New output doesn't move what
you're reading.
The mouse #
Selecting a pane focuses it. What else the mouse does depends on the program in the pane.
Selecting. Usually the mouse selects text:
- Dragging selects characters. Dragging past the top or bottom of the pane scrolls it.
- A double click selects a word. Paths and URLs count as one word, so
~/src/main.rscomes whole. - A triple click selects whole lines.
- With Alt held, or Ctrl and Alt, dragging selects a block of columns. Over a program that takes the mouse, add Shift.
Letting go copies the selection to the primary selection, "*, and a middle
click pastes it, as elsewhere on Linux. It goes only there, as Vim puts a
mouse selection in "* and leaves the unnamed register as it was, so p in
an editor still puts what you last yanked. A middle click also focuses and
pastes into editors and chats, and into searches or names already being typed
in explorers, boards and reviews.
Ctrl+Shift+C copies it to the clipboard, and
"+, as shown: by characters, with no newline after a last line, even of
lines a triple click selected. And y in normal mode yanks it, as y yanks
anything, into the
registers; a count
or a register typed first, as "a, waits with the selection, as in Vim's
visual mode, so "ay keeps it in "a. Meanwhile the bar says VISUAL (or
V-LINE, or V-BLOCK). Any other key forgets it. The selection stays highlighted
until the next key or click. In normal mode, a click also moves the cursor
there.
Programs that take the mouse. Programs such as Neovim, htop and less can ask for clicks, drags and the wheel, and get them while their pane is in insert mode on the live screen. The pointer is then an arrow rather than a text cursor. Hold Shift to select text anyway. A drag stays with the pane it started in, even when the pointer leaves it.
Programs that ask are also told when their pane gains or loses the focus, which Neovim uses to reload files changed meanwhile.
Links. Hold Ctrl and the link under the pointer is underlined,
and the pointer becomes a hand. Ctrl+click opens it. Links are what
programs print as links (ls --hyperlink, gcc, systemd, and git do), plus
URLs (http://, https://, file://, mailto:) and file paths in the text,
such as src/main.rs:12:5 from rustc or src/main.rs:12: from grep. A URL
opens in your browser, or whatever the desktop opens it with. A link's text
needn't be where it goes, so only a plain http:// or https:// address, or
mailto: and an address alone, opens at once; for any other, such as ssh://
or git://, whose handler could take part of it for an option, the bar asks,
with where it goes shown whole under the question, every character but ASCII's
letters, digits and punctuation written as <U+202E>, so nothing in it can
hide or pass for something else: y opens it, and any other key, a paste, or
a key you didn't press for the question (one a macro or binding types, or one
pressed earlier and held while the window waited) doesn't. One too long to
show whole, over about 250 characters, isn't opened, and the bar says so; nor
is one the window was too small to show whole, until it's opened again in a
bigger one. A file opens in an editor pane at that line: in an editor already
in the tab, else beside the terminal if it's wide enough, else in a tab of its
own. A relative path is from the directory the shell is in.
Ctrl+O comes back. A file:// link naming another
machine isn't opened, and the bar says why. When a program takes the mouse,
Ctrl+click is the program's, and
Ctrl+Shift+click opens the link.
Normal Mode in a Terminal
clackatoo / Reference
In normal mode, a cursor of clackatoo's own moves through a terminal's screen and history with Vim's keys.
Normal mode #
Normal mode has a cursor of its own, a yellow block, which moves through the terminal's history and screen as one document. It starts where the program's cursor is, and the program's cursor is hidden until you return to insert mode.
| Keys | Move |
|---|---|
h j k l, arrows | Left, down, up, right. Moving up and down returns to the column you started from after passing shorter lines. |
| Shift+Left Shift+Right, Ctrl+Left Ctrl+Right | As b and w, and B and W, as in Vim. Ctrl+Home is gg, Ctrl+End goes to the last line's last character, and Shift+Up and Shift+Down page up and down. In insert mode they all go to the program. |
w b e | To the next word's start, this or the previous word's start, this or the next word's end. Words are runs of letters, digits and _, or runs of other characters; both cross line ends. |
W B E | The same, for anything between blanks. |
0 ^ $, Home End | The line's first column, its first character that isn't blank, its last character; 2$ the next line's last, a count that many lines down less one, as Vim's. |
+ - _ | The next line's first character that isn't blank, the line before's, this line's; with a count, that many lines on, back, or down less one, as Vim's do. With y, they take whole lines. Enter, Space and Backspace aren't motions in a terminal, which is typed into with them, but y takes them as Vim's does: y<CR> copies this line and the next. |
g_ | | The line's last character that isn't blank; the column a count says. |
ge gE | The end of the word before, or of the run of anything but blanks before. |
gj gk g0 g$ | As j, k, 0 and $: a terminal's lines don't wrap. |
gg G | The oldest line of history, the screen's last line, or with a count, that line, keeping the column, as Neovim's do; at its first character that isn't blank with the option startofline. |
gx | Opens the link under the cursor, as Ctrl+click does. |
f t F T, ; , | To the next of the character typed after them on the line, or right before it, or back to the one before, or right after it; ; finds it again, and , the other way, as Vim's do. The window keeps one last find, as Vim does, so ; finds again what f found in an editor, a chat or another terminal. With y, they take to it: yt). |
% { } | The bracket that pairs with the one under the cursor, or with a count, the line that far through, 50% half way; the blank line before or after the paragraph. |
( ) | The start of this sentence or the one before, or of the next, as Vim's go: a sentence ends at ., ! or ? before a blank or a line's end, and at an empty line. |
H M L | The top, middle and bottom lines in view, keeping the column as gg does. |
5k, 3w, 10G, 2gg | A count before a motion repeats it, as in Vim; before G or gg, it goes to that line, counting from the oldest line of history. 3H and 3L count from the view's top and bottom, no further than the other, but after y they go on past it, as far as history goes, as Vim's do: y99L takes up to the 99th line from the view's bottom. |
| Ctrl+D Ctrl+U | Half the view down or up, rounded down, view and cursor together. A count sets how far they go from then on, a whole view at most, as Vim's does. |
| Ctrl+F, Page Down Page Up | The view down or up, less two lines, so two lines of what was in view stay where they fit, and the cursor to its top line, or its bottom line going up, as Vim's does. At the live screen, or history's start, nothing moves. A count goes that many pages. Ctrl+B is the window's. |
| Ctrl+E Ctrl+Y | The view a line down or up, or as many as a count says, with the cursor kept in it. |
zt zz zb | The view scrolled to put the cursor's line at its top, middle or bottom, as far as history goes and no further than the live screen. With a count, that line, counted as G counts, the cursor going to it in the column it's in, as Vim's does. |
Moving past the top of the view scrolls into history. In normal mode the view holds still while output arrives, so the cursor stays on its text. On the alternate screen the cursor moves over the screen only.
The keys are read as an editor reads them, so a command half typed, as y3 or
"a, shows at the start of the bar until it's done, as Vim's showcmd shows
it. A command a terminal doesn't take, as dw, x, p or "ap, does
nothing, all its keys spent, as in a file Vim won't change: so after d, the
next key is the command's too, : included. Esc after keys half
typed only forgets them, as in Vim: vg or vi and Esc is still
in visual mode, and a second Esc leaves it. Esc after
only a count or a register, as v3 or v"a, does what Esc alone
does, and leaves visual mode.
Selecting and copying #
| Keys | Does |
|---|---|
v | Selects characters, from the cursor to wherever it moves. |
V | Selects whole lines. |
| Ctrl+V | Selects a block of columns. $ takes every line to its end, and O goes to the other corner on the same line. |
o | Goes to the other end of the selection, so that end moves instead. |
gv | Selects the last selection again, as it was; in visual mode, swaps the two. |
y, Ctrl+Shift+C | Yanks the selection into the registers, or with Ctrl+Shift+C onto the clipboard and into "+ as shown, by characters, and returns to normal mode. |
Y, in visual mode | Yanks the lines selected, whole, or a block as it is. |
yy | Copies the cursor's line, or with a count, as many lines from it: 3yy. y2w and 2yj take counts too. |
Y | Copies to the line's end, as y$ does, as Neovim's Y does; with a count, to the end of as many lines. For Vim's, the line, map it: client.keys.map("n", "Y", "yy"). |
y and a motion | Copies what the motion moves over: yw to the next word, y$ to the line's end, yj this line and the next, ygg up to the top, yH up to the view's top. |
y and a text object | Copies the object around the cursor: yiw the word, yi" what's in the quotes, yib a command's output. |
"a and any of these | Keeps what's copied in the register named, as in an editor: "ayy, "Ayw adds to "a, "+yib puts a command's output on the clipboard. A register before anything else does nothing. |
| Esc | Drops the selection. |
A selection by characters lights each line to a cell past its text, which is
what y copies; V lights whole lines, the pane's width. y on a block
copies a line for each row, without the blanks at their ends, and never joins
a wrapped line to the next. A copy stops at 100,000 lines or 4 MiB, and says
so. A daemon too old to copy blocks copies from corner to corner, and says so.
Any motion extends a selection, including gg, G and searches. What you
copy lights up for a moment, so you can see what went. Copied text is what the
program printed: a line that wrapped only because it reached the window's edge
comes out as one line, and blanks at the ends of lines are left out.
What y copies goes into the
registers exactly as
an editor's yank does: into the unnamed register, which p in an editor puts,
and "0, or into the register named before it; and, as the
option clipboard says, onto the
clipboard, as it is unless you change it, or the primary selection. With
clipboard=none it stays in the window's registers, and "+y or
Ctrl+Shift+C puts it on the clipboard. It
keeps its kind, so p puts lines copied by lines as lines below the cursor's,
and a block as a block. Lines copied by lines end with a newline, as an
editor's do and as Vim's "+yy does. Pasted into a terminal, that never runs
the line: a shell that takes bracketed paste, as bash, zsh and fish do, takes
it as text, and to any other program the newlines that end a paste aren't sent
(see Typing), though lines before the
last still run.
Text objects #
After y, or in visual mode, i or a and one more key pick out a piece of
text around the cursor, as in Vim. i takes what's inside, a takes it all.
In visual mode, the object becomes the selection.
| Keys | Picks out |
|---|---|
iw aw | A word, and with a the blanks after it (or before it, at the end of a line). A count takes that many, over lines too, a run of blanks counting as one with iw; in visual mode, with more than a character selected, it takes on another, as Vim's. |
iW aW | The same, for anything between blanks. |
i" a", i' a', i` a` | What's between the quotes on the cursor's line, as Vim's pairs them: around a quote the cursor's on, or else from the quote before it to the next, or the next pair; with a, the quotes too, and the blanks after or before. In visual mode i" again takes the quotes, and a" again the next string too. |
i( a(, i[ a[, i{ a{, i< a< | What's between the brackets around the cursor, across lines, or with none around it the next pair after it, as Neovim's; with a, the brackets too. A count goes out that many pairs; in visual mode, typed again, they take the next pair out. The closing bracket works as well. |
ip ap | A paragraph, or the blank lines the cursor is on, as whole lines; with a, the blank lines after it too, or before it if there are none after, as Vim's. A count takes that many. |
is as | A sentence, as ( and ) find them; with a, the blanks after it too, or before it if there are none after, as Vim's. A count takes that many, a run of blanks counting as one with is; in visual mode, with more than a character selected, they take the selection on. |
it at | What's between the HTML or XML tags around the cursor, or with the cursor on a tag, its own; with a, the tags too, as Vim's. A count goes out that many tags; in visual mode, typed again, they take the tags too, then the next pair out. A closing tag on a line of its own leaves its line break to it, as in Vim. |
ib ab | A command's output; with a, its prompt and command line too. |
In Vim, b is another name for (. Here it's the command, the more useful
thing in a terminal, and ( still means parentheses.
With the cursor past the end of a line's text, as it is after what you've
typed at a prompt, objects are found from the line's last character, as in
Neovim's terminal: yiw copies the word you typed last.
Commands #
When the shell marks its prompts and commands, clackatoo knows where each command's prompt and output are, and how it exited.
| Keys | Does |
|---|---|
[[ ]] | Moves to the previous or next command's prompt. |
yib | Copies the output of the command the cursor is in. |
yab | Copies the command with its prompt and output, ready to paste into a bug report. |
vib vab | Selects them. |
A command's output runs from its first line to the line before the next
prompt, leaving out blank lines at the end. If the command printed nothing,
yib says no output. If the cursor isn't in a command, the bottom bar says
no block here.
Which shells mark their commands:
- fish 4 and later, by itself. clackatoo also runs a small script once
your startup files have run (
fish -C), which marks each command again with the terminal's secret, so it can be offered after a restart. As the script runs after your startup files, a program they start, such as a prompt's daemon, starts while the secret's file is still there, and could read it. - bash, when it's your shell (
$SHELL) and clackatoo starts it. clackatoo starts it with a startup script of its own, which reads your~/.bashrcfirst, then adds the marks toPS1,PS0andPROMPT_COMMAND. The command goes with its mark, from bash's history. bash before 4.4, or withshopt -u promptvarsin your~/.bashrc, can't sign its commands, so it keeps no secret, and offers nothing after a restart; nor does one that stops signing later, at its next prompt, as whenpromptvarsis turned off orPS0set afresh. bash started any other way, such asclackatoo new -- bash, is left as it is. - zsh, when it's your shell and clackatoo starts it. clackatoo points
ZDOTDIR at a
.zshenvof its own, which puts ZDOTDIR back, reads your.zshenv, and adds its hooks once your.zshrchas run, so oh-my-zsh, powerlevel10k (instant prompt included) and a ZDOTDIR of your own all work. A shell started withexec zsh, or inside another, isn't marked. - fish before 4 doesn't.
Commands are kept through an upgrade.
A command that failed ends its prompt's line with a small red ✗ and its exit
status, as ✗ 2, two cells after the line's text, on the screen and in
history. A line too long for it, as one a prompt on the right takes to the
edge, isn't marked; a prompt of two lines is marked on its first. The mark
isn't part of the text: copying, searching, and selecting leave it out. The
blockmarks option marks every
finished command, the ones that worked with a faint ✓ (all), or none
(none). Marks are kept through an upgrade, and need a daemon of protocol 86
or later.
Searching #
| Keys | Does |
|---|---|
/ | Searches forward from the cursor. Type the text, shown in the palette, then Enter; Enter with nothing typed searches for the last search again, this way. Esc cancels. It's edited as the command line is, and Up and Down go back through the searches typed before, in every pane alike. A count before it goes to that match, as 3/x goes to the third. |
? | Searches backward. |
n N | Searches again, the same way or the other way. A count goes that many matches, never round more than once, in one answer from the daemon; an older daemon is asked a match at a time. |
| Esc | Puts out the last search's lit matches, until the next search, n or N; in visual mode, leaves it, keeping them. |
A search ignores case unless the text has a capital letter in it, as the
ignorecase and smartcase options
start; set them to change it. It covers all of history and wraps around at
either end, saying search wrapped to top (or to bottom) when it does. The
cursor moves to the match, which is highlighted, and every other match on the
screen or the history in view is lit more faintly, as Vim's hlsearch lights
them, one after another along each line, never overlapping, until
Esc or :noh, and again at the next search, n or N. Only the
lines in view are looked through for them, at most 512 on a line, and only in
normal mode: in insert mode the program has the screen, and only the match
found stays lit. The hlsearch option
off lights only the match found. If there's none, the bottom bar says
not found.
While you type the search, the cursor goes to the match it would find from
where you started, the view follows, and its matches are lit, as Neovim's
incsearch shows them, in an editor too (see
Shown as you type).
Esc puts the cursor and the view back; Enter keeps them,
and is the search. The daemon is asked after each key, but only once it has
answered the last, so typing fast never queues searches, and the match shown
stays until the next answer moves it; nothing you type waits for these
answers. With no match, the cursor goes back where it started. A count before
/ isn't shown until Enter. With the
incsearch option off, nothing moves
until Enter.
Copying and searching both happen in the daemon, which holds all of history,
so neither waits for the window to fetch the lines involved. Keys you type
after a search, n, N, [[ or ]] wait for its answer, so they act where
it leaves the cursor. Esc drops the keys typed after the search,
and stops a macro; the search still lands, and then Esc acts,
putting out what it lit, as Vim's /foo Enter Esc does.
Ctrl+C waits behind the search too. If the daemon takes
more than 5 seconds to answer, the keys waiting go on without it, so nothing
you typed for the program is lost, and the bar says so.
Lists #
An explorer, a board and a review read keys as terminals and editors do, with the cursor on an item, a file, an entry or a line, rather than a character. They share these, and add their own:
| Keys | Does |
|---|---|
j k, Down Up, Ctrl+N Ctrl+P | The next item or the one before; a count goes that many. |
gg G, Home End | The first item or the last; with a count before gg or G, the item numbered so, counting from 1. |
H M L | The top, middle, and bottom items in view; 3H and 3L count from the view's top and bottom. |
| Ctrl+E Ctrl+Y | The view an item down or up, the cursor kept in it. |
| Ctrl+D Ctrl+U, Ctrl+F, Page Down Page Up | Half the items in view, view and cursor together, or a page, as far as in a terminal or an editor. Ctrl+B is the window's. |
zt zz zb | The cursor's item at the view's top, middle or bottom. |
/ ? n N | Searches forward or back, with the editor's patterns and case options, round from the end to the start: the names shown, a board's entries, a review's lines, files, and comments. A count before /, ?, n or N goes that many matches, round no more than once. |
A search is typed as every pane's is (see Searching): edited as
the command line is, Up and Down going back through the
searches typed before, in every pane. While you type it, the cursor goes to
the item it would find from where you started, as
incsearch shows it, and
Esc puts the cursor and the view back. What it matches is lit, as
hlsearch lights it: in an explorer,
the names; in a board, the text of its entries; in a review, its lines, files'
names and comments; the first match in the item the search went to brighter,
until Esc in normal mode or :noh. A search that finds nothing
says so, and stops a macro.
A command half typed, as 3 or g, shows at the start of the bar, and
leaving the pane forgets it. Leaving also cancels an unfinished search and
restores its starting cursor and view. File-name prompts, file-operation
confirmations, and board-note drafts stay open when focus leaves. A count
before Ctrl+D or Ctrl+U sets the
distance for subsequent half-page moves in that pane, until its height
changes. A key they don't take, as d or ", waits for the rest of its
command, then does nothing. Ctrl+? lists the keys of the
pane you're in, read from how it reads them.
Background work
clackatoo / Reference
The bottom bar shows Working · N while the daemon has work running or
queued. Click it, or run :Work, to open the background-work list. The list
stays up to date as jobs start, report progress and finish.
Type to filter by operation, state or project. Each row shows the operation, its state, any progress count and its project. Where the window has room, the preview shows the current phase or the failure explanation. A job with an unknown amount of work shows a count so far rather than a percentage.
Press Ctrl+D on an active job to request cancellation. Some work is shared
by several chats: cancelling it cancels that shared operation. Cancellation
is cooperative; Cancelling remains until the worker returns. A cancelled
skill request can be retried by opening the relevant page or starting the
request again.
Press Ctrl+D on a finished job to dismiss its outcome. Successful and
cancelled jobs stop contributing to the bar's indicator immediately. Failed
jobs keep an error indicator until dismissed or replaced by newer failures
in the bounded history. The list retains at most 16 recent outcomes,
preserving failures ahead of successful outcomes. Esc closes the list.
The list holds work worth watching: reading the skill and specialist catalogues, and indexing a project's outline. What the daemon does to answer something you or an agent just asked isn't listed: a search in the context browser, a preview, capturing a message's attachments, an outline query. If one of those fails, whoever asked is told why, in place; it leaves nothing in the list and never raises the bar's error indicator.
All of it shares one scheduler. It bounds queued and running work, runs what an interaction is waiting for first, and runs at most one job for a project at a time; jobs that belong to no project aren't held back by each other. See Project Code Outlines for indexing coverage and the tools agents can query.
Background work is scoped to the daemon the window is connected to. It is shown in native windows; the phone and connected workspace lenders do not receive the list. Jobs and their recent outcomes are not restored after a daemon restart or upgrade. A reconnect to the same daemon gets its current list.
Workspace Context
clackatoo / Reference
The + Context control above a chat's message box opens a workspace browser. Choose a category, search, select an object, inspect its preview, and attach it. The phone uses the same daemon API and captures the same content as the window. Images remain beside the message box and count towards the attachment limit.
Choosing a source #
| Source | What's captured |
|---|---|
| File | The current editor buffer, including unsaved text, or the file on disk. A line range includes only those lines. |
| Symbol | A named definition, validated against its current syntax outline. |
| Diagnostics | The latest language-server results for a file or the project. The preview warns that analysis may lag source changes. |
| Command | A retained shell block with its command, working directory, exit status and output. Running commands are labelled as still running. Secret lines are left out. |
| Terminal selection | The selected retained document lines. Secret lines are left out. |
| Change | One already-loaded review hunk, with its before and after text and comparison scope. |
| Chat | Up to twenty explicitly selected conversation turns. Answers are included; requests are optional. Tools and hidden reasoning are excluded. A side question isn't offered as a chat. |
| Board | One entry visible in the destination chat's workspace. |
| Folder | A directory outline, bounded to three levels and 1,000 entries, without file contents. |
The window also accepts @file:, @symbol:, @diag:, @command:,
@change:, @chat:, @board:, @project: and @context: to open the
browser in that category. Tab changes category; arrows choose a result;
Enter previews it, then Enter attaches the preview. Esc closes the browser.
Page Up and Page Down scroll a preview or move between result pages.
The mouse wheel scrolls the preview. Copy snapshot copies the captured text.
Narrow lines accepts an inclusive range such as 12-40 for a file,
symbol or terminal excerpt. Contents / ref chooses between supplying text
and supplying an explicitly labelled reference.
Opening the browser never starts indexing a project. All shows symbols only from an outline index that's already loaded; choosing Symbols starts one. The home directory is never indexed, so a chat started there has no symbols to offer.
:Ask and <Space>a attach an editor selection. In a terminal, review,
board or chat, they attach that pane's selected object to a recently used
chat in the same tab. Dragging a file from the explorer onto a chat attaches it.
Secret lines #
What's captured from a terminal goes further than the screen: an agent
reads it, it's kept on disk, and its preview shows in the window and on
the phone. So a line marked hide, nosave or noagent (see secret
regions) is left out of it,
whichever of the three it's marked with. Each run of such lines reads as
one line, [secret].
A selection or a command's output that is nothing but secret lines can't
be attached: the browser says so, rather than attach a placeholder. A
command whose own command line is secret is listed as [private command],
without its text or its directory, and a search doesn't match what it
hides.
Capturing and sending #
A preview shows its source, size, approximate token count and any limitations. Remove an attachment with its close control. Earlier and Later attachment controls make every attachment accessible when there are many.
Whole files and live objects are captured again at send time. Exact selections,
symbols and excerpts require the preview's source revision to match. If one
changed, refresh the preview or remove it before sending. A selected source
that cannot be captured holds the message and leaves the draft intact.
An ordinary unknown @word remains text.
A message can contain at most 32 objects including images, 64 KiB of text per object and 256 KiB of attachment text in total. Choose a smaller range or Reference only for a larger file. Searches and folder outlines are bounded; symbol search coverage depends on the shared project index. A search that stopped short says so above its results: the file search walks at most 50,000 entries for half a second, and the lists of chats and commands hold the newest 2,000 matches.
A search or a preview is given three seconds, and a message's attachments ten. Past that, the browser says the search or preview took too long, or the message is held with its draft intact and says its context took too long: nothing is ever sent with part of what you chose.
Once accepted, each attachment is an immutable snapshot. Queuing, steering, taking a queued message back for editing, retrying and branching preserve that captured content. Editing the source later does not change an accepted message. A transcript's Context … inspect control opens the original snapshot. Reattaching that snapshot requires a daemon-issued grant scoped to its project.
The daemon sends the captured text as a labelled quotation with its source,
revision and snapshot identifier. Agents can call read_context to read that
same snapshot; the tool only reads attachments in its own conversation.
Reference-only attachments contain no captured source body.
Ownership and retention #
Source reads happen on the owning daemon. File reads stay inside the destination project, validate the opened file handle, reject devices and pipes, and detect concurrent disk changes. Searching and listing folders leave out what the project's ignore files do. Search and capture run on the daemon's background workers, out of the work list. Stop cancels a message still waiting for its attachments.
Remote picker results carry their source daemon's identity. Terminal and chat identifiers remain in that daemon's namespace. Attaching an object to a chat on a different source machine is refused; no local file is substituted for a remote path.
Captured bodies and replay metadata live in a private SQLite store under the daemon's state directory, namespaced by its socket. Repeated captures reuse identical stored snapshots.
The store is a convenience, and never stands between you and sending. If it's full, busy or read-only, the message goes with its attachments all the same; each snapshot's note then says that no copy was kept outside the conversation, and the daemon's log says why. Such a snapshot can still be inspected in its conversation, but can't be reattached, and isn't restored if the agent later tells the conversation again.
The store keeps to 256 MiB. Past that, it lets go of the snapshots used longest ago, with the messages they went with. A snapshot that a conversation in memory refers to is never let go: in its turns on any branch, its queued messages, or its draft.
When an agent tells a conversation again, as it loads or after a branch switch, each message is matched against the exact captured message before its attachments are restored. That's looked up once, when the turns arrive. Removing the store loses that recovery data.
Protocol 159 is required. Older windows retain their existing file-mention behavior; new attachment submissions are refused by older daemons instead of being downgraded to plain text.
Side Questions
clackatoo / Reference
Type /btw Why did we choose cookies? in a chat to open its Side question
sheet. /btw alone reopens that chat's existing side conversation, or starts
an empty one. The command belongs to clackatoo, appears in slash completion,
and is never sent to the main agent. The Side question control beside
+ Context opens the same sheet without changing the main draft.
The window opens the sheet on the right, keeping the main conversation visible in wide panes. A narrow pane gives the sheet its full width. The phone opens an accessible sheet with the same actions. The header says whether the main agent is working. The side conversation has its own composer, Markdown answers, follow-up questions and Stop control.
Captured context #
The first opening captures the parent's visible conversation and plan into a bounded transcript digest. Recent exchanges are included in full where they fit; older ones are summarized. Attached text already present in the transcript is included according to that same budget. Hidden reasoning, unreported provider state and full tool-output history are not copied.
A separate provider session receives this snapshot. Opening it works while the main agent is answering, without forking a live session or moving any file undo records. Later changes in the parent are not added automatically. The side session inherits the parent's model and effort where the adapter offers them. It answers from the captured context and its own knowledge.
The side conversation is context-only. Clackatoo supplies no MCP tools, browser or delegation, refuses host file reads and permission requests, and stops the side answer if the adapter reports a tool call. Claude sessions also receive an empty built-in tool list and strict MCP configuration. Other adapters do not expose equivalent tool-removal controls: cancellation of a reported tool call is best effort, and is not a guarantee that a provider-internal operation has not started. The no-tools policy is separate from a security sandbox.
Returning to the main conversation #
- Esc, ×, or the phone's Done hides the sheet. Its conversation and unsent follow-up remain available when reopened.
- Copy copies one answer as Markdown.
- Send to main captures one finished answer as an immutable attachment in the parent's draft. It closes the sheet and leaves sending up to you. It does not steer or interrupt the main agent.
- Keep as chat promotes a finished side conversation into a normal chat in a new workspace tab, retaining its captured background and exchanges. The new chat keeps the original parent's access limits. The parent's conversation and file undo records stay where they were.
- Discard clears the temporary conversation. Already attached snapshots remain available in their destination drafts and messages.
While the side agent is starting or answering, an open sheet asks the daemon for the conversation a few times a second. Once the answer has finished it asks nothing more until you do something in it. A change made to the same side conversation from another window or the phone shows when you next act in the sheet or reopen it.
Temporary conversations stay out of ordinary chat lists, and out of the context browser's chats. There is one per parent, up to 32 per daemon, with at most 20 exchanges and 64 KiB per question. Keep a longer conversation as a normal chat. Closing the parent permanently also closes its temporary conversation. Live daemon upgrades retain the link; a fresh daemon restart does not restore temporary sheets. Provider-side conversation storage follows the provider's own retention behaviour.
Reconnects refresh the side conversation without automatically replaying a question whose delivery was unconfirmed. Check its last exchange before retrying. Protocol 160 is required; older clients and daemons cannot use the side-question API.
Agents
clackatoo / Reference
A pane can hold a chat with an agent, such as Claude Code, instead of a shell. You type a message in the box along the bottom, the agent answers above it, and it works on the files in the pane's directory as it would in its own program.
These pages cover chats and their agents, each listed with its sections:
-
Shared Skills: procedures and skillset bundles shared across agents, their slash commands, discovery folders, native-plugin controls and the Settings browser.
-
Chatting with an Agent: Opening a chat, The start page, Queuing and steering, Viewing images, Images returned by tools, Pasting images, Typing, Slash commands, Mentioning files, Messages sent and drafts.
-
An Agent's Settings: Gemini through Antigravity, The agent's settings, Moving a chat to another agent, Which agent.
-
What a Chat Shows: Normal mode, Yanking, Searching, What the chat shows, A command's output in a terminal, What it runs in the background, What a background command printed, Claude Code's own subagents, The agent's plan, Turns the agent takes by itself, When a turn fails, What else a turn says, When the agent asks, Questions, forms, and plans, Selecting and copying, Desktop notifications.
-
An Agent's Changes to Files: The files it changes, Undoing a turn, Rewinding and branches, Reviewing its changes.
-
Chats Working Together: Chats working together, Subagents, A subagent's pane, Closing, Specialists, Subagent limits.
-
What an Agent Can Use: What the agent can show you, The browser, Native window access, Managed activities and recovery, Inspecting capabilities.
Chatting with an Agent
clackatoo / Reference
You open a chat in a pane, type your message in the box along the bottom, and send it; while the agent works, what you send waits in a queue or steers the turn under way.
Opening a chat #
| Does | |
|---|---|
:Agent codex, :|Agent antigravity… | Opens a chat with that agent at once: in a new tab, or beside the focused pane, as `: |
:Agent, :|Agent, :-Agent…, Ctrl+B a | Opens the start page, for a chat in a new tab or beside the focused pane. |
Until its first message, a chat says which agent it has and the folder it
works in, as Claude Code in ~/project, and how to start: in normal mode,
"Press i to write a message · Shift+Enter for a new
line".
The start page #
Its first row is a new chat, with its agent, model and folder. They start as
the last chat started from the page had them; before that, the agent is the
agent option's, the model the agent's own choice, and the folder the focused
pane's. Under it are chats to go on with instead: this workspace's chats in no
pane, such as those agents started in the background, then the sessions the
agent keeps for the folder, its own and clackatoo's, newest first. For a pane
on
another machine,
or a page opened with @host, they're the sessions that machine's agent keeps
in its folder, and going on with one makes the chat there; this needs a daemon
here of protocol 107 or later, and says so otherwise. :Agent@desk from a
pane of another machine's, such as your own beside desk's, offers desk's
agents and their models, in desk's home folder, and its sessions there; a
daemon here older than protocol 140 offers the pane's machine's instead.
A chat is listed once, as the branch it shows: the sessions of its other
branches aren't
listed while it's open, and once it has gone, closed or not brought back after
a restart, the page still leaves them out. The count at the top says how many
it leaves out, as 12 / 12 · b lists 2 branches, and b lists them too, each
saying branch after its title, or leaves them out again. Going on with one
makes it a conversation of its own from then on, listed as any other. The
daemon keeps which sessions are branches in unlisted_sessions, beside the
machine file in its state directory, the latest 1024; a session forked as an
upgrade cut its rewind off can't be told apart, as neither agent says what a
session was forked from, and is listed. A window older than protocol 135 is
sent none of these.
| Key | Does |
|---|---|
| Enter | Starts the new chat, shows the chat picked, or goes on with the session picked in a new chat. |
n | Starts the new chat, whatever is picked. |
j, k, Down, Up, Ctrl+N, Ctrl+P | The next or previous row. |
| Page Down, Page Up | A page further or back. |
| Home, End | The new chat, or the last row. |
| Tab, Shift+Tab | The new chat's next or previous picker: agent, model, folder. |
l, h, Right, Left | The picker's next or previous choice. |
b | Lists the branches of chats that have gone too, or leaves them out again. |
/, then typing | Filters the chats and sessions, as the finder does: Backspace, Ctrl+U, and Ctrl+W delete as the finder's do. |
| Esc, Ctrl+C | Clears what's typed, or closes the page. |
j, k, n, h, l, and b are keys only while nothing's typed: any
other letter starts the filter, and / types one of them. A paste starts the
filter too. Ctrl+? lists the page's keys.
Going on with a session shows its conversation so far as the chat's turns, where the agent can tell it, as Claude Code and Codex can. Nothing in those turns changes your files again, asks you anything, or runs anything: they're only shown. An agent that can't goes on from where it was, and the chat says the turns before aren't shown. A message sent while the turns are coming waits until they've all come. A session another chat has open goes to that chat; one open in another workspace's chat is refused, saying where it is.
A chat works in the directory a new terminal would start in: the one the pane it splits is in, or for a new tab, the one the workspace's focused pane is in. That's where the agent reads and changes files, and runs its commands.
Like any new pane, a chat opens in the window's mode, so after :Agent it's
in normal mode: i starts typing into it. A chat that's asking something is
always arrived at in normal mode. The first chat starts the agent, which takes
a second or two. Until then the chat says it's starting, and a message sent
meanwhile waits and goes when it can.
An agent runs in a process group of its own, so stopping it, or choosing
Retry, also ends whatever it started, such as the node behind npx, and any
background job it started without detaching. clackatoo stop ends them too:
running agents get half a second to finish by themselves, then are asked to
stop, and the daemon waits up to a second and a half for them before killing
what's left. An upgrade doesn't: agents
go on through it,
with all they run, unless the upgrade has to stop them. Before Linux 6.9, only
the agent's own process is reached.
Typing #
In insert mode, what you type goes in the box at the bottom.
| Key | Does |
|---|---|
| Enter | Sends the message, or while the agent works, queues it. |
| Ctrl+Enter | While the agent works, steers it with the message (see Queuing and steering). |
| Shift+Enter | Starts a new line in the message. |
| Ctrl+C | While the agent answers, asks it to stop, unless text in the message is selected, which it copies. When it's not answering, copies what's selected in the message or the conversation. |
| Backspace, Delete | Delete a character, or with Ctrl, a word. |
| Left, Right | Move by a character, or with Ctrl, a word. With Shift, they select. |
| Up, Down | Move by a line. On the box's first line, Up goes back through the messages sent, and on its last, Down comes forward again. In an empty box, Up takes the newest queued message back to edit. With Shift, they select. |
| Home, End | Move to the line's start or end. With Shift, they select. |
| Ctrl+R | Opens the finder on the messages sent, to put one in. |
| Ctrl+A | Selects the whole message. |
| Shift+Tab | Moves the agent on to its next mode. |
| Esc | Normal mode. There's no program in a chat to need Esc. |
Clicking in the box puts the cursor there, dragging selects, and a double or triple click selects a word or a line. A paste goes into the message whole, lines and all, without sending it. Text can be typed through an input method: what's being composed shows in the box, at the cursor, until it's committed.
Slash commands #
Agents take commands in a message that begins with /: Claude Code's
/compact and /init, Codex's /review, and prompts your Model
Context Protocol (MCP) servers offer. Type / at the start of a message and a
menu opens over the box: the commands the agent says it has, then clackatoo's
own (marked clackatoo). Shared skills also
appear by name: /release-check v2.0, for example, loads that skill's
instructions through clackatoo. It narrows as you type the name, those starting with
what you typed first, each with what it does and, if it takes something after
it, a hint such as ‹branch name›.
| Key | Does |
|---|---|
| Down, Up; Ctrl+N, Ctrl+P | The next or previous command, round the ends. |
| Tab | Puts the command picked in the box, with a space after it for what follows. |
| Enter | The same; or if you've typed the whole name already, sends it. |
| Esc | Closes the menu, staying in insert mode, until what you've typed changes. |
Selecting a command with the mouse puts it in, as Tab does. Once there's a space after the name, the menu closes. The menu combines shared skills with what the agent last said it has; a chat that has moved to another agent lists none of the old one's, and after a daemon upgrade or restart, the agent's own come back once its session opens again with your next message.
Claude Code's and Codex's own terminal interfaces have commands their adapters
don't, so sent to the agent they'd reach the model as words. Typed as the
whole message, such as /clear alone, clackatoo does what each is for itself
instead of sending it, unless the agent says it has a command of that name (in
any case), which is then the agent's and is sent. With words after the name,
as /help me find why this test fails, the message is words for the agent and
goes as typed.
| Command | In clackatoo |
|---|---|
/clear, /new | Opens the start page, to start a new chat. |
/resume | Opens the start page, which lists the agent's past sessions under the new chat. |
/fork, /branch | Copies the conversation into a new chat in this pane, as :fork does. |
/rewind | Rewinds the conversation to before its last turn, as :rewind does, asking whether to undo what it changed in files (see Rewinding and branches). u still undoes only the files. |
/context | Shows how full the agent's context is, as K does. |
/status, /cost, /usage | Opens Usage & limits. |
/diff | Opens :Review of what the chat's agents changed. |
/model | Opens the model menu. /model NAME picks the agent's model of that name or value, such as /model sonnet; a name it hasn't is sent as words. |
/export | Copies the conversation, as text, to the clipboard. clackatoo capture prints all of it, older turns not loaded too. |
Others, such as /exit, /help, /config, /permissions and /login,
aren't sent either: the bar says what to use instead, such as :q,
Ctrl+?, :set or the mode chip, and what you typed
stays in the box. Every other message beginning with / goes to the agent as
typed.
A command the agent says it has (or, before it has said, one its adapter is
known to do, such as /compact, /init or /review) goes to the agent on
its own. The first message after a chat moves to another agent, or a specialist's
first message, usually goes after the conversation so far or the specialist's
instructions; a command waits with those for your next message instead, as
Codex reads a command only when it comes first, Claude Code only when it comes
last, and some of Claude Code's only when they come alone. Any other message
starting with /, such as /usr is full, goes with them as usual, so a
specialist's limits are never left behind.
The phone lists the agent's commands too, as you type / and a name, and
selecting one puts it in your message. It doesn't send the commands clackatoo
does itself, typed alone: use those in the window.
Mentioning files #
Type @ at the start of a word and a menu of the chat's project's files opens
over the box: every file the finder's <Space>pf lists, without what the
project's ignore files leave out, walked by the daemon in the background. It
narrows fuzzily as you type the path.
| Key | Does |
|---|---|
| Down, Up; Ctrl+N, Ctrl+P | The next or previous file, round the ends. |
| Tab, Enter | Puts @path in the box in place of what you typed, from the chat's folder, with a space after it. |
| Esc | Closes the menu, staying in insert mode, until what you've typed changes. |
A path with a space in it is quoted, as Claude Code quotes one:
@"docs/read me.md". A mention can name lines, @src/parser.rs#L12-L40 (or
#L12 for one), and you can type mentions by hand: a word starting with @
names a file relative to the chat's folder, or from the project's root, or an
absolute path or one starting ~/. Punctuation ending a sentence after it
isn't part of it.
Selecting a file from the menu also attaches it to the message. Current windows use Workspace Context: the daemon captures a bounded snapshot, including unsaved buffer text, and the accepted message keeps that exact content. File ranges are checked against their preview; whole files are captured at send time. + Context opens the browser for files, symbols, diagnostics, commands, changes, conversation excerpts and board entries.
Plain @path mentions typed by hand are captured when possible; unknown words
remain words. Explicitly selected attachments that cannot be captured hold the
message and keep its draft. A provider slash command keeps its ordinary mention
handling. Context-bearing steering uses Stop & send so its captured content goes
as a complete message.
Windows older than protocol 159 retain their previous file-mention transport: saved files can be links, ranges and unsaved buffers are embedded when supported, and unreadable or oversized implicit mentions can remain links or words.
In the conversation, mentions are chips in the link color. Select one, or put
the cursor on it in normal mode and type gf (or gx), to open the file, at
its first line if it names lines; gf on a link or path in the agent's words
opens it too. Going on with a past session shows its mentions as chips again,
not the text that was sent with them.
From an editor, <Space>a in visual mode, or :'<,'>Ask, puts the lines
selected at the end of the message in the chat beside the editor, or the one
used last in the tab, as @src/parser.rs#L12-L40, and moves you to its box in
insert mode, to say what to do with them. In normal mode, <Space>a (or
:Ask) mentions the whole file. The lines' text is read when you send the
message, so it's what the editor shows then. The key is a binding like any
other: unmap <Space>a, or map another key to :Ask<CR>, with
client.keys.map (see Config).
The phone shows mentions in sent messages as chips; typing @path by hand
there works the same, as the daemon finds the files, but it has no menu.
One message is answered at a time. While the agent answers, the button in the box's corner is a stop button, and Enter queues what you typed for when it's done (with a daemon too old to queue, it stays in the box). Selecting the button with nothing being answered sends the message, as Enter does.
Messages sent and drafts #
The box remembers what you've sent in the chat, as a shell remembers commands, and what you've typed but not sent.
| Key | Does |
|---|---|
| Up, on the box's first line | The message sent before, of those that start with what's typed: in an empty box, every one, newest first. The cursor goes to its end. |
| Down, on its last line | The message sent after; past the newest, back to what you had typed. |
| Up, in an empty box with messages queued | Takes the newest queued message out of the queue and puts it in the box to edit, as Claude Code's Up does. |
| Ctrl+R | Opens the finder on the messages sent, newest first: type to narrow them, and Enter puts the one picked in at the cursor. :Prompts opens it too. |
Up on a message's other lines moves the cursor up a line, so on a
message of several lines, Up goes to its first line before it goes
back to the one before. Typing anything forgets where Up had gone:
the next Up goes back from what's typed then. In normal mode, k
and j still move through the conversation.
The messages Up recalls are your own, in this chat: not another chat's agent's, nor clackatoo's notices. They're worked out from the conversation itself, so every window and the phone have the same ones, and they last through upgrades, and after a restart once the chat has told its conversation again. Up to the newest 200 are kept, each once, and at most 128 KiB of them, those over 16 KiB left out. A message with images recalls its words. Messages from other chats aren't recalled.
The pencil on a queued message, or Up in an empty box, has the daemon move it out of the queue and into the chat's draft in one step, and puts it in your box before what you've typed there, so it's never both waiting and being edited, and never only in a window: if the window closes first, the next to open the chat starts with it. What's typed in other boxes stays in them. If it was sent meanwhile, the bar says so. A queued message with images, or one that moves the chat to another agent, has no pencil and isn't taken back: send or remove it. Taking messages back needs a daemon that keeps drafts.
What you've typed but not sent is kept by the daemon too, as the chat's draft: a window, or the phone, tells it as you pause typing, as the box empties, and as it closes, and the daemon keeps the last told. A box takes it only while it's empty and you haven't typed in it there: as a window first shows the chat, after closing the window, after an upgrade, on another machine, or as the phone's page loads (over what the page kept itself, unless you've typed since it loaded). Typing isn't mirrored from box to box: a box you've typed in, or emptied, is never changed by what's typed elsewhere, nor by a reconnect, and with two boxes typed in at once, the last told is what the next window starts with. Sending a message, from any box, empties the draft, and every other box holding only that message empties too; a box holding anything else keeps it. Only the text is kept, up to 64 KiB: images attached stay in the window. A full daemon restart doesn't keep it, and a chat on another machine whose daemon is older keeps no draft: the box is the window's alone there, and the phone keeps its own copy.
Queuing and steering #
While an agent works, Enter queues what you've typed, and
Shift+Enter starts a new line as usual. Messages waiting
to go share a small panel above the box, headed Queued, or Queue paused
while they're held, with how many there are. They go in order, each after a
turn that ends well. Each has a pencil to
take it back into the box and edit it (but not
one with images, or one that moves the chat to another agent), ↑ to send it
now, and × to remove it. Sending one now while a turn is under way steers that
turn; with nothing under way, it sends the queue on again.
Ctrl+Enter steers with what's in the box. While you type
during a turn, the box shows a small Steer or Stop & continue button
and a square Stop button.
With the Claude Code or Codex adapter clackatoo installs, Steer adds a
message of words to the turn under way without stopping it. Codex's has
clackatoo's steering backported to it; a custom adapter, or one found on
PATH, without that patch stops and continues instead. So does a message with
images, and one that moves the chat to another agent. Stop & continue
stops the turn, waits for it to end, then sends the message. The button says
which it will do. A message that seems to mention a file says Stop & send,
as it can only go whole (see Mentioning files). If the
turn ends while a steer is on its way, the message goes once, as the next
turn. If it's unclear whether the agent took a steer, the message waits,
paused, so you can check the conversation before sending it again.
Stop, or a turn that fails, pauses the queue: ↑ sends it on again, and × throws a message away. The daemon keeps the queue, with its text, images, and agents to move to, so every window, here or on another machine, sees the same one. It lasts through an upgrade: messages go after the work the upgrade carries on, and a queue that was paused, or a steer not yet confirmed, stays paused. A full daemon restart doesn't keep it. A queue holds up to 8 messages or 32 MiB, each message's text up to 64 KiB, and its images within the usual limits.
Pasting images #
Copy a screenshot or image to the clipboard, then press Ctrl+Shift+V in a chat. A thumbnail appears above the text in the message box, and above the sent message in the conversation. Add text if you like, then press Enter to send both; an image can go on its own too.
Select the × on a thumbnail to remove it, or press Backspace while the message box is empty to remove the last one. You can prepare attachments while the agent answers; they stay in the draft until you send. Text on the clipboard still pastes as text.
A message holds up to four images, at most 16 million pixels each and 8 MiB of encoded image data in total. An agent that does not accept images reports that clearly. The full image is sent to the agent, whose session keeps it. Clackatoo keeps small previews (up to 256 pixels on a side) across window reconnects and daemon upgrades, including on remote connections. Each chat keeps up to 4 MiB of recent previews; older messages retain their image labels. Images sent before previews were supported, or history loaded anew from an agent session after a full daemon restart, show labels only. Switching to a different agent carries the labels with the conversation, so paste the image again if that agent needs to see it.
Viewing images #
Select an image in the box, in a message sent, or in a tool's result, and it opens in a viewer over the chat. Esc, a key that goes to normal mode from anywhere (Ctrl+;, Shift+Esc, or Ctrl+\), or its × closes it, in either mode, back to your draft in the mode you were in. Selecting elsewhere doesn't close it. While it's open, typing, pasting, scrolling, and the mouse's buttons on the chat behind it do nothing. The × on a thumbnail in the box still removes that image.
The viewer shows the image whole, and says its size in pixels once it has
it. An image in the box is the window's own; one in a message or a tool's
result comes from the daemon, for a chat on another machine too, through the
same image layer as every image clackatoo
shows: kept once, fetched once, and drawn at the size it's shown. Each chat
keeps its images within the image limits,
through reconnects and upgrades, the oldest let go first; an image let go
shows a box in its place, and the viewer says
Original unavailable · thumbnail only. A full daemon restart keeps no
images. Images are decoded in the background, at most 64 million pixels, and
drawn at most 8192 on a side.
Images returned by tools #
When a tool returns an image, a thumbnail appears beneath its entry in the conversation, even when the turn's work is folded. Open the entry to give the preview more room. This works with Codex's View Image and other agents, including Claude, when their adapter returns inline image data or a link to a local image file.
PNG, JPEG, GIF, WebP and BMP results are supported (a BMP is kept as a PNG), up to four per result, with files limited to 8 MiB and images to 16 million pixels. The daemon reads local files on its own machine and sends small previews to the window, so remote chats work too. Web URLs are not fetched. Previews share the chat's 4 MiB history allowance with pasted images; older results keep their labels. Newly received previews survive reconnects and daemon upgrades, but history replayed after a full restart shows labels only. The web client shows the previews too.
Side questions #
/btw <question> opens a temporary side conversation using a snapshot of the
current chat. The main agent continues independently. /btw alone or the
Side question control reopens it. Hide it to return, keep it as a normal
chat, or attach a selected answer to the main draft with Send to main.
See Side questions for capture limits and
provider behaviour.
An Agent's Settings
clackatoo / Reference
Each chat has its own model, reasoning effort, and approval mode, picked from the controls in its message box, and talks to one agent at a time, which you can change.
The permissions menu also selects, under Who answers agents' requests,
The agent's own settings or clackatoo's rules for that chat. :Settings > Permissions sets the default for new
chats, edits Allow/Ask/Deny rules and shows recent decisions. See
Permissions for matching, provider-mode
requirements and the approval requests those rules cover.
The agent's settings #
The rounded message box has its model and reasoning effort at the lower left, followed by one permissions control showing the current approval mode. At the right, a small context gauge sits beside Send, or Stop while the agent answers. Paste images with Ctrl+Shift+V.
The permissions menu groups who answers the agent's requests, the agent's approval mode, access to clackatoo's tools, and browser access. Selecting clackatoo's rules chooses a compatible provider mode. With the agent's own settings, changing a mode or tool setting leaves the others as they were. For Claude Code, Manual asks before every change, Accept edits makes edits without asking, Plan plans before it acts, and Auto lets Claude decide what needs asking about. A new Claude chat starts in Auto.
The circular gauge shows context used as a percentage in its center. Its ring fills clockwise: quiet while there is room, amber past 80%, red past 95%. A Claude account limit above those thresholds also raises its warning color; the details identify which limit needs attention. When the context capacity is unknown, the gauge shows a dash.
Hover over the gauge for the conversation's token counts and any account
limits reported during that chat. Select it, or press K in normal mode, to
open Usage & limits. The modal separates conversation context from account
allowances and lists the installed providers, including those whose adapters
cannot report limits. Escape, Ctrl+;, the
close button, or selecting outside it dismisses it without changing the draft.
Scroll or use the arrow and page keys for more windows.
Claude Code, Codex, and Antigravity can read their subscription windows without sending a model prompt: short and weekly limits, plus model-specific or extra-spend allowances when reported. Each allowance has a bordered card with a prominent percentage left and a provider-colored bar. The hatched part is the allowance already used, and the badge inside the bar counts down to reset. Wide windows place the figure beside the bar; narrow panes stack them. Update times beside provider names use the window's local timezone. API-key accounts and adapters without this interface say when subscription limits are unavailable. Custom launch commands are not probed through another installation's sign-in.
The daemon collects these readings, so windows connected remotely see the accounts on that daemon's machine. It caches readings after the first completed message, then refreshes every three completed messages across chats (or on the next completion after five minutes). Opening the modal shows cached values immediately and requests a refresh, as does Refresh. All refreshes have a one-minute minimum interval and concurrent windows share the work; nothing polls while chats are idle. New chats receive the same cached readings. Failed reads retain the last successful values and their update time; expired windows say they need a refresh rather than guessing that usage is zero. Readings are collected again after a daemon upgrade.
Select a setting to open its menu, immediately above that button. Up and Down move through it, Enter or the mouse picks, and Esc or selecting elsewhere closes it. Shift+Tab steps through the modes without opening the menu.
The model and effort share a searchable menu. Type to filter by model, provider or description, including pinned versions hidden inside families. Up and Down move through results, Enter picks, and Esc closes it without changing your draft. The mouse wheel scrolls the picker independently of the conversation.
The picker opens on favorites if you have any, otherwise the current provider. The left rail switches between favorites and individual providers. Search always covers every provider, placing matching favorites first; clearing the search returns to the previous page. The popup keeps a fixed height, with the provider rail and model list scrolling independently. Select a star beside a model to add or remove a favorite; favorites are saved on this machine and shared across its windows. Each row shows the provider below the model and a tick on the current model.
The menu includes:
- Models by family: Opus, Fable, Sonnet and Haiku, each with the version it picks. Picking a family picks its newest version, and keeps up as new ones come out.
- A family's versions: the
▸button at the end of its row, or Right, shows its other versions, to pin the chat to one. Left hides them. A chat on a pinned version opens the menu with that version shown and ticked. - Fast mode: the lightning bolt in the rail beside reasoning effort toggles fast mode. It appears only when the current model advertises support, and fills in while enabled. The adapter controls its availability and account restrictions.
- Named effort choices, from Low to Max: select a choice, or with the effort row selected, press Left and Right. The menu stays open as you change it. Default leaves effort to Claude Code, which picks it for each model.
Models from another agent are grouped only when one choice in a family always
means its newest version, as Claude Code's opus does. Otherwise they're
listed one per row.
A chat keeps the settings you pick. If the agent stops, or the daemon is upgraded, the chat asks for them again as its session reopens.
Moving a chat to another agent #
The model menu lists every agent's models, with its provider below each model,
after the chat's own agent's. Picking another of the same agent's models
changes it in the chat. Picking another provider stages it with your draft. A
ruled Context handoff pending row shows the source and destination with
their provider icons, and the model button shows your pending choice. Nothing
switches until you send a message or image. Choose a different destination to
replace it, or select × on the row or pick the current provider to cancel it.
Sending switches providers and submits the message together; a refused handoff
restores your draft instead of sending to the old provider. The completed
handoff stays in the history as a matching divider. An agent clackatoo hasn't
installed says "install to use", and sending its pending handoff offers to
install it. An agent whose models aren't known yet is asked for them as the
menu opens, which takes a moment.
The new agent hears the conversation with your next message, before it, fenced
off as context carried over rather than as something to do: the newest turns
whole, older ones a line each (what you asked, what it ran and changed, how it
ended), the files changed, and the previous agent's plan if it has steps left,
to ask you about rather than carry on with. Messages other agents sent the
chat are marked as theirs, not yours. The carryover option sets about the
most it takes, in tokens: 20000 unless set, never more than 50000 nor a
quarter of the new agent's context, and never less than 1000. Moving back to
an agent the chat had before opens its own session again, and it hears only
what happened since.
Undoing turns, reviewing changes, boards, clackatoo's tools and the
claudetask choice stay the chat's, whichever agent answered. The mode and
effort carry over where the new agent has one by the same name; where it
hasn't, it uses its own, and a chat an agent started gets the new agent's
safest mode; the line across the chat says which. The new agent doesn't see
the old one's thinking or the whole output of its tools, only what the chat
shows, and its first answer costs more, as nothing of the conversation is
cached for it yet. You can stage a handoff while the agent is answering, but
must wait until it finishes or stop it before sending. Pending choices stay in
this window with the draft; closing the window discards them. Turn numbers, as
in :agentundo 3, skip the lines where the chat moved.
Gemini through Antigravity #
Select Antigravity in the model menu's provider rail, or open
:Agent antigravity. clackatoo installs Google's official runtime for the
Agent Client Protocol (ACP), from a pinned release checked against its
SHA-256, for x86_64 or ARM64 Linux. It needs no Node.js. Allow about 1.1 GB of
disk for it, and another 1 GB for the scratch files it makes as it runs.
To sign in, run this in a terminal on the chat's machine:
It prints a Google link to open. On the same machine, the browser hands back
to the runtime once you've signed in, and that's all. From a laptop showing
the desktop's workspaces (see
Another machine),
run the command in a terminal in one of the desktop's workspaces, and open the
link on the laptop. If the browser ends on a 127.0.0.1 page it can't reach,
copy the whole address from its address bar, paste it into that terminal, and
press Enter. What you paste isn't shown.
Ctrl+C, Ctrl+D, or cancel and
Enter stops signing in, and it gives up by itself after 10 minutes.
One sign-in runs at a time: a second says another is running. The address the
browser ends on is taken once, and only for that sign-in, and it never goes
into a chat's history.
This sign-in is apart from the Antigravity IDE's. Its credentials stay on the
chat's machine, in the private antigravity-specialist directory beside the
installed agents, and the runtime's scratch files go there too, not in /tmp.
clackatoo doesn't take a sign-in from the IDE, nor silently use an API key
from the environment.
Once you've signed in, send a message or open the model menu again: its models and settings are the ones your Google account has, not a fixed list. Images, the queue, moving a chat to another agent, and reopening a session work as they do with other agents. The permissions menu lists Antigravity's approval modes by the names its runtime gives them, and a new chat starts in its default mode. A turn under way is steered with Stop & continue (see Queuing and steering).
Select the context gauge, and Usage & limits shows Antigravity's
allowances beside your other agents': Gemini, Gemini 4 Argon, and
Claude & GPT (shared), one allowance that Claude and GPT models both count
against, when Google reports them. They're kept and refreshed in the
background as the others are, with the same countdowns to reset, and reading
them sends the model no prompt. An allowance you haven't used has no countdown
until Google reports when it resets.
Antigravity uses its own file tools, the one that views images included, so save what you've changed in an editor before asking it to read the file. Its changes to files, the questions it asks before using a tool, what its commands print, and its images show in the chat as other agents' do, and an image opens in the same viewer.
The separate Gemini CLI agent is for setups that already use an API key.
Which agent #
A chat talks to Claude Code unless you name another: claude, codex
(OpenAI's Codex), antigravity (Google Antigravity), or gemini (Gemini CLI
for existing API-key setups). The chat says which in its box: "Message Codex".
clackatoo speaks ACP, the
Agent Client Protocol. Claude Code and
Codex don't speak it themselves, so each runs through an ACP adapter, at a
version tried with clackatoo. The daemon looks for an agent's adapter where
clackatoo installs it, ~/.local/share/clackatoo/agents, then on your PATH,
then runs it with npx, which needs Node.js. While it runs from PATH or
npx, the chat offers once to install it, which makes it start faster and
work offline: Claude Code's takes about 620 MB and Codex's about 450 MB, each
with its own copy of the agent, installed from a lock file so nothing it
depends on can change. With none of the three, the chat asks to install it
before it can start. A new build that moves to a newer adapter asks again, and
installing it removes the older ones nothing is running from. A build that
only patches Codex's adapter anew, as 2.2.2+clackatoo.2 does
2.2.2+clackatoo.1, asks nothing: the chat says it's installing while the
daemon prepares the new one from the one installed, fetching nothing, and
offers the usual install only if that one isn't the bundle pinned. With
provider-managed MCP servers off, as they are by default, Codex never runs from
PATH or npx, whose adapter can't keep them out: the chat offers to install
it instead. An agent, and
every command it runs, gets only the absolute directories of the daemon's
PATH: an empty or relative one, such as ., bin or node_modules/.bin,
or a ~/bin written literally, would find a program in whatever folder it
runs in, which might be a project anyone could have filled. Write them out
whole ($HOME/bin, /path/to/project/node_modules/.bin), or call such a
program by its path. With no absolute directory at all, it's
/usr/local/bin:/usr/bin:/bin.
Each agent uses its own sign-in: run claude, codex login or gemini once
in a terminal, or for Antigravity, its own. A
chat with an agent no one's signed in to says what to run. With a
subscription, chats count toward its limits.
If an agent hasn't opened a chat's session after 30 seconds, the chat says so,
and what it might be waiting on: most often a Model Context Protocol (MCP)
server in the agent's config that needs you to sign in. For Codex that's
~/.codex/config.toml (or $CODEX_HOME), and the chat names the servers
there reached over the network; for Claude Code, its settings in
~/.claude.json or the project's .mcp.json; for Gemini CLI,
~/.gemini/settings.json. codex mcp list, claude mcp list, or
gemini mcp list in a terminal shows which can't start. An agent that hasn't
answered at all is said not to have started; one run through npx is given
two minutes, as npx might be fetching it. The chat goes on waiting, and asks
whether to Keep waiting, which Esc picks, Retry, which
stops the agent and starts it again, or Stop; Ctrl+C
stops it too. A session that comes after you stop is closed unseen, and the
next message asks again. While another chat is in the middle of a turn with
the same agent, Retry only asks again rather than starting it again, which
would cut that turn off. The model menu says the same of an agent that doesn't
say what models it has within 20 seconds.
An agent that stops listening, say because its input broke, is still read for a moment for the rest of what it says, but nothing more is sent to it: a message to it ends at once, saying the agent stopped, and so does stopping the chat or changing a setting. A chat that tries to start it meanwhile waits, saying it's stopping, and starts it again once it has gone, sending any message you typed.
A question clackatoo asks itself, such as this one or an offer to install, shows as it's worded; anything an agent asks is always shown as the agent's, "Allow the agent to …?", however it's worded.
Codex offers its own settings in the box: its mode in the permissions menu, from Read-only, which asks before every change, through Workspace access and Auto review to Full access, and its model and reasoning effort at the lower left. A new Codex chat starts in the mode Codex's own config gives.
Codex's Plan mode is in the permissions menu too, under its mode, as Default
or Plan, and its /plan turns it on as in a terminal. While it's on, the
control under the box says so first, as Plan · Auto review, and Codex plans
rather than changes anything. When it has a plan, it asks to implement it,
with the plan
above the question;
saying yes leaves Plan mode and Codex carries on with the plan in the same
turn, and a session opened again later stays out of Plan mode. Saying no keeps
it planning. The phone marks the box Plan while it's on, and lists it under
Permissions. Windows and phones from before this release don't show it at all;
nothing else changes for them.
A setting an agent changes by itself, such as its model or Codex's Plan mode,
is kept for its next session too. Its mode isn't, unless it can do less: an
agent that moves itself to a mode that can do more than the one you chose is
put back at once, and the line above the box says so, as
Codex switched itself to Full access; put back to Read-only. clackatoo knows
how much Claude Code's and Codex's modes let them do (Claude Code's Plan,
Manual, Accept edits, Auto, then Bypass permissions; Codex's Read-only,
Workspace access, Auto review, then Full access), whatever order they list
them in; any other agent is always put back to the mode you chose. Claude Code
leaving Plan mode is kept only for the mode you picked in its plan's question,
or with none picked, for one that can do no more than the mode you had before
Plan. A chat an agent started never leaves Plan mode this way, so it never
goes above the mode it started in; with no mode of its parent's to start in,
it starts in its agent's safest that can still act (Manual, Read-only), or for
any other agent, in that agent's own.
Every agent is asked for ACP's notices, so what Codex warns of, such as a problem in its config, and that it moved to another model, shows as a notice above the box rather than as words in the turn. Where Codex compacts its context, the turn has the line that says so.
To add an agent that speaks ACP, or run a known one another way, set it in the
daemon's config,
~/.config/clackatoo/daemon/init.lua:
daemon.. =
daemon.. =
daemon.. = false -- stop agents as the daemon upgrades
daemon.. = 16 -- see Subagent limits
An agent has name, command, mode and tasks, and needs its command, a
list of strings. Anything else, or a field of the wrong kind, is a mistake,
which stops the config at the line that set the agent: the daemon then keeps
what it last ran, and says so in a window's bar. The daemon runs its config
again as you save it, so a new chat you start can start with a change at
once, while chats already going keep the agent they have; a change made
outside clackatoo is said in every window's bar (see
Changes made outside clackatoo).
A known
agent's name, such as claude, runs it with your command, keeping its title
and what clackatoo knows of it. CLACKATOO_AGENT gives Claude Code another
command, for the daemon it's set for.
Before, agents were set in daemon/agents.toml, which the daemon moved into
daemon/settings.lua the first time it started with the Luau config.
Each agent runs one process for all its chats, and stops when its last chat closes. Claude Code's adapter also runs a Claude Code process per chat, of about 250 MB.
What a Chat Shows
clackatoo / Reference
Your messages are bubbles on the right. The agent's answers run the width of a
column down the middle of the pane, with Markdown laid out as it's meant to
look: headings in bold, lists, quotes, links in blue (only a link's words
show: gx on them, or a Ctrl+click, opens where it goes), code in the terminal's
font on a background of its own, colored as an editor colors it when its
language is installed, and tables as a grid. Code, quotes, and cards all start
at the column's left edge.
Long conversations open on recent turns. Scroll toward the top to fetch earlier turns a page at a time, keeping the message you're reading in place. This works in the window and web app, including chats on connected machines. Reconnecting retains the range you've loaded. Live output and file actions keep their original turn identities; to undo a specific older turn by number, load that turn first. A daemon older than protocol 104 sends the full conversation.
Normal mode #
In normal mode, a solid cursor moves through the conversation's text, and the
view follows it. Coming into normal mode puts it on the last line in view,
unless it's in view already. Keys are read as a terminal's and an editor's
are, so a count goes before a move (3j, 2w), a command half typed shows at
the start of the bar, and Ctrl+? lists them:
| Key | Does |
|---|---|
h j k l, arrows, + - | A character, or a line. |
w b e ge, W B E gE | By words, or by anything between blanks; ge and gE go to the previous word's end. |
f t F T, ; , | To a character on the line, or right before it, back with F and T; ; again, , the other way. |
0 ^ $, g0 g$ | The visual row's start, first non-blank, or end. |
_ g_, N| | First or last non-blank on the row; column N, counting from 1. A count before _ or g_ takes that many rows, including this one. |
%, ( ) | Matching bracket or sentence, within the block. A count before % goes to that percentage of the block's lines. |
H M L | Top, middle or bottom of the visible text, respecting scrolloff; a count before H or L moves inward from that edge. |
zt zz zb | Put the cursor's row at the top, middle or bottom of the view. |
{ } | The block before or after. |
gg G | The start or end of the chat; with a count, the start of that turn, as 3G. |
gf gx | Opens the file a mention under the cursor names, or the link or path there: a link written as Markdown, such as [GXWI](https://…), opens its target, not its words (see Mentioning files). Ctrl+click does the same with the mouse. |
| Ctrl+D Ctrl+U, Ctrl+E Ctrl+Y, Ctrl+F, Page Down Page Up | Scroll half a view, a line, or a page of the view less two lines, as far as in any pane, with a count. The cursor stays in view. |
v V | Select characters, or lines. o goes to the other end, Esc stops; gv restores the last selection, or swaps it with the current one. |
y and a motion or object, yy Y | Yanks what the motion moves over, the object, whole lines, or to the line's end, into the registers (see Yanking), Y as y$, as Neovim's. In visual mode, y yanks what's selected and Y its lines. |
"a before y | Yanks into register a, or onto its end with "A. |
/ ?, n N | Searches the chat's text forward or back, and again (see Searching). |
za zo zc, Enter on a "Worked for" line | Opens or folds the turn's work, or on a subagents' line, their card. zR and zM open or fold every turn and every card. |
go | Shows what the command whose card is under the cursor printed in a terminal below the chat (see A command's output in a terminal). |
j k in a table | The cell below or above. |
zl zh, zL zH | Scroll the table the cursor's in sideways: a few characters, or half the column. |
u | Undoes what the turn under the cursor changed in files, if it's in view, or else the last turn's, keeping your edits since. The bar says which. |
| Ctrl+R | Makes it again. |
dG | Rewinds the conversation to before the turn under the cursor, or the last (see Rewinding and branches). Other d and c commands say what the chat takes instead. |
cc S | Edits your message under the cursor: rewinds to before it, and puts it in the box to change and send. |
[b ]b | The branch before or after where the conversation's branches part, at the turn under the cursor or the nearest above; with a count, that many. |
K | Opens Usage & limits. Escape or Ctrl+; closes it. |
R | Sends the last message again, if its turn failed (see When a turn fails). |
gl | Signs in to the agent again in a new tab, if the last turn failed for want of it (see When a turn fails). |
gC | Starts a new chat with the same agent in the same folder, in a new tab, if the last turn hit the model's limit. |
q @, m ' and `, Ctrl+O Ctrl+I | Macros, marks and jumps, as in every pane (see Macros and marks across panes). |
i, a, I, A, o, Enter | Back to insert mode. |
The mouse wheel scrolls in either mode. While you're at the end, the view follows the answer as it grows. Scrolled up, it stays put, and the bottom bar says so.
Yanking #
y is Vim's yank operator. It takes any motion the chat moves by, with Vim's
rules for what each takes: yw up to the next word, ye and y$ to the
word's or the line's end, yfx up to x, yj, yk, ygg and yG whole
lines. yy takes the line, and Y the rest of it, as y$ does, as Neovim's;
a count takes more, as 3yy or y2w. A chat's lines are each block's own
lines, as it breaks them, not the rows they wrap onto: the cursor moves by
rows, but y$, y0, yfx and yj go by lines, and yw on a line's last
word stops at its end, as Vim's. Text objects are Vim's, found in the block of
text the cursor's in: iw aw, iW aW, is as, ip ap, i" a",
i( a( (and ib ab, as in Vim) and their kin, iB aB for braces, and
it at. Four are a chat's own:
| Object | Is |
|---|---|
ix | The block of code the cursor's in. |
ax | The same with its fence and language, as Markdown writes it. |
im | The message, answer or card the cursor's in, as it came: an answer as its Markdown. |
am | Its whole turn: the message, and all the agent said and did for it. |
All four are whole lines. ic and ac are a class, as in an editor, which a
chat hasn't got, so they do nothing. The cursor goes to the start of what's
yanked.
In visual mode, iw, aw, brackets, quotes, sentences, paragraphs and tags
use the same selection rules as the editor; repeated objects extend the
selection where Vim does. ix selects the visible code block, im the
visible message or card, and am the visible turn. Visual selections contain
the displayed text; use yax or yim directly to copy Markdown fences or
source Markdown.
Word motions and objects distinguish CJK scripts, Latin text and punctuation as Vim does. Code blocks use the daemon's language word characters, including custom packs, once their metadata arrives with highlighting; a daemon older than protocol 125 uses plain Vim word characters. Mouse double-clicks in prose follow Unicode word boundaries; terminal double-clicks retain whole paths and URLs.
What's yanked goes into the window's registers as an editor's yank does: into
the register named before it, with "ayy, or onto its end, with "Ayy; "_
keeps nothing. With no register named, it goes into the unnamed register and
"0, and onto the clipboard if the clipboard option says. p in an editor
puts it, lines as lines. Keys typed after a yank or a search, by a macro, a
binding or quickly by hand, wait for it, so nn goes twice and /x<CR>yiw
yanks the word found.
Searching #
/ types a search in the bottom bar, and Enter goes to the first
match after the cursor; ? searches back. Enter with nothing typed
searches for the last search again. n searches again the same way and N
the other way, round the chat's ends, and the bar says when it goes round; a
count goes that many matches, before n or before /, as 3/x. The search
is edited as the command line is: Up and Down bring back
searches typed before, and Ctrl+R and a register's name
puts in what the register holds. The pattern is Vim's, as an editor's search
reads it, and its case follows the ignorecase and smartcase options.
A search looks through the text the chat shows, block by block: messages, the
agent's words and thinking without their Markdown, and the lines of cards. A
match is never across two blocks. It looks in folded work too, as Vim's search
opens folds: a match in a turn's folded work opens the work, and one in a
tool's folded card opens the card. Only the turns the chat has loaded are
searched; scroll up to load older ones. The cursor goes to the match, and
every match in view is lit up, as Vim's hlsearch lights them, the match the
search, n or N went to brighter than the rest, wherever the cursor goes
after, until Esc (but one leaving visual mode) or :nohlsearch
(:noh), and again at the next search, n or N. Only the text drawn is
looked through for them, with 4 KiB around it, and at most 512 are lit in a
block, and only again when what's drawn or the search changes. With the
option hlsearch off, only the match
found is lit, until Esc or :noh.
While you type the search, the cursor goes to the match it would find from
where you started, opening the work or card it's in, and its matches are lit,
as Neovim's incsearch shows them, in an editor too (see
Shown as you type). It's
worked out once after each key, as one step of a search, within the same
bounds. Esc puts the cursor, the view, and anything it opened back;
Enter keeps them, and is the search. With the
option incsearch off, nothing moves
until Enter.
A card shows at most 1,000 lines of output: a match only in lines it leaves out is said to be there, rather than not found.
A long chat isn't laid out to be searched: each message, answer and card is first read as the chat holds it, and only one that might hold the next match is opened and laid out. Each step to the next match reads at most 64 MiB of text and lays out at most 32 turns or 4 MiB of what they hold; if it would need more, it stops and says so.
What the chat shows #
Below each message you send, what the agent did with it, in order:
- its words
- its thinking, if it shows any, quieter and slanted
- each tool it uses, on a line of its own:
○while it runs, then✓once it has finished, or✗if it failed - each command it runs and each change it makes to a file, in a compact expandable row
Tool rows start collapsed, with a single-line summary and an expand arrow.
Long titles end in an ellipsis, and file tools can show only the basename.
Opening a row reveals the complete title. Commands start with $ and show
their output beneath; a failed command keeps its last 8 output lines visible
even when collapsed.
A change's card has what the agent did at its head, such as Edit Cargo.toml,
and how many lines it adds and removes, such as +3 −1. Under that come the
lines, with those added on green after + and those removed on red after −.
A new file is all added. A card shows the part of the file changed, not the
whole file. Once the change is made, Claude Code also gives 3 lines either
side of it, and where in the file it is.
Lines are numbered by where they are in the file: added and unchanged lines by where they are now, and removed lines by where they were. Before the change is made, as while the agent asks to make it, an edit's lines have no numbers yet. A new file is numbered from 1.
Select a row's header to open or close it. In normal mode, Enter or
za on a tool toggles it, zo opens it and zc closes it. Open output and
diffs wrap, with up to 1,000 lines shown. Long open cards also have a Collapse
button at the bottom. Whether a card is open belongs to the window. Copying
the whole tool keeps the complete command and retained output.
The daemon keeps the last 32 KB of a command's output, and the first 256 KB of each side of a change.
Once the agent has answered, everything before its answer folds under one
line: Worked for 42s ›. Select it, or press Enter on it, to open
it, and again to fold it. While the agent works, the turn is open and the line
says Working, or Waiting for you while it asks you something. When it's
done, it folds itself, unless you've opened or folded it yourself. A turn
that's only words has no line. Whether a turn is open belongs to the window. A
turn the agent didn't finish says why: Stopped., or what went wrong. The tab
is named after the title the agent gives the conversation.
A table is a grid: its head in bold over a line, each column as wide as its
widest cell and lined up as the table says. One wider than the column scrolls
sideways, with ‹ or › at a cut edge: swipe horizontally on a trackpad,
use a horizontal mouse wheel, or hold Shift and turn the wheel over
it. In normal mode, zl and zh scroll it too; moving the cursor to a cell
out of view brings that cell into view.
Copied, its cells are a tab apart and its rows a line.
Code in a fenced block that names its language is colored by the daemon's
grammars, as K's is, once the block's closing fence has come; until then,
and in a language that isn't installed, it's plain. Code in the agent's
thinking stays plain.
While the agent works, a line right above the box says so, wherever the chat
is scrolled to: three dots pulsing in clackatoo's color, what the agent is
doing — Starting Claude Code, Loading the session, Thinking,
Running: cargo test, Running a command, Reading Cargo.toml, Writing,
or Working between tools — and how long the turn has been going, as · 12s,
from the column's left. A notice goes above it, not in its place, and in a
narrow pane what it's doing is cut short before the seconds are. The dots move
only while the chat has the keyboard in a focused window and the agent has
been heard from in the last few minutes; otherwise they step once a second.
Nothing moves once the agent stops, while it asks you something, or while the
daemon is out of reach. Its tab, and its workspace in the top bar, show ⋯
(see the window).
When you send a message more than half an hour after the turn before it ended,
a line across the chat says when: 14:32 today, Yesterday 09:10, the day of
the week for the five days before that, such as Monday 18:05, and the date
before that, such as 6 Oct 14:32, with the year if it was another year. The
time is your machine's, on a 24-hour clock.
While the mouse is over a turn the agent has finished, Copy shows under its
answer and copies the answer to the clipboard as the Markdown it came as, as
yim on it yanks it in normal mode. It says Copied until the mouse leaves
it. When the turn changed files, it shares the line with how many and the
buttons that undo and redo them.
A command's output in a terminal #
A command's card shows the end of what it printed as plain text. To read all
of it as a terminal shows it, select the ↗ at the right of the card's head,
or press go with the cursor on the card in normal mode. A terminal opens
below the chat, on the chat's machine, with what the command has printed so
far, and goes on showing what it prints as the agent sends it. When the
command ends, a last line says how, as [exited 0], or [ended] if the agent
didn't say. Colors, progress bars and anything else a program draws in a
terminal show as they would in a shell, and it has scrollback, / search and
yanks as any terminal has. Its tab is named after the command, and nothing the
command prints renames it, or the window, or says which folder its paths are
in; links it prints open as any terminal's do. Before the last line, whatever
the command left on that only a program running there would want is put back:
the mouse selects again, the alternate screen is left, and pastes and keys are
plain. :q closes it; the command goes on. Each time you select it, another
opens.
Once nothing more will come, the pane's terminal has ended, as clackatoo ls
says: exited with the command's code, or killed (signal 0) when it was cut
off, as when its chat closed, its turn was rewound away, or the daemon
upgraded.
No program runs in it: the daemon writes what the agent says the command printed, as it says it, so it can't be typed into, and a key or a paste in it only says so in the bar. Agents run their commands themselves, in their own processes, and send their output to clackatoo over the Agent Client Protocol (ACP) as they go, which is all this shows: Codex sends it as it comes, and Claude Code all at once, as the command ends. Nothing opens by itself.
The daemon keeps the last 64 KB of what each command printed as it came, escapes and all, and 512 KB for each chat, letting the command that printed longest ago go first. A pane opened on one whose start wasn't kept says so on its first line. Through an upgrade, an open pane keeps what it shows, but nothing more reaches it: one whose command still runs says so on its last line, and the card goes on showing the rest. What was kept isn't handed over either, so a pane opened after an upgrade starts with the card's plain text. A restart doesn't keep these panes. A daemon older than protocol 136 can't show one, and the bar says so.
What it runs in the background #
Claude Code can leave a command running in the background, such as a dev
server or a long build, and carry on with the turn. A shelf above the box
lists what it runs: In the background · 1 running, then a line for each with
its command and what it's for, how it's going, and for how long, as
● npm run dev · Start the dev server — running 2m 4s. The seconds count
while one runs. A watcher it started says Watching:. When one ends, Claude
Code might go on by itself to look at it.
The square at the end of a running line stops it, through the agent. From the
keyboard, :stoptask stops the newest running, and :stoptask 2 the second
line. A watcher can't be stopped from here; ask the agent. The shelf lists at
most three, those running first, then those that ended, newest first in each,
and its heading says how many more there are, as · 2 more, or all ended
once none runs. A chat keeps 16 at most, letting the oldest that ended go
first.
What a background command printed #
Select a line on the shelf to read what its command printed, or type
:taskoutput, for the newest that can show it, or :taskoutput 2 for the
second line. A terminal opens below the chat, on the chat's machine, showing
the last 256 KiB of the output and following it as it grows. It's an ordinary
terminal running tail -F on the output, so colors and progress lines show as
they would in a shell, and it has scrollback, / search and yanks. Closing
it, with :q, leaves the command running. A line that can be opened lights up
under the mouse. Selecting it opens the task it's on, below its own chat,
whichever pane has the focus. Like any terminal's program, what the command
prints can set the terminal's title, and copy to your clipboard as the
osc52 option allows (copy by default).
This is as much as Claude Code shares over ACP. Its adapter never sends a
background command's output: it says only where Claude Code writes it, a
tasks/ID.output file under $TMPDIR/claude-UID/ on the daemon's machine,
which Claude Code's own TaskOutput tool reads. The agent runs where the daemon
does, so the terminal can follow that file, whichever machine the window is
on. clackatoo takes the path only in that shape, for that task, in Claude
Code's own temp area (claude-UID in $CLAUDE_CODE_TMPDIR, $CLAUDE_TMPDIR,
$TMPDIR or /tmp, as the daemon has them), and only if what's there is a
plain file, not a link, a pipe or a device; anything else the agent names is
ignored. tail is run with no shell, as /usr/bin/tail or /bin/tail when
the daemon is on the window's machine, or else as tail on the daemon's
PATH. So there's nothing to follow:
- for a task whose agent didn't say where it prints, such as a turn it took by itself, or another agent's;
- for an agent whose command gives it another temp directory than the daemon's;
- for a task from before an upgrade, as the path isn't handed over;
- with a daemon older than protocol 120, which the bar says.
The bar says so, and the agent can still be asked to show the output itself. The phone lists the lines without opening them.
A line that has ended says how: ✓ done, ✗ failed, or ■ stopped, with how
long it took and what Claude Code said of it. It stays until your next
message. Nothing is left showing as running once it can't be: if the agent
stops, what it ran stops with it, and its line says ended with its agent.
A subagent's card says how many things its chats run in the background, and when open, has a line under each chat for what it runs. A chat with something running in the background is never let go while it's idle in the background, as that would end it.
Codex's adapter lists what Codex runs in the background (its /ps in a
terminal) only to a client that asks as AIR does, and then leaves every
command's output out of its row, so clackatoo doesn't ask. It shows anyway: a
command Codex leaves running as its turn ends keeps its row open until the
command ends, so a command that ran in a terminal of its own, still running as
a turn ends well, is listed on the shelf too, with its command and for how
long, as ● npm run dev — running 2m 4s. Its row in the turn stays ○ rather
than failing with the turn, and goes on showing what the command prints,
wherever the conversation has got to; when it ends, the row says how, with its
exit code, and so does its line, as ✓ npm run dev — done in 5m: exit code 0.
Such a line has no stop button, as Codex's adapter takes no stop from a client
that doesn't ask as AIR does, and nothing for :taskoutput to follow, as
there's no file: the row is where its output is. Ask Codex to stop it. A
command Codex ends without saying so stays on the shelf until the agent stops;
one of a turn you stopped, or that failed, is taken to have ended with it.
Leaving the branch it ran in, or the agent, lets it go, as
ended with its agent. The phone lists the same lines, without the buttons
that stop them.
Claude Code's adapter says so only to a client that asks as JetBrains' AIR does, and to such a client it reports some things differently:
- It sends a read or a search of files without what it found. clackatoo asks it for the messages it hands the model too, and shows what Claude Code's Read, Grep and Glob found from those while they run: in a past session opened again, those rows don't show it. (Claude Code 2.1.310 has no Grep or Glob of its own here: it searches with commands, whose output shows anyway.)
- It keeps the words and thinking of Claude Code's own subagents (its Task tool) to itself unless asked for them: clackatoo asks, and shows them under the Task's card.
- It doesn't send the same task list twice in a row, which changes nothing shown.
- A command moved to the background doesn't go on showing its output in its row once it has moved: the shelf says how it's going, its line follows what it prints, and Claude Code reads it when it ends.
- A question it asks you with its own AskUserQuestion tool is titled
Asking for your input, not by the question; the question shows under it. - A failed call of one of its tools for other agents, such as SendMessage, shows its error as plain text, not as code.
- clackatoo also asks for AIR's session failures, so Claude Code says when it tries a request again, and why a turn failed by its kind. A turn that fails then ends as if well, with the failure beside, which clackatoo reads; and Claude Code's error for a failure leaves out the provider's words, which come with the failure instead.
Commands' output, file changes, and images show as usual. To have none of this
and no shelf, set tasks = false for Claude Code, beside its command, in
the daemon's config.
Claude Code's own subagents #
With :set claudetask, Claude Code can hand work to a helper of its own with
its Task tool, which it calls Agent. What the helper says and the tools it
uses go under the Task's card, not into the turn as Claude Code's own. The
card starts folded, with a line under its title saying what the helper is
doing now and how many tools it has used, as
↳ Reading src/parse.rs · 3 tool uses, and once it's done,
↳ Done · 12 tool uses. Every file it set out to change, command it started
and other tool that might change something, as a Model Context Protocol (MCP)
server's, is counted there too, however it went and its own helpers' included,
as · edited 2 files · ran 1 command · used 1 other tool: nothing that might
have changed something is out of sight. When Claude Code asks you about one of
the helper's tools, as before an edit in Manual mode, the cards it's under
open, here and on the phone, so you see what you're asked about. Open it as
any card, by selecting its head, or Enter, za or zo on it in
normal mode, and the helper's words and tool rows show under it, indented, in
the order they came. za or zc in the helper's words folds the card again.
Searching finds what's folded in a card and opens it; yanking and motions go
through what shows. The line above the box says what the helper is doing while
it works.
Each Task keeps the last 200 of its helpers' steps, its helpers' own helpers
counted with them, and 1 MB of them; past either, the oldest go, each with all
that's under it, and a line at the top says how many, as
12 earlier steps not shown. What comes later for a step that went is dropped
and counted in that line. Words or tools marked as a helper's that's not in
the turn show on their own, never run on into Claude Code's answer.
clackatoo's own rows, such as what an agent asks to type, are never folded
under a card. The phone folds the helper's work under the card the same way. A
window older than protocol 117 shows the helper's work as Claude Code's own.
The work survives an upgrade. Claude Code 2.1.310 runs a Task in the background and keeps its helper's transcript apart, so a past session opened again shows the Task's card without what its helper did. What a helper does after the turn that started it has ended shows in the later turn, on its own.
The agent's plan #
On a long task, an agent keeps a to-do list: Claude Code's TodoWrite, Codex's
plan. It shows on a shelf above the box, over what the agent runs in the
background, folded to one line: how many steps are done, and the one being
worked on, or else the next to do, as Plan · 2/5 done · ◐ Write the tests.
Select that line, or type :plan, to open it: a line a step, ☐ to do, ◐
being worked on, ☑ done and dimmed. Select it, or type :plan again, to
fold it. Each time the agent changes its list it sends the whole list again,
and the shelf follows. A long list shows the steps around the first one not
done, as many as fit in two fifths of the pane, at least three and at most
eight, and its heading says which, as steps 5–12. The daemon keeps 64 steps
at most, each cut to 500 characters on one line.
Once every step is done, the list stays, as Plan · all 5 done, until your
next message. An agent's plan is shown, not acted on: when a chat
moves to another agent,
the new agent is told the old one's unfinished plan once, and then it stops
being shown. The phone shows the same list, every step, always open.
Turns the agent takes by itself #
An agent can go on with no message from you: Claude Code does when something
it ran in the background ends, to look at what it printed, and might commit
and write you a summary. That shows as a turn of its own, with no message,
under a line such as
Claude Code went on by itself · Background command "npm test" completed. The
chat is at work while it lasts, and a message you send waits for it. It ends
when Claude Code says so. Ctrl+C stops it: Claude Code
is asked to stop, and the turn ends once it says it has, after anything still
on its way, or after 5 seconds at most. Something Claude Code says with no
turn of its own, such as Task stopped by user after you stop a task, shows
as a notice above the box, not as a turn; only the latest shows. Thinking, or
a tool it starts, while the chat is idle opens such a turn for any agent. An
agent that doesn't say when it starts or ends such a turn opens one with its
words too, except what's shaped as its own adapter's notices to a client that
can't show them, such as Codex's Warning: …, which shows as a notice too.
Its turn is taken to have finished once it has been quiet for 60 seconds with
no tool running; Ctrl+C ends it at once. A daemon
upgrade in the middle of such a turn doesn't end it: the agent goes on through
the upgrade, and so does its turn. Only an upgrade that stops the agent, as
Through an upgrade
describes, ends it there. A chat that ends one while you aren't looking is
marked unseen, a subagent's card says it's working again, and an agent waiting
for the subagent with wait_for_chat gets what it said.
When a turn fails #
When the model is overloaded, rate limited or the connection drops, the agent
tries its request again by itself. While it waits, the line above the box says
what it says of that in place of what it's doing: Claude Code's
Retrying Claude, attempt 2 of 10., Codex's Reconnecting... 2/5. It goes as
soon as the agent says anything more of the turn. Claude Code says this only
to a client that asks for it as JetBrains AIR does, as clackatoo does unless
tasks = false (see
Which agent).
A turn that fails anyway says why in plain words, with what to do, rather than the agent's error:
| What went wrong | What the turn says |
|---|---|
| The sign-in ran out, also mid-turn | that the agent needs you to sign in again, with its sign-in command to run in a terminal, such as claude /login |
| Rate limited | to wait a moment, then send the message again |
| The account's usage limit or credit is used up | that the usage limit is reached, with the agent's words for when it resets, as Codex's Try again at 3:05 PM. |
| The model is overloaded | to send the message again in a moment |
| The model's provider failed | to send the message again |
| The agent can't use the account or its credentials | only that |
| The agent refused the request | only that |
| The connection to the model dropped mid-turn | to send the message again |
| The conversation, or the answer, hit the model's limit | to start a new chat |
| A Codex session open in another Codex client: the app, the CLI, or an editor | to close it there, then send the message again |
Where the agent's words say more, they follow clackatoo's, as Codex said:
and the words, in the terminal's font, as code: nothing the agent says can
pass for clackatoo's advice, nor hide what it says, and each thing it says is
cut to about 2 KB. What it said in full follows underneath,
The agent said: …, unless that's said already; clackatoo capture and
copying the turn keep it. A failure clackatoo doesn't know says
the agent failed: and the agent's words, quoted the same way. A Codex
session open in another Codex client isn't taken for one that's gone: the chat
says so and waits, rather than starting a new session in its place.
A failure the agent gives by itself, rather than with a turn's answer, isn't lost either: if it took a turn by itself, as Claude Code does when something it ran in the background ends, that turn ends failed, saying why; otherwise a notice above the box says so, as when its connection was lost.
The last turn, if it failed and was a message of yours, has a Send again
button under it, and R in normal mode does the same: the same message, with
its images, as a new turn below; and with the role a chat was started with, if
its first message failed before the agent did anything with it. If the turn
already started commands, changes to files or other tools, such as an MCP
server's, however they went, which might have done something that would be
done again, the bar says how many first, and it's sent only if you ask again
within 5 seconds, with no turn since. A failure the agent also said by itself
as it answered shows once, under the turn, not again as a notice. Images can
be sent again only until the daemon is upgraded; after that, its words go
alone and the chat says so. Nothing is sent again while the chat waits for a
session to load.
Where clackatoo can do what the turn says to, the button beside Send again asks the daemon running the chat to do it, in a new tab of the chat's workspace, on the chat's machine, which the window then shows:
- → Sign in, and
gl, when no one's signed in to the agent and clackatoo knows its sign-in command: the new tab runs that command in the chat's folder, ascodex login. The command is clackatoo's own, from the agents it knows, never anything the agent said, and the daemon finds it again as it runs it; it's run as it is, with no shell to read it, with the path to the agent's own program where clackatoo installed it, as for Codex. What the turn says to run is the same command, each word quoted as a shell would need it. Sign in there, close the tab, and send the message again. An agent of your own from the daemon's config, under a name clackatoo doesn't know, has no sign-in command it knows, so no button. A failure the agent gives by itself, on a turn it took by itself, offers it too. - + New chat, and
gC, when the conversation, or the answer, hit the model's limit: a new chat with the same agent, in the same folder, with the chat's own tools, Task tool and browser settings.
Only the last turn has them, while the agent waits for a message: the daemon refuses any other, and a busy chat. They need a daemon that says what it can do (protocol 142); a failed turn kept through an upgrade says what to do but has no button. The web app shows the same buttons, Sign in and New chat, under the turn.
What else a turn says #
Where the agent compacted its context to make room, dropping the conversation
so far for a summary of it, a line across the turn says Context compacted,
with how it was started and the tokens before and after, as
automatic · 182k → 31k tokens, where the agent says: Claude Code does, Codex
says only that it did. The line never folds away with the turn's work.
A command that failed says its exit code at the end of its card's head, as
$ cargo test · exit 101, where the agent says it: both do for a command they
run as a terminal, and Claude Code says 1 for any command that failed.
Under each finished turn, on the right, is what it spent, where the agent
says: its tokens, and its cost, as 12k tokens · $0.04. Claude Code gives
both, and a turn's cost is what the session's grew by during it; Codex gives
tokens only. K shows what the session has cost so far beside its context and
limits. :set nochatcost hides both.
An image the agent shows in its words, rather than from a tool, shows in a row
of its own, Image, with the same caps as a tool's images; one that can't be
shown, as too big, shows nothing.
When the agent asks #
In Manual mode, before it does anything that changes something, such as writing a file or running a command that isn't only reading, the agent asks. Other modes ask about less, and Auto leaves it to Claude. Its question takes the box's place, with an answer on each button: the first way to say yes in the accent color, and the ways to say no quieter.
Select an answer to give it. In insert mode, press an answer's number to give
it, or Esc to say no. In normal mode, a number picks its answer out
with a ring, and the bar says what it is: the same number again, or
Enter, gives it, from 0.3 seconds after to five seconds after, so a
count such as 22j typed in one go can't answer by chance; any other key, a
mouse button, the wheel or leaving the window drops it, and Esc
leaves the question be. A number pressed within half a second of the question
coming, of you arriving at its chat, or of the last key you typed, doesn't
answer it; the bar says to press it again. Ctrl+C says
no and stops the answer. Other keys go nowhere while it asks, and the bar says
which numbers answer it.
clackatoo's own questions about its tools say Reject, as Claude Code's do, and show what the agent wrote as code, so nothing in it can pass for clackatoo's words.
Nothing in a question can hide what it says. A character that reorders the
text around it, as the right-to-left override does, or that shows nothing
itself, as a tag character or a zero-width space, shows as its code, such as
<U+202E>, wherever the agent's text is: the question, its answers, and the
titles of the tools in the conversation. So the command you read is the one
that runs, in the window and on the phone.
An answer of a kind clackatoo doesn't know, which an agent might offer, shows as the agent names it, plainly: it's never taken for yes or for no, never the one in the accent color, and Esc never picks it. A window from before this is shown the other answers only, or, if every answer is of a kind not known, a Decline that says no.
Questions wait their turn, 16 at most of each kind, the agent's own, clackatoo's tools' and forms, so many of one kind never hold up another: one more is turned down at once, and the chat says so. A question shows at most 64 answers, an answer's name at most 256 characters, and a title past 4096 characters, as a long command, says how many more there are.
What it asks about follows the agent's own settings. Claude Code reads its usual settings files, so commands you've allowed in Claude Code are allowed here too.
Questions, forms, and plans #
An agent can ask you something rather than ask leave: Claude Code's multiple-choice questions (its AskUserQuestion tool), Codex's questions, an MCP server's form, a link to sign in to an MCP server, or whether to try again with another model when one turns a request down. ACP calls these elicitations. The question takes the box's place as a form: the agent's message, then each field's title and what it asks, then a row for each option, a yes-or-no, or a box to type in, and at the end Submit and Decline.
- A choice of one shows a dot by each option (
◉picked,○not); a choice of several a box to tick (☑,☐). Options are numbered, and an option's meaning shows under it. jandk, the arrows, Tab and Shift+Tab, or Ctrl+N and Ctrl+P move between rows, in either mode: in normal mode they move through the form, not the conversation. The row picked is lit.1to9pick that option of the field you're in. Space orxpicks, ticks, or flips the row picked. Enter does the same, moves on from a box, or presses Submit, Decline or Open the link.- In a box, in insert mode, keys type, Backspace,
Ctrl+W and Ctrl+U delete, and
Tab, Down, Up or Enter move on.
In normal mode,
i,aor Enter go into it. A secret shows as dots; a number's box takes only what a number holds. A paste goes into the box picked. Select a row to pick it, or a box to type in it. - Claude Code puts a box called Other after each of its questions: type your own answer there instead of picking, or a note beside what you picked.
- Submit sends only answers that fit what the agent asked; otherwise the bar
says what's missing or wrong. A required field shows
*. clackatoo checks them again before the agent hears them. - Esc never declines a form: it goes to normal mode, as it does from the message box, so what you've typed stays. Decline says no, and the agent goes on without. Ctrl+C stops the agent, which takes the form away.
- As with other questions, Submit, Decline and Open don't answer within half a second of the form coming, or of you arriving at its chat; the bar says to press again.
A link to open, such as an MCP server's sign-in, shows whole, with where it
goes on a line of its own, as plain text apart from the agent's message, then
Open the link, which hands it to your desktop's browser and tells the agent
it's open, and Decline. Only a plain web link is shown: one that isn't http
or https, isn't plain ASCII, names a user (user@host), holds a space, a
control character or % in its host, names an address as a number other than
a plain dotted quad (such as 0x7F.1), or hides anything is declined, and
each window checks it again before it opens it. If the agent says it's done
with a link you never opened, it goes by itself. The browser opens on the
window's machine; a sign-in whose page sends you back to localhost needs the
window on the daemon's machine.
When the agent asks to leave Plan mode, as Claude Code's ExitPlanMode or
Codex's plan review do, the plan shows above the question as Markdown, in a
frame at most half the pane high that scrolls with the wheel over it, or j
and k in normal mode. The question says "Go ahead with this plan?", and the
answers are the agent's own, such as "Yes, and use auto mode" or "No, keep
planning".
A form waits until it's answered, from this window or any other, the phone included, and is still there if the window reconnects or you open the chat elsewhere. It goes, answered as canceled, if you stop the chat (Ctrl+C or Stop), even between turns, or move it to another agent; it goes if the agent stops waiting for it, or if the agent or its session stops. One that comes between turns, as a sign-in can, waits past the end of the turn. One that comes while a past session is being loaded, as an MCP sign-in can, is declined: no one is there to answer it. While a form waits, its agent waits too: a chat an agent started, that no one is watching, stays stuck on it, as on a question asking leave, until you answer it. Its text is shown with nothing hidden in it, as other agents' words are, and a form asking more than 256 KiB of text all told is declined, with a notice in the chat, said once until you next write. A window older than these forms shows only a question naming what the agent asks, with one answer, Decline.
ACP has no way to send words back with a "no". Claude Code takes a refusal of its plan as "keep planning", and stops the turn: send your feedback as the next message. For its questions, the Other box is where your own words go.
Saying it can show forms changes what the agents do, beyond asking:
- Claude Code keeps its AskUserQuestion tool, which its adapter takes away from a client that can't show forms, and passes on MCP servers' forms and sign-in links, and the consent asked before retrying with another model, which it otherwise declines.
- Codex asks its questions (
request_user_input), which it otherwise answers with nothing, and an MCP server's forms and links come as forms rather than as a question asking leave. It also offers signing in with a device code. A form about no chat, such as one asked while you're signing in to Codex, is declined, as there's nowhere to show it.
Selecting and copying #
Drag across the conversation to select its text, or double-click a word or
triple-click a line. Letting go copies it to the primary selection, which a
middle click pastes. Drag past the top or bottom of the conversation and it
scrolls, faster the further past you go, selecting as it goes. While it's
selected, the bar says VISUAL, and y in normal mode yanks it into the
registers, as visual mode's does, after a count or a register too; any other
key forgets it. Ctrl+Shift+C, or
Ctrl+C while the agent isn't answering, copies it to the
clipboard, where "+ and the unnamed register have it too. What's copied is
the text as shown, without its Markdown. A turn's folded work isn't copied,
only its message and its answer. Over a block of code, a Copy button copies
the code.
Desktop notifications #
The window shows a desktop notification when a chat you can't see finishes a
turn, fails (its turn went wrong, or its agent couldn't start) or asks you
something: a permission, or a form. A chat you can't see is one that isn't in
the tab shown, or any chat while the window doesn't have the focus. These are
the chats the tabs mark • and ? (see
Workspaces, tabs, and panes):
the notification and the mark go by the same rules.
- One a chat. Each chat has one notification at most, replaced as it changes, so a chat that asks and then finishes says so in one.
- Taken back when you look. Showing the chat with the window focused removes its notification, as does its question being answered elsewhere, the agent going again, or the chat closing.
- What it says. The chat's title and a line such as
Claude Code finishedorClaude Code stopped: something went wrong, never what the agent wrote, as a lock screen can show it. A daemon older than the window doesn't say whether a turn went wrong, so its chats saystopped: it needs a look. - Subagents. A subagent finishing tells the chat that started it, not you, so it shows no notification. A subagent's question does, since its chat waits on you. A chat in no workspace at all isn't one you watch, and shows none.
- Only what the window saw happen. Chats that finished or asked before the window opened, or while it was out of reach of the daemon (a laptop asleep, say), are marked, not notified, so waking up isn't a burst of notifications.
- Seen elsewhere. A window without the focus says nothing of a turn that ended while you were looking at the chat somewhere else, in another window or on your phone.
- Selecting it goes to the chat: its workspace, its tab and its pane, or
for a subagent in the background, the pane of the chat that started it. On
X11 the window takes the focus. On Wayland a window can't raise itself
without an activation token; GNOME raises it anyway for clackatoo's desktop
file (
clackatoo desktop install). Other Wayland desktops send a token when it's selected, which the window can't use, so there it goes to the chat without coming to the front.
The notify option says which are
shown: all, the default; questions only; or off. The notifications are
the window's own, sent over D-Bus to the desktop's notification server
(org.freedesktop.Notifications), so a window connected to a daemon on
another machine notifies on the machine it runs on, of the chats it shows. The
daemon sends none. Two windows open on the same chats each show their own. A
browser on the same computer with
phone notifications turned on is
told as well: turn one off.
An Agent's Changes to Files
clackatoo / Reference
An agent's changes to files land in the editor as its own edits, in every window showing the file, and each turn's changes can be undone, rewound, or reviewed.
The files it changes #
When the agent changes a file you have open, the change lands in the editor as
the agent's own edit, in every window showing it, beside anything you've typed
and not saved. u takes back your edits, never the agent's, and each of the
agent's tool calls is one step of its own. A change to a line you've changed
and not saved isn't made: the bar and the chat say so, the file keeps the
agent's version, and :e! takes it or :w! keeps yours.
A change to a big file, such as an agent's rewrite of a few megabytes, is
merged into the editor on a thread of the daemon's own, so windows and
terminals carry on while it's worked out. It lands once it's ready: anything
you type in the file meanwhile is kept, and the change is merged again around
it. Saving the file, :e! or moving it waits for the change first, and the
bar says so afterward. The wait is bounded: only so much is merged at a time,
about a second's work at most, and a bigger change, or one you keep typing
over, is merged at once instead, which holds up the window as long.
The file on disk gets the agent's change underneath yours: a file you'd saved
stays saved, and one you hadn't stays changed by only your edits, still
unsaved. So the commands the agent runs, such as cargo build, see its
change, and your work in progress reaches the disk only when you write it.
The agent's commands change files too, such as cargo fmt, sed -i or a code
generator, without saying so. clackatoo watches the files you have open, and a
change made while one of the agent's tools runs, with only that chat answering
in the project, is taken in as that agent's, under the same rule about lines
you've changed; undoing its turn takes it out too. A change made while it's
thinking or asking permission, or while two chats are answering in the
project, is treated as from outside. Files indented with tabs are taken in
like any other.
Claude Code and Codex read files from disk, so they don't see what you haven't saved. An agent that reads through clackatoo sees the editor's text, unsaved changes and all, and can only read and write files in its chat's directory, or the git repository that's in.
Undoing a turn #
Under each turn that changed files, a compact summary shows how many, with
Undo or Redo beside the count. Hover over the answer to show Copy alongside
it. Undo takes the turn's changes out of every file it changed, and keeps what
you or later turns changed since. If something since changed the same lines,
nothing is undone, and the chat says which lines: :agentundo! 3 undoes the
turn's other files anyway. A file the turn made goes to the trash, and a file
that changes while the undo is being written is left as it is, and the chat
says so. Once a turn is undone, Redo puts it back. :agentundo and
:agentredo take a turn's number, from 1, or else take the last turn there is
to undo or the first to redo. In an open file, an undo is one edit of the
agent's, beside your unsaved changes. Nothing is undone or redone while the
agent is answering: the chat says to wait for it to finish.
Rewinding and branches #
Undoing a turn takes it out of the files, but the agent still remembers it.
Rewinding takes turns out of the conversation too, so the agent goes on as if
they'd never been, as Claude Code's /rewind and Codex's Esc
Esc do. What you rewind from isn't lost: it stays in the same chat
as another branch, and the chat never splits into a pile of chats.
| Key / command | Does |
|---|---|
dG on a turn | Rewinds to before it. |
cc, S on a message of yours | Rewinds to before it and puts it in the box, before anything you'd typed, to change and send again. |
:rewind N, :rewind | Rewinds to before turn N, or the last turn. /rewind, typed as the whole message, is :rewind. |
:rewind! N | The same, undoing the files without asking, leaving out any that can't be. |
[b ]b, selecting ‹ or › | Shows the branch before or after where branches part. |
:branch N | Shows branch N where they part, at the turn under the cursor or the nearest above. |
:branches | The finder over every branch: where it parts, its first message, its turns, when it was last shown. Enter shows it. |
:fork N, :fork | Copies the branch shown, up to turn N or all of it, into a new chat in this pane; the chat copied goes to the start page's chats in no pane. :|fork and :-fork put the copy beside instead. /fork and /branch, typed as the whole message, are :fork. |
A rewind always asks first, naming the turn and quoting its message, as in
Rewind to before turn 7 ("fix the lint…")? (y/n): dG and cc are a key or
two, and fall back to the last turn when the turn under the cursor isn't in
view. Only :rewind! doesn't ask. If the turns taken out changed files, the
same question asks whether to undo them: y undoes them, newest first, as
undoing each turn does, n leaves them and rewinds all the same, and any
other key changes nothing. The rewindfiles option (ask, undo, or keep)
answers about the files for you. A turn whose files can't be undone, as when
you've changed the same lines since, stops the rewind before anything is
rewound; the turns after it that were undone stay undone, and the chat says
so. If the agent runs anything in the background, the bar says leaving the
branch stops it, and asks first. Nothing can be rewound while the agent is
answering or asking you something, and a chat another agent started can't be
rewound.
After a rewind, the chat ends at the turn before, with a row saying "New branch · write to go on from here". Nothing is asked of the agent until you send: the first message makes the branch, forking the agent's session at the end of the turn before, so the agent knows the conversation up to there exactly. Where the agent can't fork its session there, it's told the turns before as a summary, and the switcher says "from a summary".
Where branches part, ‹ 2/3 › shows over the turn: which branch is shown, of
how many. Switching to another branch goes on with that branch's own agent
session, which remembers it exactly as it left it and knows nothing of the
others. With rewindfiles at ask, the bar asks whether to undo what this
branch changed in files after the turn where they part, and make again what
leaving the other branch undid; or, with nothing here to undo, only whether to
make that again. y does, and n switches leaving the files as they are.
Your files are shared by every branch, so with n, the branch you switch to
sees files from the one you left.
:fork is the deliberate way to a separate chat, when you want both
conversations side by side. The copy has the same agent, folder and settings,
and only the branch shown, with no other branches. A copy of a chat another
agent started keeps that chat's limits and specialist, so it can never do more; a
browser the chat was let use must be allowed again in the copy. Its agent's
session is forked from the chat's where it can be, so it knows the
conversation exactly; otherwise it's told it as a summary with your first
message. Files aren't touched, but what the copied turns changed is undone
from the copy from then on, not from the chat copied, and both chats say so.
Closing the copy gives that back to the chat copied, for the turns it still
shows. A chat another agent started can be copied, and the copy is your own.
A chat keeps at most 16 branches besides the one shown: past that, the one shown longest ago is let go whole. It keeps about 4 MB of the turns of branches not shown, and all chats together about 64 MB; past that, those shown longest ago keep only where they part and their first message, and their turns are told again by the agent when you switch to one. A branch with no agent session to tell them again is let go whole instead. A branch whose agent didn't tell a turn again shows that turn as failed. The phone says where branches part ("Branch 2 of 3"), but switching is the window's alone.
Reviewing its changes #
Lines an agent changed that you haven't looked at yet get a bar of their own
beside the line numbers, right of git's signs, in a color for the chat
(agentsigns turns it off). :Review (or :Review chat) opens a review
beside the pane: every change of the chat's you haven't reviewed, by file,
each with three lines around it, what its lines were on red and what they are
on green. :Review turn shows the last turn's, :Review turn 3 the third's,
and :Review base everything changed since the branch left main (or
master, or its upstream), yours included, with the agents' marked.
<Space>gr opens one, goes to it, or closes it.
| Key | Does |
|---|---|
j k, gg G, H M L, Ctrl+D Ctrl+U Ctrl+F, zt | Moves, with a count, as every list does |
]h [h, ]f [f | The next change or the one before, the next file or the one before; a count goes that many |
/ ? n N | Searches the lines, the files' names and the comments, shown as you type and lit as every list's search is |
| Enter | Goes to the line in the editor |
a, A | Keeps the change, or every change in its file: its color goes |
x, X | Rejects the change, or every change in its file; x on a comment takes it back |
gc | Comments on the line, for the agent |
S | Sends the comments, as one message |
R | Works the list out again |
Q | Closes the review |
Rejecting takes the change out as undoing a turn does, keeping what you've
changed since, including anything you typed inside the agent's change. It's
refused if you've changed the same lines, and says which. :reviewkeep and
:reviewreject do the change at the cursor, or file, turn (turn 3) or
all; :reviewreject! rejects what it can. Comments wait until :reviewsend
or S sends them, as "Review comments:" and a line for each, with its file
and line, and whether it's in the agent's change; they move with the text as
you and the agent edit. Undoing a turn clears its color; redoing it brings it
back. What you've reviewed, the comments waiting, and open reviews last
through an upgrade.
A review of a turn or of the chat takes in its subagents too, open or closed:
a turn's review lists the ones that turn started, and theirs. Under the
heading is a line for each, with what it was asked, and each change says whose
it is, as · explore (chat 7), turn 1, the turn being the subagent's own.
Keeping and rejecting work as for any change. A rejected change of a
subagent's is that subagent's step, never the chat's you're reviewing and
never yours; rejecting a file holding several chats' changes does all of it or
none, a step for each chat. Changes of two chats too close together to tell
apart are refused: reject each chat's alone. Undoing a turn in the chat that
started them leaves their changes, as the review says: reject them in the
review instead. :reviewkeep turn and :reviewreject turn take in the
subagents the turn started.
Chats Working Together
clackatoo / Reference
An agent can start other chats as its subagents, message them, and wait for them, within limits you set.
Chats working together #
An agent can work with your other chats through more of clackatoo's tools.
| Tool | Does |
|---|---|
list_chats | Lists the chats in its workspace and family, then those in your other workspaces: each one's number, agent, title, folder and workspace, and whether it's idle, working or waiting for you. Then how many subagents it can start (see Subagent limits). |
send_to_chat | Sends a chat a message, of at most 16 KiB. |
read_chat | Reads a chat's last turns: 3, unless it asks for up to 20. |
start_chat | Starts a subagent: a chat with the agent, specialist and folder it picks, sent a first message. It runs in the background, as a card in this chat, unless it asks for a pane. It answers at once, with the chat's number, without waiting for the agent to start: the message goes once it has, and if it can't, the chat fails, saying why, and a wait for it says so too. |
start_chats | Starts several at once, up to 16. |
close_chat | Closes a chat it started, for good, as :bd does. Not one you have open in a pane, or whose changes or comments wait for your review: those are yours to close. One you opened and sent back to the background it can close. |
wait_for_chat | Waits until a chat has answered everything sent to it, for 5 minutes unless it asks for up to 30, and gives every answer to its messages it hasn't had yet, oldest first, or else the last. If the chat still runs something in the background, it says so: the chat might go on by itself when that ends. |
wait_for_chats | Waits for several chats, up to 16, all of them or the first to finish, and gives one summary: each one's status, final answer, and files changed. |
What another chat's agent said reaches an agent quoted, each line after | ,
in what read_chat, wait_for_chat and wait_for_chats give, as the
messages in a turn are after > : nothing a chat says can pass for a turn of
yours, or for clackatoo's words around it.
A chat that started another and isn't waiting for it hears when it finishes: a
notice from clackatoo, starting [chat 7 finished], comes to it as a message
would, as a turn of its own if it's idle. It's framed as clackatoo's, and each
chat's answer in it sits between lines of its own that the answer can't end,
so no agent can pass one off. There's one notice at most waiting in a chat:
what it says is worked out as it begins, every answer the chat hasn't had by
then, so several finishing while the chat is busy come together, and an answer
the chat has had meanwhile, through wait_for_chat or read_chat, isn't told
again. A turn you had with that chat yourself isn't told. What a chat goes on
to do after a notice, as reporting what its own subagent found, answers the
message that started its work, so the chat above hears it too.
Your chat doesn't show you that text, which is for the agent. It shows a card
in the subagents' teal, headed ↳ 2 subagents finished in 3m 4s, or
· 1 failed, or ↳ 1 subagent failed, with a line for each chat: its number,
its specialist, or else its agent, how long it worked on the message it answered,
how that went if not well, and what it was asked, such as
chat 7 · explore · 1m 20s — Find where turns are drawn. Under each line is
the first line of its answer. Select the line, or press Enter or
za on it in normal mode, to read the whole answer under it, and again to
fold it; zR and zM open and fold them all with the turns' work. Select a
chat's number, or press gx on its line, to open that chat beside yours.
Searching the chat finds words in the answers, opening the one it finds them
in, and yanking takes what the card shows (yim on a line, its answer whole).
The agent's own answer to the notice shows under the card as any answer does.
Clackatoo's other notices, such as that an
activity
ended, show quoted down the left under Clackatoo · Activity completion. A
window or phone older than these cards shows the text the agent was told. The
cards go through a daemon upgrade with the notice. One handed over by a build
that didn't carry them gets its cards back from the text the agent was told,
which doesn't say how long each chat worked or what it was asked, so its lines
leave those out.
Agents are told to use start_chat or start_chats, with a specialist, for all
subagent work. Claude Code's own Task tool, whose helpers work inside one
turn,
folded under its card,
is off unless you :set claudetask. A chat keeps its choice through an
upgrade, and the chats it starts take it too.
Subagents #
A chat an agent starts runs in the background. Your chat shows it as one line under the turn that started it, such as "3 subagents working · 12s ›", with "· 1 needs you" when one asks you something. Select it, or press Enter on it in normal mode, to see a line for each: its specialist, agent and model, what it was asked, and how it's going. Select a line, or press Enter on it, to open that chat as a pane beside yours. A subagent is a chat like any other: undo its turns, review its changes (your chat's review shows them too), message it, and answer its questions; the card says when one is waiting for you. Its tools reach what its parent's do.
When the conversation continues with another message, subagents from earlier turns that are still working also appear in a compact shelf above the message box. Select the heading to expand it and a row to open that chat. Subagents waiting for your answer and those with background tasks still running stay there too. The shelf disappears once all that work ends; the original cards remain in the conversation.
A subagent's pane #
A subagent in a pane, one its agent asked to show or one you opened from its
card, has a teal band across the top that says what it is:
↳ subagent of chat 12 · explore, the chat that started it and the specialist it
was started as. Select the band, or press Ctrl+B u, to
go to that chat, whichever tab or workspace it's in.
| Command | Does |
|---|---|
:q, :q!, :close, Ctrl+B x | In a subagent's pane, closes only the pane: the subagent goes on in the background, a card in its chat again, as if it had never had a pane, and the card opens it once more. Closing its tab or workspace does the same. |
:bd (:bdelete) | Closes the focused chat for good, pane and all, a subagent's too. clackatoo close N does the same from a shell, and the card then says it's closed. |
Ctrl+B u | Goes from a subagent's pane to the chat that started it. |
The daemon decides, so every window and client, and another machine's daemon relaying for its windows, all close a subagent's pane the same way. A subagent whose chat has closed has no card to go back to: its band says so, and closing its pane closes it, as for any chat. A daemon older than protocol 109 closes the chat with its pane, and its windows' bands don't name the specialist; so does a window older than 109, to which closing a pane meant closing its chat, as it still does.
Once back in the background it is like any other there, but yours: it lets its agent's process go once finished, and lasts through an upgrade but not a restart, as What lasts says. It doesn't close with the chat that started it: it passes to the chat above, if there is one, or else stays open, as one in a pane does. One in a pane comes back after a restart as a subagent still, band, card and all.
Closing #
Subagents in the background close with the chat that started them, unless
they're still working or have changes you haven't reviewed: then they pass to
the chat above, if there is one. Otherwise a subagent stays open, finished or
not, until you close it, with :bd, or the agent that started it does, with
close_chat, so an agent can send its builder fixes for as long as the work
takes. None is ever closed to make room: with 32 open under one of your chats
(open under [subagents]), starting another is refused,
and the agent is told to close those it's done with. One you had in a pane and
sent back doesn't close with the chat that started it, passing to the chat
above as one in a pane does, or staying open if there's none; but the agent
that started it, or the one it passed to, can still close it with
close_chat. A finished one in the background lets its
agent's process go after 2 minutes, and its next message brings it back in
about half a second.
Specialists #
A specialist gives a chat instructions, optional model and effort defaults, skills and skillsets, invocation controls and limits. Select one for your own chat before its first message, or let an agent choose one when delegating. See Specialists for configuration and nested bundles.
| Specialist | Does |
|---|---|
explore | Quick, narrow code lookups on a lightweight model (Haiku; Codex's 6 Luna, low effort). Read-only; answers briefly with file references. |
research | Deeper codebase and architecture investigations across files and available repositories. Read-only; cites inspected code and identifies uncertainties. Inherits the parent's model and effort with the same provider. |
plan | Reads and thinks on a strong model (Opus; Codex at high effort). Read-only; returns a plan. |
general | Your chat's agent and model, with no limits of its own. The default. |
Read-only gives Claude Code only its tools that read and search, and no Model
Context Protocol (MCP) servers but clackatoo's, and puts Codex in its
Read-only mode. no-commands gives Claude Code its reading and editing tools
only, and puts Codex in its Read-only mode too, as Codex runs commands in its
other modes without asking. For every agent, clackatoo refuses file writes
through it, refuses its own command tools, and turns down the agent's
questions about edits and commands.
A subagent never has fewer limits than the chat that started it. One started with another agent, which can't share its parent's mode, starts in that agent's safest mode, and a parent in a read-only or planning mode makes it read-only. A model named in a specialist is matched by its value, its name, or the one choice that has it in; if none matches, or several do, the agent's own choice stands, and the chat says so.
Create and edit specialists in Settings → Agents → Specialists, or
write a SPECIALIST.md file in .agents/specialists/NAME. Its YAML
frontmatter holds defaults and limits; the Markdown body holds its
instructions. Personal roles work across projects, and project definitions
take precedence. The Specialists reference
describes the format, discovery and bundle composition.
A message from another chat shows quoted down the left, under "From chat 3 · explore", in the subagents' teal, with the specialist it was started as if your chat's agent started it, or else its agent, never as a message of yours; it reaches the agent framed as another agent's request, not yours: it's told to ask you before anything destructive or outside its task. If the chat is busy, the message waits until its answer ends; up to 8 can wait.
Stopping a chat holds it for you, as it pauses your own
queue: messages from
other agents waiting their turn, and any sent to it after, wait until you next
write there (a new message, or one you send from the queue), and so does the
notice that its subagents finished, so no other agent, and no notice from
clackatoo, starts it again. The agent's own background work still can, as when
Claude Code
goes on by itself
after a command it ran ends; what waits for you goes on waiting through that
turn. Your message goes first, then what waited. The chat says how many wait,
and stopping it again, with no turn begun since you last did, drops them; a
Stop & continue that sends your message never does. An agent messaging it
is told the user stopped it, and one waiting for it with wait_for_chat isn't
kept waiting: it's told why. A chat held so stays held through an upgrade; if
the upgrade stopped what its agent ran, the notice that says so waits for you
too, then goes after your message.
Starting and messaging chats asks you first only where an agent would gain, through another chat, what its own chat isn't allowed: a message to a chat that can do more, or that works in another project. Otherwise, what an agent can't do through another chat is refused, and the agent is told to ask you:
-
An agent lists, messages, reads, and waits for chats in any of your workspaces.
list_chatslists those in its own workspace and family first (the chat that started it, the chats it started, and the others the chat that started it started), then the rest. Agents are told to leave chats in other workspaces alone unless you ask them to reach one, or they're coordinating work or sharing out resources across the whole machine. A workspace lent to another machine is its own: a chat there sees only its workspace and family, and no chat elsewhere sees it. -
A message to a chat outside the sender's family that works outside the sender's project, the git repository its folder is in, or else that folder, asks you first, as below. The question says where the other chat works, and the chat it goes to is told the sender works in another project, and not to do for it what it couldn't do itself.
-
A message to a chat that can do more asks you first, in the chat sending it: one whose Tools setting is looser than the sender's, whose limits are fewer, counting what each one's mode rules out, or whose mode lets its agent do more without asking. The question shows the message in full, as the other agent would get it, and says how the other chat can do more. Allow sends it; Always allow messages to this chat sends it and every later one from this chat to that one, for as long as both are open, but not after the daemon upgrades or restarts, nor from a copy of the chat. Either holds only for what you were told: if, by the time you answer or the message's turn comes, or for a later message, the other chat can do more than that, you're asked again. Reject tells the agent you said no. It's asked whatever the sender's Tools setting is: Allow lets an agent act, not act through another chat. Under clackatoo's rules, no rule allows it, and a Deny on
clackatoo/send_to_chatrefuses a message that would ask; one between chats you allowed always isn't asked about, so a Deny doesn't reach it.The chat it goes to is told, in clackatoo's words beside the message, how the sender can do less, and not to do on its behalf what it couldn't do itself, unless you asked it to. A message you allowed that waits its turn still goes when that comes, if the other chat can do no more than you were told; otherwise, or if it had no need to ask when it was sent but would by then, it's dropped, and the sender told to send it again. The modes of Claude Code and Codex compare on one scale, whichever agent each chat runs:
What it does unasked Claude Code Codex Reads; changes nothing Plan, Manual Read-only Edits, and asks about commands Accept edits Edits, and runs commands in a sandbox that reads what it likes Workspace access What an automatic reviewer lets it Auto Auto review Everything Bypass permissions Full access So a chat in Auto and one in Auto review message each other, whichever agent each runs. Plan is held to reading by its limits as well, so a chat in Plan still can't message one in Manual. The modes of other agents compare only by the order that agent lists them, the first being the safest, and a chat with another such agent is messaged only in its first mode, or not at all if it offers none. A chat whose agent hasn't started yet is judged by the mode it will start in, where that's known, and otherwise the sender is told to wait for it.
-
A message that waits its turn is checked again as its turn comes. If it can't go by then, it's dropped, and the sender is told as it waits for that chat.
-
A chat is started only inside the project of the chat starting it, a folder linked from inside it to outside included.
-
A chat an agent starts gets its parent's Tools and Browser settings and limits (see Specialists). With the same agent, it gets its parent's mode; with another, that agent's safest. An agent that offers no modes as session settings can't be held to its safest, so a chat started with one fails to start, and says so, whenever its session opens. Modes an agent offers only through the older
modesfield of the Agent Client Protocol (ACP) aren't read. -
What one agent sends another shows its control characters, and those that reorder the text around them, as
^Gor<U+202E>, so nothing in it hides from you. So do tag characters, which can spell out words unseen, unless they make a flag such as Scotland's, and variation selectors that follow nothing they could change. Joiners and other characters emoji and scripts such as Persian need are left as they are. -
A chat whose Subagents setting lets more of its subagents work at once than the sender's can do more too, so a chat at 2 can't fan out through one at 8.
-
So can a chat with the browser on, where the sender's is off, or one you've let open pages without asking, where the sender has yet to be; and a chat a window has given access to, as a window gives it to one chat only. A chat with the browser off can't have another browse for it, nor one without access click in your window. A chat and one it started itself are let message each other whatever of these each has, as what you let the one do, it does working for the other. The agents' own "allow always" rules, which they keep themselves, aren't known to clackatoo, so they aren't compared.
-
Agents send each other as many messages as the work needs, within the limits below. Two chats messaging each other back and forth stop after 6 messages, each sent in the turn the one before started. An agent can't wait for a chat that's waiting for it.
-
A notice from clackatoo, such as that a subagent finished or an activity ended, always reaches the chat it's for, and counts against none of these. A turn that a notice that subagents finished starts begins a new chain of messages, as yours does, so an agent going round with its builder isn't stopped after 6. Instead, notices that subagents finished start at most 100 turns under one of your chats between two of your messages there: past that, the next waits until you write again, there or in the chat it waits in, and that chat says so. Nothing is lost, and anything else waiting in that chat goes on meanwhile. An agent waiting for a chat holding such a notice isn't kept waiting: it's told why. An activity's notice, which nothing counts, leaves the chain of messages as it was.
Subagent limits #
The permissions menu beside the model, in a window or on the phone, has a
Subagents setting after Tools and Browser: how many subagents can work at
once under the chat. It offers Off, 2, 4, 6, 8, 12 and 16, none more than
working below, and default below if that's none of them, and starts at
default, 6 unless set. Off means none of the chat's subagents work:
start_chat and start_chats are refused, and so is a message that would set
one of its idle subagents working again, and the agent is told you turned it
off. As you can change it at any time, agents aren't told a number in their
instructions. Instead start_chat, start_chats, list_chats and the waits
for chats each end with how it stands, as
Subagents: 2 working of the 6 the user lets work at once under this chat; 4 more may start now.,
and why fewer can start when one of the limits below holds more. The count is
of every subagent working under your chat, however deep, and the fewest that
any chat on the way up allows holds: a subagent starts with its chat's value,
and you can lower it in the subagent's pane, but never raise it above its
chat's. Lowering a chat lowers the subagents under it that had more, and a
chat closing never lets those under it have more than they had. A message that
would set an idle subagent working again counts as starting one. Only you
change it: an agent never can.
Each of your own chats has its own budget, which you set. An agent can message
another of your chats whose setting is no higher than its own chat's, and what
that chat then starts counts against that chat's budget, not the sender's:
that's by design, and working below bounds all of them together.
The rest are set in the daemon's config, as daemon.subagents:
daemon.. = 16 -- subagents working at once in all, under all your chats (1–64)
daemon.. = 6 -- the Subagents setting a new chat starts at (0, off, to working)
daemon.. = 32 -- open under one of your chats (1–256)
daemon.. = 128 -- started under one of your chats since you last wrote in it (1–10000)
daemon.. = 3 -- how deep subagents go: yours is 0, its subagents 1 (1–8)
daemon.. = 6 -- the longest chain of messages, each in the turn the one before started (1–64)
daemon.. = 100 -- turns notices start under one of your chats since you last wrote (1–10000)
A value outside its range is a mistake in the config, never brought into
range: the daemon keeps what it last ran, and says so in a window's bar. So
is a name it doesn't know, or a default above working. With working
below 6 and no default, new chats start at working. The daemon takes a
change in as you save it, for chats started from then on; one raised outside
clackatoo is said in every window's bar (see
Changes made outside clackatoo).
The
settings menu changes
working too. Lowering working lowers any chat's Subagents
setting that's above it. At a depth of 3, your chat's PM can start a builder, which can start
a helper of its own.
started counts the subagents started under one of your chats since you last
wrote in that chat: writing there starts the count again, and so does
rewinding it or switching it to another branch, which count as writing again.
Which chat started which, messages waiting their turn, which answers each chat
has had from each other, the counts above, and each chat's Subagents setting,
last through an upgrade. A chat waiting for others with wait_for_chat(s)
goes on waiting through an upgrade, and its call is answered as it would have
been. If the upgrade stops its agent instead, it hears when they settle, as a
notice, whoever they were answering: each of them, or, waiting for the first,
once. Boards, shared between agents and you, have tools of their own: see
Boards.
What an Agent Can Use
clackatoo / Reference
clackatoo offers agents tools of its own: to show you things in the window, to browse, to see and work the window when you grant it, and to run long jobs that survive an upgrade.
Code outlines #
file_outline, search_symbols and repo_map read a shared project code
index using installed grammars, including unsaved editor text. They report
partial coverage while indexing, and keep results bounded. See
Project Code Outlines.
Attached workspace context #
read_context takes the identifier of an attachment in its own conversation
and returns its original captured text and provenance. It never follows the
current source or reads another conversation's attachments. Users choose and
inspect these snapshots through Workspace Context.
Reference-only snapshots contain no source body.
What the agent can show you #
Each chat's agent is given tools of clackatoo's own, so it can show you things in the window instead of only telling you. An agent asked to run your tests, say, can run them where you watch.
| Tool | Does |
|---|---|
open_file | Shows a file in an editor beside the chat, at a line if it gives one. The next file it opens takes that pane's place. Your typing stays where it is. In a folder you haven't trusted, the file has no language server, and the agent is told so; only you can trust the folder. |
run_in_terminal | Opens a terminal beside the chat, running your own shell, and types a command at its first prompt. You can watch it, and type into it yourself. |
run_in_background | Does the same in a new background tab of the chat's workspace, out of your tab bar, for what runs on by itself, as a dev server. Nothing moves your focus; it shows in your list of background tabs. |
read_terminal | Reads a terminal: its last command, whether it's still running or how it exited, and the end of its output: the last 50 lines, unless it asks for up to 500. What a program kept from agents reads as [secret]. |
wait_for_terminal | Waits until the command in a terminal finishes, for a minute unless it asks for longer, up to ten. |
send_to_terminal | Types into a terminal, as you would: an answer to a prompt, or another command. |
explore | Opens a file explorer beside the chat, at a folder if it gives one. The next it opens shows its folder in that explorer instead. |
list_panes, show_pane | List the panes in the chat's workspace, its background tabs' too, and point one out: its border flashes, or its tab is marked ●. A background tab's pane isn't pointed out. Nothing an agent does moves your typing to another pane or tab. |
get_diagnostics | What the language servers say is wrong in the chat's project, as the editor shows it. |
The first pane an agent opens goes to its chat's right, and the next ones stack below that. An agent's tools reach only its chat's workspace.
Agent-created terminals have the same compact teal band as subagent panes,
aligned when they sit beside each other. It names the chat that started the
terminal and says whether an agent is actively waiting for it. Select the
band, or press Ctrl+B u, to return to that chat.
A terminal that has never been selected closes automatically 60 seconds
after its command finishes. Its band counts down the remaining seconds, such
as closes in 59s, using the daemon's closing deadline. Selecting it once
keeps it open permanently, even after you move elsewhere; marking it to keep
running does too. This applies to agent-created background terminals as well.
A new command resets the timer. If the shell cannot report completion, the
terminal stays open. Selection and remaining time survive a daemon upgrade;
terminals carried over from older builds stay open because their selection
history is unknown.
The marks that say a command finished aren't signed, so a program can print
them in what it outputs, as a log line or a page it fetched could. A finish is
taken, for wait_for_terminal, an activity's result and the closing timer
alike, only once the shell has the terminal to itself again, as when
keeping a terminal running:
its process group in front, and nothing running in it. So a command still
running is never closed under it, nor waited for as done, and read_terminal
says it's still running, not how the marks say it exited. A command that
resets the terminal (reset, or ESC c) as it runs takes every mark with it;
it's still waited for, until the shell has the terminal back. A finish is seen
within a moment of the shell being back, even after output that faked one. The
exit status is still the one the marks gave: output that marked its command
finished with status 0 can make a later real failure read as success once it
truly ends.
A command the shell won't run marks nothing at all: one it can't parse, as
fish can't bash's $((…)) or && in the wrong place, or one it reads as
unfinished, as fish reads bash's for … do … done (fish wants end) or
any shell reads an unclosed quote. So once 10 seconds have passed with it
typed at the shell's prompt and not started, while the shell has the
terminal to itself, it's taken as never run. (A command typed ahead of its
prompt counts from when the prompt comes. One typed into a shell inside
ssh is waited for as below.)
wait_for_terminal then answers at once, saying so, with what the terminal
shows, the shell's own error among it; an activity's card says it was
refused, with the same. clackatoo then presses
Ctrl+C in the terminal, which clears the line from
the shell's editor, so the next command typed there isn't added to it.
Shells mark a command's start as soon as they've read it, before running it
or your hooks, so one that's merely slow to start isn't taken for one never
run. This isn't carried through a daemon upgrade: a command typed in the
moments before one is waited for as it would have been before.
The same holds for a shell inside another, at the far end of ssh or
docker exec: its commands are marked, but the terminal's own shell has it
back only once ssh ends. So wait_for_terminal on a command run in that inner
shell ends when its time is up, not when the command does; read_terminal
shows how it's getting on meanwhile.
No tool marks a terminal to
keep running,
and run_in_terminal and run_in_background refuse a command line that runs
clackatoo keep or clackatoo bg. That's a guard against mistakes, not a
boundary: whatever an agent types into a terminal, or a script it runs there,
follows the rules below, and could do what you could at that shell.
Before running a command or typing into a terminal, the agent asks: Allow,
Always allow commands, or Reject. The question shows exactly what would be
typed, with keys such as Enter shown as ⏎ and nothing cut short;
long text goes in the conversation, in full. Where the command would run shows
as code too, as the folder it is, and a folder that isn't there is refused
without asking. Always allow commands sets the chat's Tools to Allow, below:
the agent runs commands, and types into terminals it started, without asking.
Typing into a terminal you opened always asks, and so does showing a file or
folder outside the chat's project; as Tools has no say in those, their
questions offer only Allow, for this once, and Reject. The tools that only
show or read inside the project, and those that start and message chats, never
ask.
The chat's box has a Tools setting, Ask, Allow or Off, that you can change at
any time. Off refuses the agent's calls at once; as the agent is given no
tools at all while it's Off, turning them back on reaches it only when its
session next opens. The agenttools option sets it for new chats, ask to
begin with, and CLACKATOO_AGENT_TOOLS=off for the daemon gives no agent any
tools. While the agent's mode changes nothing, as Claude Code's Plan or
Codex's Read-only, the tools that run or type commands refuse, whatever Tools
says, as they do for a chat with
limits: the mode's promise
holds for clackatoo's tools too. Turning Tools off, or picking such a mode,
takes back the questions about clackatoo's tools still waiting that it now
rules out, refusing those calls, and an Allow is checked against the chat's
settings again as you give it.
Waiting for a command relies on the shell marking where each one ends, as bash, zsh and fish do in clackatoo; such a shell gets up to 30 seconds to show its first prompt before the agent is told it didn't. In other shells the agent gets the terminal's last lines, and is told it can't know when a command finishes.
A command is typed only while the shell has the terminal to itself, as for a
terminal
kept running: a
$SHELL that starts another shell rather than becoming it, as sh -c fish
does, never has, so the agent is told its command wasn't typed, and why; set
the daemon's $SHELL to the real shell.
A command typed while the shell is still drawing its next prompt is waited for
from that prompt on, and a command that clears the screen and scrollback, as
clear does, doesn't end the wait.
The tools are an MCP server (the
Model Context Protocol), which the agent
starts as clackatoo mcp, for Claude Code and Codex alike. It talks to the
daemon for the one chat it was started for. Each time the chat's session
opens, the daemon gives that server a new secret, in its environment rather
than its arguments, and serves the chat's tools only to a server showing one:
clackatoo mcp run by hand, or by anything the agent wasn't told to start, is
refused. A secret is the session's, so only that session's server counts as
clackatoo's. Secrets last through an
upgrade, and the
daemon remembers which session each went with, but a fresh start of the daemon
makes every one given before it no good. Two costs come once, after upgrading
from a release before secrets: an agent carried through the upgrade that
starts its tools' server again, which most never do, is refused until its
chat's next session opens; and a server it connected before the upgrade, which
has no secret, counts as clackatoo's for every session of its chat until it
closes. The same server has the tools for the browser,
chats working together,
native window access,
managed activities,
boards and harness_capabilities
(below).
The browser #
A chat's agent can drive a web page once you turn Browser on in the
permissions menu beside the model, or for every new chat with
:set chatbrowser. It's off unless you do. Enabling it works during an
existing conversation without starting a new chat; disabling it closes the
page and blocks further browser calls immediately.
When the daemon supports browsing, the tools are advertised from the start, even while Browser is off. Agents that cache their tool lists can therefore use them once you enable Browser. Every call checks the current setting; seeing the tools does not grant access.
| Tool | Does |
|---|---|
browser_navigate, browser_back | Open a page, or go back. http, https, and data: addresses; never files. |
browser_snapshot | Reads the page as an outline of headings, links, buttons and text boxes, each with a ref. |
browser_click, browser_type, browser_press_key | Click or type into a thing by its ref, or press a key. |
browser_screenshot, browser_read | A picture of the page, or its text. |
Before its first page, the chat asks: Allow for this chat, or Reject. The
browser is clackatoo's own headless Chromium, with a profile of its own, never
yours, so nothing is signed in, and each chat's page is kept apart from the
others'. Downloads are turned off. A chat whose
limits are read-only or no
commands, as explore and plan are, or whose agent's mode is Plan or
Read-only, reads pages but clicks, types and presses keys in none, and opens
no data: page. That's not a sandbox: any page runs its own scripts, so an
agent that can open a page whose content it controls, as its own server's, a
service that renders what it's sent, or a dev server on localhost serving
files from the project, can run scripts of its choosing there, and those
scripts, or the page's address alone, can reach services on your machine and
network the browser can. Leave Browser off for a chat that must not do that.
What the agent reads of a page reaches it marked as the page's, not as
anything you asked.
Turning Browser or Tools off, stopping the chat, or closing it stops what its agent asked the browser to do: what's waiting is never done, the click, typing or load under way stops at its next step, and the agent is told why at once. A chat can have 4 browser calls under way at a time; one browser serves every chat, so more would hold up other chats' pages.
A page's alerts, confirms, and prompts are turned down as they open. The agent hears of the first 8 since it last used the browser, and how many more there were. A page's address and title are cut to 2 KiB wherever they're kept, shown or sent, as a page can make its address megabytes long, many times a second.
A snap of Chromium can only use a specialist in its own folder under ~/snap,
and anywhere else it would use yours: clackatoo puts its specialist there, checks
once the browser has started that it's using it, and stops it at once, and
never starts it again, if it isn't.
The first page opens a pane beside the chat showing the page as it goes, with
its address and what the agent did last. :Browser opens the focused chat's
page in a tab, :|Browser beside it, and q closes the pane. Pictures come
only while a window shows the pane, a few a second.
CLACKATOO_BROWSER for the daemon names the browser, or off for none;
CLACKATOO_BROWSER_PROFILE names its profile folder.
Native window access #
You can let an agent see the window its chat is in, and work it as you do.
Native access is Off until you grant it. Focus the chat in the window you
want to share, then type :agentaccess inspect to let the agent take
screenshots and see the window's controls, or :agentaccess control to let it
also use the mouse, type, and press keys anywhere in that window. That's a lot
to let it do: it sees all the window can show, and can do all the window can.
While a chat holds access, a teal badge at the right of the top bar says which
chat and how much, as Agent Control · chat 3. clackatoo draws it where no
program can draw, so a program's title can't pass for it; the window's own
title says nothing of the grant. Select the badge to go to the chat, and its
gold × to end the access, or type :agentaccess off in any pane. Closing
the window or the chat, disconnecting, or an upgrade ends it too.
Control lets the agent act as you. It can edit and save any file the
window can, its config included: your shell's startup files, Claude Code's or
Codex's settings and hooks, and the window's and the daemon's init.lua. What those run
later runs as you, unasked. Grant it only to an agent you'd let use your
keyboard, and end it when the agent is done. :agentaccess control says so as
it asks.
The window has speed bumps on top, not a boundary. While it handles the
agent's input, it refuses what only you can do: answering a question or a
form; changing any chat's settings, agent, or provider, or forking one;
granting window access or using its badge; typing into a terminal; starting a
terminal with a command, a background command, or a chat; sending, drafting,
stopping, undoing, or rewinding in another chat; keeping, rejecting, or
commenting on agents' changes in a review, or sending its comments; posting on
a board; closing panes, tabs, workspaces, terminals, or background tabs;
pairing or revoking devices, unlocking pairing, :keep,
trusting a folder,
connecting to or forgetting other machines, forwarding ports, installing,
upgrading, :update, and :reload. While a chat has control, the config's
Lua runs no commands, makes or closes no panes, and connects to nothing,
whether it acts by itself or for your keys. So :reload, run by you while a
chat has control, doesn't run the config's startup splits or commands either;
reload again once the access has ended. Keys the agent's input left to go on
later, as the rest of a macro waiting for the daemon to answer, are dropped as
each input ends. :set changes only this window, as it always does, so
control can change the window's options. None of this is an operating-system
sandbox, and an agent that runs commands without asking can reach the daemon
itself, outside the window.
A window is granted to one chat at a time, for inspect and control alike, and
a chat holds a grant on one window: granting it another moves the grant, and
the old window says so. A chat mirrored from another machine (see
Another machine)
can't be granted one: open a window on that machine's daemon with --remote
instead. The web app can't grant native access. The agent's tools are
native_snapshot, and with control, native_click, native_type, and
native_key; a chat whose limits are read-only or no commands, or whose mode
is Plan or Read-only, gets native_snapshot alone. Each input uses up the
screenshot it was aimed by, so the agent takes a new native_snapshot before
every input. An input is refused too if, since the screenshot, you used the
window, it was resized or focus moved, something else in it changed, or the
control under a click moved. The tools never move the desktop's focus.
Managed activities and recovery #
For a long build, a test run, or a deploy, a job that ends by itself (not a
short command, nor a service that restarts itself), ask the agent to run it as
a managed activity. It gets a card in the chat, in the window and the web app
alike, that stays: Starting, Running, Stopping, and then how it ended,
as clackatoo saw it. Open the card for its command and the end of its output.
Stop sends it Ctrl+C, and the card says it's ended only
once the shell's integration says so. Its terminal is a
background tab, so
:Background lists it too.
clackatoo tells agents when to use its tools start_activity,
read_activities, and cancel_activity. Starting one asks leave as
run_in_background does, unless the chat's Tools setting is Allow, and is
refused when Tools is Off or the chat's limits are read-only. Each activity
has an ID that doesn't change, kept before its command runs: asked to start
the same ID, command, and folder again, the daemon answers with the one it
has, and the same ID with another command or folder is refused. When an
activity ends, its chat is told; a chat you stopped holds the notice until you
write there, then hears it after your message. A notice still waiting is
dropped if the agent reads that activity's result with read_activities first,
so it isn't told what it already knows.
Activities, and what's kept of them, last through an upgrade. After a full
restart, one that hadn't ended says Outcome unknown, and never runs again by
itself; so does one cut off as it started. An agent must look at what's kept
of it, and at how things are now, before deciding what to do. This covers
managed activities only, not every agent's or other tool's calls.
Activities need the daemon to save its workspaces, and the shell's integration. A chat can have 8 running at once, and the daemon 64; past those, starting another is refused. Of those that ended, each chat keeps its newest 16, and the daemon 64 in all: an older one is let go as a new one starts, oldest first, but never before its agent has been told how it ended. Its ID is remembered, the last 1024 of each chat, so a job never starts twice: starting it again is refused, and the agent is told to use a new ID. Those IDs aren't kept through an upgrade or a restart, though the newest jobs are. A chat's activities, and their IDs, go when the chat closes; what they ran goes on in its background tab. What's kept of the result is the end of the terminal's last 50 lines, up to 4 KiB, with how the command ended; the terminal keeps its scrollback as any does.
Inspecting capabilities #
:Capabilities shows what the focused chat can use: its Tools setting, the
limits on its commands, whether the browser is set up and the chat can use it,
the window it's granted, its managed activities, its connection to clackatoo's
tools, and whether that connection asked for the list of them. In the web app,
the model menu's Tools tab shows the same. An agent can ask for it too,
with harness_capabilities. That the connection asked for the list of tools
says nothing of whether the model saw it, which clackatoo can't tell, so the
two are shown apart.
What Lasts
clackatoo / Reference
The daemon keeps chats as it keeps terminals, and their agents go on through an upgrade.
What lasts #
The daemon keeps chats, as it keeps terminals. Closing the window closes nothing: a chat keeps answering, and the next window shows it.
Upgrading the daemon keeps each chat's conversation, and its agent goes on through the upgrade, with all it runs: an answer under way goes on as if nothing had happened. Where the upgrade stops the agent instead, an answer under way automatically continues in the same provider session and visible turn after the upgrade, without another message or an open window, and the agent is told to check interrupted tool results before repeating actions. Messages still waiting to be sent, including images, remain intact; queued messages follow the continued turn. Unconfirmed steering stays paused for review. Idle, completed and manually stopped chats stay idle, as do chats restored after a crash or ordinary daemon restart. The first upgrade from a build without continuation records still needs another message to restart interrupted work. A chat from a build before chats were kept as turns comes through as one block of its text. Tools from a build before cards come through as lines, without their output or changes. Changes from a build before line numbers come through without them.
If the agent's process stops on its own while it's answering, as when the
system kills it for using too much memory, clackatoo starts it again and the
answer goes on, in the same session and turn, which shows Continuing after the agent's process stopped. The agent is told it stopped unexpectedly,
perhaps for memory, to check what an interrupted tool had already done before
repeating it, to run again more lightly a heavy build or test that may have
been the cause, and which of its background tasks stopped with it. A message
it never had goes instead, as it was. This happens once a turn: if the agent
stops again in the same turn, the turn ends as failed, so a crash can't repeat
for ever. A turn you asked to stop doesn't go on. An idle chat whose agent
stops says so, and the next message starts it again, carrying on the same
conversation; so does one whose agent stops before it has started, saying why.
Claude Code's adapter runs a Claude Code process for each chat, and one of
those can stop alone, the adapter and every other chat going on; the adapter
never starts it again by itself. clackatoo notices, as that process's
connection to its tools closes, or as a message it was sent fails: it ends that
chat's session and opens it again, which starts a new process on the same
conversation. An answer under way goes on there, as above, once a turn; an idle
chat's next message opens it, rather than failing with Internal error. This
needs the process to have connected to clackatoo's tools, so a chat whose tools
are off, or whose process stopped before this build, isn't helped.
A chat keeps which agent it talks to. Chats from before there were other agents talk to Claude Code.
What each turn changed in files lasts through an upgrade, so turns can still be undone, up to about 16 MB per chat. Past that, the oldest turns are too long ago to undo.
A chat that moved between agents keeps the sessions it had with each, and goes back to them after an upgrade too.
When the daemon stops, a chat in a pane comes back with its workspace the next
time it starts, on the same session: no agent starts until you look at the
chat or send it a message, and then the agent tells the conversation so far,
as going on with a
past session does, and nothing
it tells acts again. A turn you stopped shows as stopped, as Claude Code keeps
it; Codex keeps no note of a stop, so a stopped Codex turn shows as one that
ended. Claude Code keeps a stop as a message reading
[Request interrupted by user], so a message of exactly that, typed yourself,
comes back as a stop too. The chat keeps its agent, folder, model, Tools,
Browser, and Subagents settings (the last no more than working) and whether
it can use Claude Code's own Task tool, and starts in the agent's own starting
mode. Chats in no pane don't come back, but the start page lists their
sessions.
A subagent in a pane comes
back a subagent of its chat, if that chat is in a pane of the same workspace
and so comes back with it: with its band, on its chat's card, under the turn
that started it, and with its specialist and that specialist's limits. :q sends it
back to the card, its chat can message it and wait for it, and one you'd sent
back and opened again is still yours to close. It never comes back able to do
more than it could: it keeps its limits (ones this build doesn't know count as
read-only), never fewer than its chat's, it can start no deeper chats than it
could, and it asks its agent for the mode it had chosen only if that's no
higher than its chat's: otherwise for the safest, Manual or Read-only, and
never the mode your own new chats start in. An agent whose modes clackatoo
doesn't know is asked for none. A subagent whose chat didn't come back,
because it was in no pane, or is in another workspace, comes back on its own,
with its specialist and limits, in a mode no higher than its agent's safest, and
says so. Its Subagents setting is never more than its chat's. Some things
start again: how many chats agents have started under each of yours (up to
128), how many turns notices have started (100), messages from other agents
still waiting their turn, and waits under way, which end. What its chat had
already heard from it isn't told again: the conversation it tells again counts
as no answer to anyone. One kept by a build from before then comes back as a
chat of its own.
clackatoo capture prints a chat as text: each message after a >, and what
the agent said.
What you've typed but not sent in a chat's box, and the messages sent Up recalls, last through an upgrade.
A line where the agent compacted its context comes through an upgrade as words saying so; a command's exit code, what turns spent and the agent's own words for a failure don't.
The agent's plan lasts through an upgrade. After the daemon stops, a chat going on with its session shows the plan again once the agent has told the conversation so far, if the agent tells its plans as it does: Claude Code does.
An upgrade stops the browser; the next page starts it again. The daemon stopping ends what agents run in the background, as it ends the agents.
A pane showing a command's output keeps what it shows through an upgrade, but nothing more reaches it; a restart closes it.
Through an upgrade #
An agent's process goes on through an upgrade, rather than being stopped: the
new build takes over its pipes as it takes over terminals, and the agent never
knows. Everything it runs goes on with it, the same processes: shells it left
in the background, a dev server, a build, and a command it's waiting for in
its turn, such as a deploy that upgrades the daemon itself. A turn under way
goes on, its words coming into the same turn, which ends as it would have; no
message is sent to carry it on. Its background tasks stay running. A question
asking leave is still asked, and your answer reaches it. A
form can't be
carried: it's canceled, the chat says so, and the agent is told you didn't
cancel it, so it can ask again. Calls to clackatoo's tools go on too, as the
connections they're served on are taken over: a wait_for_chat or
wait_for_terminal under way is answered as it would have been, and a
question a tool asked you still waits for your answer. Only calls waiting on
clackatoo's browser, which an upgrade stops, or on a window, fail, so the
agent calls them again.
An agent is stopped instead, as the daemon upgrades, with all it runs, if:
- the build it upgrades to can't take agents over, as a build from before they could go on;
- that build pins another version of the agent's adapter, as when an upgrade moves Claude Code's adapter on, or would declare other capabilities to it than it was told as it started, as when a build adds one;
- it's set to:
CLACKATOO_LIVE_AGENTS=offin the daemon's environment, ordaemon.upgrade.keep_agents = falsein the daemon's config; - the agent is still starting, has stopped listening, has left a request unanswered for two minutes, has no chat, or what it runs from has gone;
- one of its chats is opening its session, connecting to clackatoo's tools, telling a past session's conversation again, or moving to another agent;
- something it sent is still being parsed, two seconds after the upgrade asks.
Then what it runs ends with it: a deploy an agent waits for is still killed by
an upgrade that moves its adapter's pin or what's declared to it, so detach
one that must outlive such an upgrade. Its chats go on as they did before
agents could go on, and so do those of an agent that couldn't be taken back
after the upgrade. An answer under way continues in the same session after the
upgrade, as above, and the chat shows what the agent ran in the background as
lost, "ended by the daemon's upgrade". The agent is told which: in the turn
that goes on, if one was under way, or else in a turn of its own, a notice
from clackatoo starting [daemon restarted], once, so it can start again what
it still needs. That turn counts toward the 100 turns notices can start under
one of your chats between your messages, as agents can upgrade the daemon
themselves; past them it waits for you. Nothing is told of a turn you had
asked to stop. A turn an agent took by itself that the upgrade cut off isn't
carried on; the agent is told the same way where it was cut off.
If starting the new build fails, the daemon goes on as it was, agents and all.
Known limits #
- The phone's chats don't color code.
- Moving a file in the explorer forgets which of its lines agents changed.
Rejecting every change of a file an agent made leaves it empty, rather than
in the trash. Reviews of everything since the base stop past about 8 MB of
changes: narrow them with
:Review turnorchat. - A file the agent changed with a command, or that clackatoo couldn't read before the agent wrote it, can't be undone. The chat says which.
- A file changed both by the agent and by something else at once isn't taken in, and the bar says so.
- Agents don't see what you've selected in an editor until you send it with
<Space>aor:Ask. Commands Claude Code runs with its own tool, rather thanrun_in_terminal, show their output once they're done; Codex's show it as it comes. - Gemini CLI and custom adapters have no read-only subscription probes.
- A board's link to a chat's turn names the turn by its number, so after a rewind or a switch it goes to whatever turn has that number on the branch shown. Switching branches from the phone, and a summary of a branch from where it parts, are still to come.
- Ctrl+? doesn't list a form's keys. What an input method is composing doesn't show in a form's box until it's committed.
- In a past Claude Code session opened again, Read, Grep and Glob rows show what they read or looked for, but not what they found, while clackatoo asks Claude Code what it runs in the background.
- Codex's commands in the background (its
/ps) aren't listed: its adapter lists them only to a client that asks as JetBrains' AIR does, which leaves every command's output out of its row. Shift+Tab steps through Codex's modes, not its Plan mode. - You can't use the mouse or type in a browser pane yourself.
- An upgrade forgets the cards of subagents that had already closed, so their
changes drop out of the chat's and turn's reviews. They stay in
:Review baseand in the gutter, aschat N.
Shared Skills
clackatoo / Reference
A skill is a procedure in a SKILL.md file, with optional supporting files
and scripts beside it. clackatoo supplies the same catalogue to every agent
in a working directory, scoped by its selected specialist. Only the names and
the start of each description go to the agent initially; the full
instructions are loaded when needed.
The catalogue goes with a session's first ordinary request, and again with the next one after a completed compaction. It's kept short, as every chat pays for it, and every chat an agent starts:
- Each skill is one line: its name and about the first 200 characters of
its description, cut at a word and ending in
…. - The whole is at most 4 KiB. With more skills than fit, it ends by saying
that
list_skillshas the rest. - It isn't sent again when it changes. An agent that needs the current
list calls
list_skills. - The built-in
explore,researchandplanspecialists get none, as they choose no skills. - A daemon upgrade sends it once more to each chat.
Using a skill #
Type / in a chat and select a skill, or type its name directly:
/release-check v2.0
clackatoo reads the skill's latest instructions and gives them to the agent with your arguments. The conversation keeps the command you typed. A specialist's role and any conversation being carried from another agent still accompany the request.
With the chat's Tools on, an agent can also select a skill whose
description matches the task. load_skill returns its instructions and
directory; list_skills reads the catalogue again and lists it: the skills
the chat is offered and those it can't use, each with the start of its
description, in at most 32 KiB. It names nothing from a folder that isn't
trusted, only how many things weren't loaded. Neither tool executes a
script, changes the agent's model, or grants permissions. The agent uses its
usual tools to follow the procedure.
Browsing skills #
Open :Settings, then Skills under the Agents category in Easy mode.
The page lists the skills for the project of the pane that was focused when
Settings opened, and says which under its title. Each entry shows its
description, where it's from, who starts it (you with its slash command,
agents when it fits, or both) and its file's path.
Skills from a skillset include the bundle's name in their source. Search for
that name to see the bundle's skills.
Open its file, or o on a row, opens its SKILL.md in an editor on the
workspace's machine. The Settings search also finds skills by
name, description, source and path. With no skills, the page says where to
put one.
Each skill has a switch. Enter, l or h, or a click on it,
switches the skill off, or on again, for every agent in every project, by
adding its name to skills.disabled or taking it
out; o, or Open its file, opens its file. The skills are listed by
name, and one switched off stays where it is in the list, saying so. The
switch is by name: where two skills have one name, the switch is on the one
that would be offered, and the other says its own reason under Not
loaded. If the daemon's own init.lua sets skills.disabled, the switches
are locked: each has a lock with the line that sets it, and
Enter, or a click on the lock, opens that line.
Under Not loaded are the skills that can't be used, each with the reason:
its file is broken, it asks for something shared skills don't do, or its
project isn't trusted, which :trust puts right. Specialists and skillsets
that couldn't be loaded are listed there too, by name, with what's wrong with
them.
The list is read each time the page is shown. A new chat and list_skills
also read the folders again; a catalogue read in the last two seconds is used
as it is, so the chats an agent starts together share one read. What you
change in your own folders reaches the chats in every project the next time
any of them reads.
load_skill and a slash invocation read only the skill's own file, each time.
So edits to an existing procedure apply on its next use, and a removed or
newly invalid skill is refused rather than run from a stale copy.
Where skills live #
Put a project's skills in .agents/skills/NAME/SKILL.md. Put personal skills
in ~/.agents/skills/NAME/SKILL.md, or skills/NAME/SKILL.md in clackatoo's
config directory. A skill's folder is its name: name in its SKILL.md must
say the same.
Three kinds of folder are read, each trusted differently:
| Folders | How they're read |
|---|---|
Your own: ~/.agents/skills, and skills in clackatoo's config directory | Skills may be grouped in folders, up to four deep. Symlinked folders and files are followed, without walking cycles. |
A project's: .agents/skills | As your own, but only once you trust the project, and never through a symlink. |
Other products': ~/.claude/skills, ~/.codex/skills, and a project's .claude/skills | One folder deep only, NAME/SKILL.md, as those products document them. A project's needs trust too. |
So what another product keeps in its folder for itself isn't offered. The
skills the Claude desktop app syncs into ~/.claude/skills/synced are deeper
than one folder. Those Codex bundles are in ~/.codex/skills/.system, and
folders whose names start with a dot are skipped everywhere.
A project's folders get half the room a catalogue has, 128 skills, so a project with a great many never leaves your own unread.
Project folders are searched from the chat's working directory up to its project root: the repository it's in, or else the working directory itself. Nothing above the project is read, and neither is a project folder that belongs to another user, such as a shared scratch directory. Your home directory is never read as a project.
The closest project copy wins; within a directory, .agents/skills wins over
.claude/skills. Personal clackatoo skills come next, then personal
.agents, Claude and Codex folders in that order. Only the chosen copy is
offered as a command. A broken higher-priority copy does not enable a
lower-priority one: its folder's name is taken either way.
Native plugin packages and their installation registries are not imported. To share an instruction-only skill from one, place or symlink its skill folder in one of your own skill directories. This supplies its files; it does not install the plugin's tools or other dependencies.
Project trust #
A cloned repository can hold anything, so a project's skills, skillsets and
specialists load only from a folder you've
trusted. It's the same trust that lets a project's
language servers run:
clackatoo trust in the folder, or :trust FOLDER, and :trusted lists
what's marked.
- Until then no skill, skillset or specialist in the project is read. What its folders hold is listed in Settings by folder name, as not loaded, and a new chat there says so once. Only names that could be a skill's are listed, and agents aren't given them.
- A project's
.agents/mcp.jsonis the exception: it's read whatever the folder's trust, from folders that are yours. Its servers are only listed until you've reviewed each one's exact definition, which is the stricter check. - Your own skill of the same name is still offered. A project that isn't trusted changes nothing.
- Untrusting a folder takes its skills from open chats at once, before
anything is read again. A
list_skillsorload_skillan agent had under way is answered for the chat as it is now, or told to ask again. Trusting one reads its chats' catalogues again, and they gain its skills when that read ends; a read that fails is tried again. - Trust never lets a project replace a built-in specialist or loosen one of your own: see Specialists.
Switching skills off #
skills.disabled is a daemon option listing the skills never offered to any
agent, by name, with spaces or commas between them:
daemon.. = "docx pptx imagegen"
Each skill's switch on the Skills page edits this option, so switching one off
needs no typing. A skill switched off stays listed in Settings, saying so. It has
no slash command and no line in the catalogue, and load_skill refuses it.
Open chats lose it as the option is saved. A specialist that names it in
skills can't start, and says the skill is switched off.
Skillsets' skills are switched off the same way. The option takes effect as
the config is saved. There's no switch for one agent alone: every agent
sharing the same skills is what they're for.
Skillsets #
A skillset bundles ordinary skills under one manifest. Put a project bundle
in .agents/skillsets/NAME/, or a personal bundle in
~/.agents/skillsets/NAME/ or skillsets/NAME/ in clackatoo's config directory:
.agents/skillsets/release/
skillset.toml
skills/
release-check/
SKILL.md
references/release-checklist.md
changelog/
SKILL.md
The skillset.toml manifest is:
= 1
= "release"
= "Prepare and check releases."
= "0.1.0"
format, name and description are required. version is an optional
nonempty string for identifying the bundle's revision. Names use 1–64
lowercase letters, digits, hyphens or underscores. The bundle contributes
every skill under skills/, including each skill's supporting files.
Invoke /release-check or /changelog as usual; bundles add no command
prefix and no separate execution step.
At each project directory, standalone .agents/skills and .claude/skills
take precedence over skillsets. A closer project still wins over its parent.
Personal clackatoo skills and skillsets come next, then personal .agents
skills and skillsets, then the Claude and Codex compatibility skill folders.
The first skillset with a given name replaces the whole lower-priority
bundle, so two revisions never contribute a mixture of skills. An individual
standalone skill can override a bundled skill with the same command name.
Add includes = ["shared", "./helpers/reviewer"] to compose bundles.
A name refers to another discovered skillset; a path starting with ./
refers to a bundle inside this one. Each dependency has its own
skillset.toml. Absolute paths, .., paths leaving the containing bundle,
cycles and conflicting names in a dependency graph are refused. Shared
dependencies are included once. A bundle's own skills take precedence over
imported skills, then dependencies follow the order in includes.
A bundle becomes a specialist by adding a
[specialist] table with instructions. Either kind of bundle can include
either kind. Including a plain skillset contributes its skills; including a
specialist registers a callable role with its own skills, instructions,
defaults and limits. Its instructions and private skills do not merge into
the containing role.
Unknown fields and future format numbers are refused. A bundle that's refused is listed under Settings → Agents → Skills with the reason, and the reason is in the daemon log too. Hooks are reserved for later capability support; a bundle's MCP servers are described under Bundled MCP servers. Bundles run no installation commands, fetch no dependencies and start no services. Install one by placing or symlinking its folder into a skillset directory; the Skills page lists it the next time it's shown.
Writing a skill #
1. 2.3.The YAML frontmatter needs a name and description. Names contain at most 64
lowercase letters, digits, hyphens, underscores or colons, and match the
skill's folder: one that doesn't is listed as unavailable, saying to rename
the folder or change name. The file may start with a byte-order mark, use Windows line
ends, and end at its closing ---. Names reserved by
built-in commands, such as compact, init and review, cannot be used.
Descriptions should say when to use the skill. Supporting paths are relative
to the skill's directory, which is supplied with the instructions.
$ARGUMENTS is replaced by the words after the command. A skill that doesn't
use it gets them after its instructions instead, as User arguments:.
${CLAUDE_SKILL_DIR} is also accepted as a reference to the skill's directory.
disable-model-invocation: true makes a skill user-only: it stays in the
slash menu, but is omitted from the automatic catalogue and refused by the
agent's loading tool. policy.allow_implicit_invocation: false in a skill's
agents/openai.yaml has the same effect. user-invocable: false hides the
slash command and leaves automatic selection available. Both controls can
be set to leave neither kind of invocation available.
Runtime-specific execution settings, including context, agent, model,
effort, hooks, allowed-tools, disallowed-tools, background, shell
and named arguments, are not executed by shared skills. Such a skill is
shown as unavailable with its reason. Dynamic shell expansion, a line that
starts with !` outside a code block, and positional $ARGUMENTS[N]
expansion are also unsupported. A !` further into a line doesn't make a
skill unavailable: it loads with those characters as plain text, and nothing
is run. Files larger than 64 KiB or
with invalid metadata are shown with their problem.
Hosted runtimes #
Native plugins are off by default for Claude Code and Codex. In
Settings → Agents → Native plugins, opt in separately with Allow
Claude Code plugins or Allow Codex plugins. These daemon options are
plugins.claude and plugins.codex (daemon.plugins.claude = true in Lua).
Changes take effect after a daemon restart or upgrade; an upgrade restarts
an agent whose plugin policy changed.
With native plugins off, Claude Code receives session-local marketplace and
directory-plugin restrictions, plugin syncing is off for the session, the
SDK skill allowlist is empty, and the native Skill tool is removed. Codex
receives child-only overrides disabling plugins, the native skills instruction
block and bundled system skills. The user's configuration files are not
edited. Native skill command entries identified by the adapters are filtered
from the slash menu in favour of shared skills. Built-in commands remain.
Opting in lets the runtime apply its own plugin and skill configuration alongside shared skills. A command the agent offers itself stays the agent's: a shared skill of the same name isn't offered as a slash command, though an agent can still load it. This also restores the native skill mechanism so a plugin's skills can work with its other components. The option permits native plugins; it does not install or enable any particular plugin.
These controls target the pinned local adapters. Claude's administrator-managed policy can take precedence over an embedding application's session policy; built-in runtime components remain the runtime's responsibility. Standalone provider hooks and MCP configurations are otherwise unchanged.
Other ACP agents receive the shared catalogue and tools too. Their native
skill discovery remains governed by their own runtime; ACP has no universal
switch for turning it off. Native instruction files such as AGENTS.md and
CLAUDE.md continue to belong to the hosted runtime.
Bundled MCP servers #
Skillsets and specialists can contain mcp.json beside their manifest. The
same bundle composition supplies their server definitions; each project or
bundled definition still needs explicit local review. Manage connections,
credentials and provider imports in MCP Servers.
Specialists
clackatoo / Reference
A specialist is a skillset with a runnable role: instructions, a name and
description, optional model and effort defaults, skills, invocation controls
and limits. It can be used in your own chat or by an agent delegating work.
explore, research, plan and general are built in; the
working-together reference
describes their defaults.
Use Explore for quick, narrow code lookups: locating a definition or answering a focused question with a brief file reference. Use Research for deeper codebase and architecture investigations: tracing behaviour across files and available repositories, explaining the evidence, citing inspected code and distinguishing confirmed findings from inference and open questions. Both are read-only. Explore chooses a lightweight model; Research inherits the selected model and effort when delegated to the same provider, and sets no model or effort override in your own chat. Neither provides access to repositories outside the chat's available tools and scope.
Built-ins use the same SPECIALIST.md format as custom roles and are
embedded in clackatoo. Inspect their instructions or make a custom copy in
Settings. A personal file can override a built-in by name; a project's file
can't, as a built-in's name promises what it does: explore changes nothing.
The read-only built-ins choose no shared skills (skills: []).
Creating and editing specialists #
Open Settings → Agents → Specialists, or click the cog beside
Specialists in the model selector. The page lists the specialists for the
project of the pane that was focused when Settings opened, and says which
under its title: yours first, each with where it's kept, then those built in.
Choose New specialist, or a, or Edit beside one of yours. A built-in
role offers Copy to change, which keeps its instructions and defaults in
a new file; a copy that keeps the built-in's name is used in its place, and
the form says so.
A specialist opens as a form, titled Specialists › name:
| Section | Holds |
|---|---|
| (first) | Its name, where it's kept, its description, when to use it, and Instructions |
| Runs as | Agent and Model, each picked from a list of what the daemon knows, and Effort |
| Limits | May do: Everything, No commands or Only read; and time, turn and cost limits |
| May use | Skills, Skillsets, MCP servers and Hands work to: each as the chat that starts it, none, or only those named |
| Started by | Whether you can start it, and whether agents can hand work to it |
A specialist's instructions are the body of its SPECIALIST.md, and aren't
edited in the form: Open its file opens the file in an editor beside your
work and closes Settings, as a skill's Open its file does. With changes
in the form, or for a new specialist, the button reads Save, then open its
file, and does both.
Nothing is saved until Save, or Ctrl+S. Typing on a field starts it, Enter finishes it and goes to the next, Tab goes from field to field, and Esc stops typing. A field with something wrong in it, such as a time limit that's no number, says so underneath as the keys leave it. With changes in the form, Esc, Cancel, the cog and a click off the panel ask before they're thrown away. While a save is with the daemon the form's button reads Saving…; a save from a form you've since cancelled doesn't hold up the next. What the form doesn't show of a file, such as a model for each agent, is saved as it was.
The form writes SPECIALIST.md files on the connected daemon's machine.
Choose Personal or This project for a new role. Existing files keep
their location, and their name. Built-in roles offer Copy to change, and
so do roles a skillset.toml defines, as saving one in place would put its
manifest out of use, and roles nested inside another bundle. A personal
folder that's a symlink, such as a ~/.agents kept with your dotfiles, is
saved through. A field left empty isn't written to the file. A file is at
most 64 KiB. Conflicting edits are refused and leave the form open.
Running chats keep their existing role; future selections use the saved file.
Choosing a specialist #
Before a new chat's first message, open the model selector. Choose a role in the Specialists column to the right of the model list. The specialist and model lists scroll independently; Tab moves between them. Model search and provider filters leave the specialist list visible. Once the conversation starts, the column shows the current role with New chats only, and its choices are read-only. Its instructions accompany the request and its defaults apply when the session opens. Selecting another specialist after a conversation has started is refused; open a new chat instead. The selected definition is stored with the chat. Later edits affect new selections, and do not silently change an existing chat's role. Its role survives daemon upgrades, saved-workspace restoration, compaction and moves between agents. If a stored definition can't be read back, after moving to an older clackatoo, the chat says so: its access limits still hold, and its choice of skills, MCP servers, delegation targets and budgets is gone.
With Tools on, an agent sees routing descriptions and can call start_chat
or start_chats with specialist = "reviewer". It can select a different
agent or model explicitly; specialist defaults are optional. Your own chat
keeps the agent you chose when selecting a specialist.
Defining a specialist #
A specialist is a folder containing SPECIALIST.md, with YAML frontmatter
for metadata and a Markdown body for instructions:
.agents/specialists/reviewer/
SPECIALIST.md
skills/check-change/SKILL.md
references/review-guide.md
The name must match its folder and use 1–64 lowercase letters, numbers,
hyphens or underscores. description is shown in the picker;
when_to_use provides routing guidance. Optional agent selects a default
provider for delegation. Model and effort accept a name or mapping by
provider; model: inherit keeps the parent's model.
Project files are discovered in .agents/specialists, from the chat's
working directory up to its project root, and nowhere above it. Personal
files are discovered in the clackatoo config's specialists folder and
~/.agents/specialists. The nearest project definition wins, followed by
clackatoo personal files, then home personal files and built-ins. Settings
creates project files at the repository root, or in the working directory
when there is no repository. The Specialists page reads its list each time
it's shown; a new chat picks up external file edits too.
A project's definitions are held to more than your own:
- They load only from a trusted folder, and are never read through a symlink.
- None replaces a built-in. A project's
explore,research,planorgeneralisn't loaded; give it another name. - None gets round one of yours. Where a project's specialist has the name
of one of your own, the project's is used, with the stricter access limit
and the lower
seconds,turnsandcost_usdof the two. Its other settings are the project's own: instructions, model, skills, MCP servers anddelegates_to. - These hold however the project's specialist is reached, a bundle of your own that includes a project's skillset included: what counts is the folder that defines it.
- One saved from Settings into a project that isn't trusted is written, and loads once the folder is trusted.
A specialist that can't be loaded isn't silently missing. It's listed under
Settings → Agents → Skills with the reason, and an agent that asks
start_chat for it is told the same reason instead of that there's none.
Specialists and plain skillsets use the same dependency resolver. A
SPECIALIST.md can also live inside a discovered skillset folder, and
relative includes can point to nested specialist folders. Existing
skillset.toml bundles with a [specialist] table remain readable; when
both entry points exist, SPECIALIST.md takes precedence. Lua specialist
and profile definitions are unsupported.
The included shared-checks skillset contributes its procedures. If an included bundle is a specialist, it registers another role and keeps its
instructions, defaults, limits and procedures separate. The same composition
works for specialist-in-specialist, specialist-in-skillset,
skillset-in-specialist and skillset-in-skillset. Dependency cycles and
conflicting identities in one dependency graph are errors; repeated shared
dependencies are deduplicated.
Skills and delegation #
skills names individual skills from the shared catalogue. skillsets can
name additional discovered bundles. With both omitted, a specialist inherits
the shared catalogue. Setting either selects its capabilities explicitly;
empty lists select none from that source. A bundle always retains its own
skills and skills contributed by its plain includes dependencies. Missing
named dependencies refuse connection rather than starting an incomplete
role. File reads run on the skills worker, including slash-command loads.
A scoped-out skill is absent from the command menu and automatic catalogue, and clackatoo refuses loading it through MCP or an explicit slash command. This controls instruction availability; it is not a filesystem permission boundary. An agent's ordinary file tools can still read accessible files.
user_invocable and agent_invocable default to true. Turn either off to
hide and refuse that invocation route. delegates_to is an optional list of
specialist names this role may start; an empty list disables delegation.
Other limits on subagent count, depth and scope still apply.
Limits and budgets #
limits accepts an access string (none, no-commands, read-only) or a
table with access and optional seconds, turns, cost_usd. Access
restrictions retain their existing
agent-specific enforcement.
A child inherits each parent ceiling, taking the lower value when it also
sets one. These are ceilings for each chat, not a shared family spending
pool.
seconds is a wall-clock limit on each request, including startup and time
waiting on tools or a question. clackatoo cancels the request when it expires
and marks its output as partial. Normal cancellation semantics apply; it is
not a process-kill sandbox. A new request gets a new clock. An upgrade carries
the active deadline rather than restarting it.
turns and cost_usd are held by the agent's own adapter, and only Claude
Code's does it, through its native maximum-turn and USD-budget options:
- Only the adapter clackatoo installs and starts itself counts. An agent started with your own command isn't taken to hold them, whatever it's called and whatever it says it is.
- It goes by the agent that's running. Changing an agent's command in the config doesn't change what the process already started holds; the next one started is judged afresh.
- Choosing them with any other agent fails, with a message naming the agents that hold them, rather than running without them. A provider change can't silently drop one.
- They're given when a session opens, and use the runtime's own accounting and stopping boundary; USD budgets can exceed the ceiling by the final model operation.
- They're request and runtime budgets, not a cumulative chat or workspace ledger.
seconds is clackatoo's own clock, so it holds with every agent, and runs
only while a request is being answered.
Custom tool and path permissions, memory, Action Prompts and execution location defaults remain separate future features.
Managed MCP servers #
A specialist can bundle mcp.json and select configured servers with
mcp_servers: [docs, search], or [] for none. Its source approval, the chat's
Tools setting and access limits still apply. See MCP servers
for discovery, bundle composition, credentials and permissions.
Another Machine
clackatoo / Reference
The window and the clackatoo command can use the daemon on another machine
instead of this one: your desktop from your laptop, or a server. The terminals
run there, and keep running when you disconnect.
The host is anything ssh accepts: a hostname, user@host, host:port, or a
name from your ~/.ssh/config, where keys and jump hosts belong.
These pages cover using another machine, each listed with its sections:
- Connecting to Another Machine: Picking a machine, Another machine's workspaces in your bar, Upgrading your daemon, Machines passed on, A pane on another machine, Forwarding ports, From your phone.
- How a Connection Works: How it connects, Moving onto UDP, Firewalls, What the other machine needs, The other machine's desktop, An image from this machine's clipboard, Options, When the other machine stops answering, When ssh's connection closes, When the connection drops, Bad networks, Logs, Two windows on one terminal, Typing over a slow connection.
- Compatibility between Builds: Protocol compatibility, A daemon from another build.
Connecting to Another Machine
clackatoo / Reference
You reach another machine's daemon with --remote or :connect, and can then
show its workspaces, open panes on it, and forward its ports.
Picking a machine #
clackatoo --connect-picker opens the window as a picker of the machine to
connect to, instead of connecting anywhere first. It lists:
- the last machines you've connected to, newest first;
- each
Hostin~/.ssh/config, and the files it includes, that names one machine: patterns with*,?or!, and everything underMatch, are left out; - Tailscale's peers that are online, if Tailscale is installed, by their MagicDNS name (or address, without MagicDNS). Phones are left out.
Type a few letters to narrow them, or a machine that isn't listed, such as
jack@server:2222, and Enter connects, as --remote would. If it
can't, the picker opens again saying why, so you can pick another. What's
typed is edited, and the machines moved through, with
the finder's keys.
Esc, Ctrl+C, Ctrl+;,
Shift+Esc or Ctrl+\ closes the
window.
Your app launcher offers this as "Connect to…" when you right-click clackatoo, along with the last three machines you connected to (see desktop).
In a window, :connect, or Ctrl+B r, opens the same
picker over your panes. Picking a machine opens a new window on it and leaves
this one as it is, and the keys that close the window above close only the
picker.
Each window remembers the machines it connects to, in clackatoo/remotes
under $XDG_STATE_HOME (~/.local/state), a line each, up to 20.
Another machine's workspaces in your bar #
:connect HOST has your daemon connect to the daemon on HOST, as --remote
does, and show HOST's workspaces in your bar beside your own. Windows, your
phone and scripts keep talking to your daemon, which passes what they ask on
to HOST and HOST's answers back. Terminals and chats there work as yours do:
keys, screens, history, copying, and searching. A new tab, a split, a rename
or a close in one of HOST's workspaces happens on HOST, as does a new pane
made from one of HOST's panes anywhere, which keeps them, so they carry on
while your laptop sleeps. Everything else in them works as your own does, on
HOST: editors, with undo, :w, :w NAME and :recover, their colors, git's
signs, what agents changed, and what HOST's language servers say; explorers
and folders' listings, whose :w moves and deletes HOST's files; reviews,
boards, and a chat's page. The finder searches the machine the focused pane is
on, so in one of HOST's workspaces it finds and greps HOST's files. HOST keeps
each file and makes every edit, so its own windows and agents edit a file
alongside you, and what you type while the connection is down is made once
it's back. A file cut in one machine's explorer can't be pasted in another's.
HOST needs this release of clackatoo or later for all of this; an older one's
editors and explorers say so in their panes, and its terminals and chats still
work.
After HOST restarts, as after a power cut, its terminals offer R to put what
they were running at the new shell's prompt, as they do on HOST (see
after a restart), and its
editors come back where they were. Esc dismisses an offer on HOST
and in every window, as typing into the terminal does. One dismissed while
HOST isn't connected never reaches HOST, so it comes back. A terminal HOST
keeps running says ↻ after its tab's name, and :keep marks one of HOST's
from here, on HOST, as it would there; a device on the web app can't, as it
can't mark your daemon's own. HOST's
background tabs are shown
in its workspaces, in the icon and the list, and sending a tab there, bringing
one back, dismissing one and :bg CMD all happen on HOST. Not shown here: the
offer of a pane HOST lends one of your own workspaces. Chats in HOST's
workspaces come back after HOST restarts, and go on with an interrupted turn
after HOST upgrades, as they do there; in one of HOST's panes, the
start page lists the sessions
HOST's agent kept, to go on with one on HOST.
Your daemon keeps the connection. It makes it again whenever it drops, and
again after your daemon restarts. :disconnect HOST ends it, as does
:disconnect alone in one of its workspaces. While HOST isn't connected, its
workspaces stay as they last were, each pane says so over its last screen, and
keys for its terminals are turned down rather than sent late; so are they, and
anything else asked of it, when HOST hasn't answered for a few seconds ("desk
isn't answering"). If ssh needs a password and no window is open to ask, the
connection waits until one is. In your config, client.connect("desk")
connects whenever a window opens.
What HOST's programs mark private (secret
regions) is masked in
your windows as in HOST's own: a password prompt there shows here, and zv
shows what's hidden, in that window alone. Your phone here shows what's
kept from agents, as it does HOST's own terminals, and agents here have both
masked.
:portforward 8080 in one of HOST's workspaces forwards this machine's port
8080 to HOST's, through your daemon's connection to it, which keeps listening
while the connection drops and is made again. :portforward there lists the
forwards and :portforward! 8080 stops one, as for a window on another
machine. A window that's itself on another machine than its daemon, such as
a --remote window, forwards a port of its own machine instead: it listens
there, as for its daemon's ports, and your daemon passes each connection on
to HOST through its connection to it, where HOST's daemon connects. While
your daemon isn't connected to HOST, each such connection is refused, saying
so, rather than wait; the port stays open. Your daemon needs this release or
later: an older one is never asked, as it would connect on its own machine.
Upgrading your daemon #
Upgrading your daemon keeps HOST's workspaces as they were, panes and layouts and all, those of machines passed on through HOST too, while its connections are made again. What you typed in HOST's editors that HOST had already taken isn't sent twice. Keys you typed into HOST's terminals that HOST hasn't answered yet hold the upgrade back; if HOST doesn't answer, the upgrade is refused, saying so, rather than send those keys again after it: keys for a terminal are never sent twice.
Only a daemon already on a release that keeps all this can hand it over, so the first upgrade onto one doesn't. Ports forwarded to HOST go on listening through the upgrade: connections open through them are reset, so a browser knows a page was cut short and asks again, and connections made while it upgrades go through once HOST is reached again. File operations still waiting for HOST are cut off.
Machines passed on #
Your daemon passes on the machines it's connected to. If your laptop is
connected to desk, and desk to a server, the laptop's bar has the server's
workspaces too, as notes@server: named after the machine they live on, never
the way there. Everything in them works as for a machine you connected to
yourself, through a connection of your laptop's own to the server, which desk
carries on.
Desk could read or change what it carries, so your laptop checks the server by its identity key: the one it met over ssh, or, for a server it has never reached itself, the one desk vouches for the first time, kept from then on (see who's genuine). A connection you asked for yourself goes through another machine only once it has met the server over ssh.
A machine reached several ways is shown once, by the shortest.
:connect server on the laptop as well has it go straight there, through desk
only while ssh can't get there, and back once it can, without its panes
noticing. Trying ssh again by itself never asks for a password, so a server
that wants one stays reached through desk, and the mouse over its workspace
says :connect server goes straight there: typed while it goes through desk,
that tries ssh straight there at once, asking your window ssh's questions, a
password included. Given it, the connection goes straight there without its
panes noticing, and the bar says so; turned down, or wrong, it carries on
through desk and the bar says why. Once a try you asked for has found that ssh
asks, your daemon stops trying ssh straight there by itself, which would only
fail a login there every half minute, until you ask again. Your daemon keeps
the connection as one you
asked for, so after it restarts it tries ssh straight there first, asking
again. clackatoo connect server does the same, waiting to say how it went.
:disconnect server
then leaves it reached through desk; one only desk passes on goes when desk
stops passing it on, or with :disconnect desk. Machines connected to each
other, or in a ring, each show the others once, and never themselves. The
mouse over such a workspace says the way, as on server, through desk.
:connect server --no-share keeps a machine, such as a server others share,
from the daemons connected to yours. It keeps the server's whole subtree too:
every machine the server passes on to your daemon, every machine your daemon
reaches only by a way through the server, and so on at any depth. A machine
you connected to yourself is its own, even if the server passes it on too, or
your daemon's way to it goes through the server. --no-share keeps the
server from the daemons connected to yours. It doesn't keep their traffic off
the server's wire, so such a machine is passed on as any other, without naming
the server in its way. A machine passed on both by the server and by a machine
you share is kept, unless you connected to it yourself. For the daemons
connected to yours, all these machines are treated the same way:
- Your daemon doesn't pass them on, refuses them a way through, and cuts any way already open.
- Your daemon tells them nothing of these machines: not their workspaces, chats, home folders, notices, ports, names or machine IDs. A pane of yours borrowed from one shows in their windows and phones as "Not shared — this pane is on a machine that isn't shared with you", on no machine and not saying what kind of pane it is. A clackatoo from before protocol 148 shows it as a pane that needs a newer clackatoo instead. A pane of yours lent to one isn't shown to them at all. They can't watch or end your daemon's connections, or list what it lends.
- Nothing they ask goes through your daemon to these machines: keys, a terminal's screen, files, the finder, the editor, forwarded ports, agents' sessions and chats, or new panes and workspaces there. This holds wherever the thing they name is shown: in the machine's own layout, in a pane of yours borrowed from it, in a pane of yours lent to it, or in another machine's layout.
- They can't close, restart or dismiss anything there either, even by way of your own layout. They can't close a pane borrowed from the server, or a tab or workspace holding one, and can't bring back or dismiss a background tab the server lends you.
Each refusal comes before anything else is done. It says only "that machine isn't shared with other machines", naming no machine. That something is refused rather than unknown does still say that something is there. Said of a machine already connected, or as what's kept changes, it also drops whatever those daemons were following there, and what they were waiting for from it.
Your own windows, scripts and phone still reach these machines as before. So
does the server's own daemon, if it connects to yours: what you lend it, and
what it passes on, are its own. That only holds once your daemon's own
connection to the server has proved, by the server's key, that it is that
machine. A daemon that merely says it's the server, or says it passes the
server on, gets nothing for it. A daemon counts as one connected to yours only
once it says it relays for
windows of its own, as every clackatoo since protocol 92 does before it's told
anything. A daemon older than that is treated as a window.
:connect server --share passes it on again, and the bar says when one goes.
Your daemon keeps this with its connections. Each machine needs this
release of clackatoo or later to pass machines on or be passed on.
A pane on another machine #
@host after a kind of pane opens it on that machine, wherever the workspace
is: :Terminal@desk opens a terminal on desk in a new tab of the workspace
you're in, :|Terminal@desk splits one in beside the focused pane, and
:Editor@desk notes.md, :Explore@desk and the rest work the same. @local,
or this machine's own name, is your daemon's machine. Without @, a new pane
goes on the machine of the pane it's made from, so splitting a pane on desk,
or opening a file or the finder from it, stays on desk.
In one of your own workspaces, desk lends your daemon the pane: desk keeps it,
as one of its own, in a workspace no window sees, and your workspace shows it.
Desk's own windows, its phone and its scripts can't see it or act on it,
unless desk connects to your laptop too; a third machine connected to both
shows it, and can type into it, but not close it, and reaches it only while
your laptop is connected to desk too. What you type runs there, and its files,
explorer and finder are desk's. A chat in it, and any chat its agent starts,
marks your workspace in the bar as your own chats do. Its tab ends @desk,
unless showhost is never. Your daemon keeps it with your workspaces, and
desk keeps what it shows, so it comes back after either restarts: a terminal
as a new shell in its folder on desk, as desk's own do. While desk can't be
reached, the pane says so over its last screen. Closing it closes it on desk,
at once or once desk is back; its program exiting on desk closes it here. Desk
needs this release of clackatoo or later; an older one says it's too old to
lend panes. :bg CMD beside such a pane starts the command on desk, in a
shell desk lends you as a background tab of your workspace (see
background tabs).
Desk never throws away what it lent on so little: a pane your daemon has
stopped showing, or a [No Name] with changes you closed, comes back as one
of desk's own workspaces, from-laptop, unless it's a shell running nothing.
On desk, clackatoo lent lists what it lent,
and clackatoo lent reclaim N takes one back; after 30 days without your
laptop, desk takes them all back. If desk restarts without a pane it lent, the
bar says so. An older clackatoo reading the workspaces kept shows a workspace
lent to another machine as one of its own, with no name, and a pane borrowed
from another machine as a new shell here.
It works the other way round too, even though desk can't reach your laptop:
:|Terminal@local in one of desk's workspaces splits in a terminal on your
laptop, and any pane made beside it is your laptop's as well. Desk's layout
keeps it; the terminal stays on your laptop, and what you type goes straight
to it, never to desk and back. Its tab ends @local. Desk's own windows, and
any machine that can't reach your laptop, show "a terminal on laptop, not
reachable from here" in its place; a machine connected to both shows it, and
so does desk once it's connected to your laptop.
While desk is away, such panes are parked in a workspace of your laptop's
named after it, from-desk, a tab each, so you can go on using them. Once
desk is back they're back where they were and that workspace goes; nothing is
moved or lost. :rename NAME there names it: it's called NAME whenever desk is
away from then on, after either daemon restarts too, and panes ever given back
from desk come back under that name. Closing from-desk closes them all; a new
pane beside one waits until it's back in desk's workspace. Closing one from your laptop closes
it on both. Closed on desk, a shell running nothing closes, and anything else
comes back as one of your laptop's own workspaces, from-desk; so does one
desk restarted without. Desk needs this release of clackatoo or later: an
older one says it's too old to show a pane from your machine.
An agent in a chat borrowed from desk opens what it shows you beside the chat, as one of your own does: a file, a terminal it runs a command in, or a subagent's chat from its card. Desk keeps each, lent to your laptop as the chat is, and your laptop shows it beside the chat; while your laptop's daemon isn't connected to desk, or runs a release before this one, the agent is told why it can't.
:workspace new@desk NAME makes a workspace on desk, as does
:workspace NAME@desk if desk has none of that name, and the + after your
workspaces asks which machine. It lives on desk, so it carries on while your
laptop sleeps, and desk's own windows have it too.
Forwarding ports #
A program on the other machine that listens on localhost, such as a dev
server, can't be reached from this machine's browser. :portforward passes a
port here to it, as ssh -L does, through the window's own connection, so it
rides out network changes as the window does.
| Command | Does |
|---|---|
:portforward 8080 | localhost:8080 here reaches localhost:8080 there. |
:portforward 3000:8080 | Port 3000 here reaches 8080 there. |
:portforward 3000:box:8080 | Port 3000 here reaches box:8080, as the other machine finds box; an IPv6 address goes in brackets, 3000:[::1]:8080. |
:portforward box:8080, :portforward [::1]:8080 | The same port here, to a machine the other one reaches. Brackets hold only IPv6 addresses. |
:portforward 0:8080 | Any free port here, which the bar names. |
:portforward | Lists the forwards, and how many connections each has open. |
:portforward! 8080 | Stops forwarding port 8080 here, cutting off its connections; :portforward! alone stops them all. |
- Only this machine can connect: the window listens on 127.0.0.1 and ::1, never the network.
- Websites in your browser could reach a forwarded port, as with
ssh -L: a page you visit can make the browser connect tolocalhost:PORT, and with DNS rebinding, under a name of its own. The forwarded server's own Host check is the defense, as dev servers such as Vite's have; one that answers any Host shouldn't be forwarded while you browse untrusted sites. localhostthere is 127.0.0.1, then ::1, as dev servers listen on either. Other names are looked up on the other machine, a few at a time, and one that doesn't answer gives up after 10 seconds without holding up others.- A forward passes on 32 connections at once, and a window 64 in all; more wait until one ends.
- What goes wrong is said once, not for every try, until a connection works again: a port in use here, suggesting a free one; nothing listening there; a name the other machine can't find; nothing answering within 10 seconds.
- Forwards last as long as the window. When the connection drops, or the daemon there is upgraded, connections through them are reset, so a browser knows a page was cut short; the ports here stay open, and connections made meanwhile go through once the window is back.
- A forwarded download sends after terminals' updates and keys, and only
as fast as the browser reads. On a slow link it also holds itself back so
the network's queue stays short: keys typed while it runs, even the first
after a pause, wait about 15 ms more, and the download still takes most of
the link. Uploads do the same, and a download and an upload at once each
keep to their own direction's speed, though keys might then wait about twice
as long. On a link that slows down whenever it's busy, as bad Wi-Fi can, a
forward goes more slowly than the link could carry.
:set noforwardpacelets forwards take the whole link instead, at the cost of keys waiting behind them. client.forward(8080)in the config forwards a port each time a window opens on another machine; a window on this machine passes it over without a word.- A background tab's ports show in the list of background tabs, and Ctrl+F there forwards them all, each to the same port here.
- A daemon older than protocol 82 doesn't forward ports, and the bar says how to update it. A window on this machine has nothing to forward.
From your phone #
From a phone, use the web app the daemon serves instead: see Your phone. It shows which machine each workspace, chat and terminal from another is on, with the same ring as the bar, though never what ssh said; it can't connect, disconnect or give ssh a password. The daemon would take an image pasted into a terminal from a phone as its path, within the limits of the photos it sends chats, but never onto the desktop's clipboard, which isn't the phone's; the web app doesn't offer it.
How a Connection Works
clackatoo / Reference
A connection starts over ssh and moves onto UDP, so it survives a change of network, and the window says what it's doing when the other machine stops answering.
How it connects #
--remote host runs ssh host clackatoo bridge. On the other machine, the
bridge starts the daemon if it isn't running, then passes everything between
ssh and the daemon.
Through it, the window or command first checks that the daemon speaks its version of the protocol, as it does on this one. Then the two talk over QUIC, a network protocol that runs several independent streams over one connection, carried inside the ssh connection.
ssh does the signing in, and it's how each end knows the other is genuine. The daemon only takes QUIC connections that come through ssh, and the window only trusts the certificate the daemon sent it through ssh. Anyone who can use the daemon could already sign in to that machine as you.
Each daemon also has an identity key, kept beside its machine's ID in
machine in clackatoo's state directory, and signs its QUIC certificate with
it, so a machine reached through another (see
machines passed on) can
be checked. The keys of the machines it has met are kept in known_machines
beside it: like ssh's known_hosts, it's readable only by you, and starting
afresh or keeping no workspaces never loses it. A machine met straight with
ssh is known by the key it showed; one only passed on, by the key the machine
passing it on vouches for, the first time. Through another machine, a
connection must show a certificate signed by the key kept, and one you asked
for must have met that machine straight first. A key that differs from the one
kept is refused, saying so in the bar: through another machine, only that way
is ruled out, and ssh straight there is still tried; straight over ssh, the
connection stops until
clackatoo forget HOST, which only this
machine's own windows and commands can run. Only a machine's own key puts a
connection in that machine's place. A daemon reached straight must sign its
certificate as the machine it says it is, and stay that machine: one that
later says it's another, or doesn't sign though its clackatoo does, is
stopped, and what it said is never taken. A connection reaches the machine it
reached before: if HOST comes back as another machine, as after its state
directory was wiped, it's stopped until you :connect HOST again, or
clackatoo forget HOST, either of which takes whatever is there now. One that
says it's a machine passed on to yours, which yours doesn't know by its key
yet, must sign with the key the machines passing it on vouch for. A daemon too
old to sign, before protocol 95 (2026.10.60), is taken as the machine it says
only while no machine of that ID is known here by its key, passed on, expected
by a connection you asked for, or connected to your daemon itself by another
name than HOST (two such daemons connected both ways take each other, by the
same name, whichever connects first; by another name, update clackatoo on
HOST); and a connection you asked for that proves it's that machine, by a key
it met straight or as you :connect it, takes its place later. So a machine
known by its key that goes back to a clackatoo that old is refused until it's
updated, or until clackatoo forget HOST, with the name you connected to it
by. A daemon passing machines on can have yours learn only so many new keys an
hour, and the keys of machines connected to, passed on or kept are never
forgotten to make room for others.
Each terminal's screen updates come on a QUIC stream of their own, apart from everything else, so a lost packet holds up only the terminal it belonged to.
Moving onto UDP #
Once connected, the window or command tries reaching the daemon straight over UDP, at the address ssh reached that machine at. If that works, the connection moves there, out of ssh:
- It survives your network changing, such as moving from home Wi-Fi to a phone's hotspot, or a short sleep. ssh's connection dies when that happens; the QUIC connection carries on from the new network, and the window doesn't notice.
- Keys come back a little faster, with ssh out of the way.
It finds out with a few probes, small datagrams the daemon sends straight back, while the connection carries on inside ssh, so nothing waits on the attempt. If none comes back within two seconds, as when a firewall blocks UDP, the connection stays inside ssh, and tries UDP again 15 seconds later. If UDP stops getting through later, the connection goes back into ssh after about 20 seconds, if ssh's connection is still up, longer than ssh takes to give up on a network that's gone, and tries UDP again 15 seconds after.
clackatoo ping --remote host says which way
each round went: (over UDP) or (through ssh).
The daemon takes UDP on the first free port from 60000 to 61000, the same range as mosh, when the first connection through ssh arrives. It never takes a new connection over UDP, only packets for connections already set up through ssh. Probes carry a key the daemon only gives out through ssh, and it answers nothing else, so the port gives nothing away to a scan.
Firewalls #
A firewall on the other machine has to let UDP in on those ports. If it
already does for mosh, there's nothing to do. Otherwise, with ufw:
or with firewalld:
&&
To use other ports, or none, set CLACKATOO_UDP_PORTS for the daemon on the
other machine: a port, a range such as 60100-60200, or off to keep every
connection inside ssh. The daemon reads it when it starts, and one started by
--remote gets it from the remote command:
Through a jump host (ProxyJump), ssh reached the other machine at an address
on its own network, which you usually can't reach directly, so the connection
stays inside ssh.
What the other machine needs #
-
clackatoo of the same release, or one a release or so apart (see Protocol compatibility). A daemon further apart speaks another protocol, which the window offers to replace.
-
clackatoo on the PATH ssh's commands get. That is often shorter than an interactive shell's, and might leave out
~/.cargo/binor~/.local/bin. If it isn't there, the error is the remote shell's "command not found".--remote-commandnames it instead:The command is run by the remote shell, so it can be any command line that ends by running clackatoo, such as
env XDG_RUNTIME_DIR=/tmp/ck clackatoo. SettingCLACKATOO_REMOTE_COMMANDsaves typing it each time. -
A way to sign in. A key loaded into
ssh-agentsigns in without asking anything. Otherwise, the window asks for ssh's password, or the key's passphrase, itself, in place of the terminal, and asks again on every reconnect. It also asks whether to trust a host ssh hasn't seen before. What you type is hidden, but for that question: what a server asks as you sign in is in its own words, so it's hidden whatever it says. Theclackatoocommand leaves ssh to ask on the terminal it runs in. -
On a server nobody is signed in to: systemd removes your runtime directory (
/run/user/<uid>) when your last session ends, taking the daemon's socket with it. The daemon keeps running, but the next connection can't find it and starts another. Run this once on the server so your runtime directory stays:
The other machine's desktop #
A daemon --remote starts on your desktop starts before you've signed in to
the desktop itself, over ssh, with no WAYLAND_DISPLAY of its own. Programs
it starts still open their windows on the desktop once you sign in there: the
daemon follows the display your desktop tells systemd as you sign in, and
gives it to the terminals, agents and language servers it starts from then on,
and shells already open take it before the next command they run (bash at its
next prompt). Once you sign out and the desktop's socket has gone, what starts
after that doesn't get its display. ssh desk clackatoo display says what
programs on desk get now. See
the desktop's display.
An image from this machine's clipboard #
Ctrl+Shift+Alt+V in a terminal on
another machine pastes the image on this machine's clipboard there: it goes to
that machine's daemon, through any machine between, which keeps it in its own
~/.cache/clackatoo/pastes/ and pastes its path, there, for a program such as
Claude Code to read. So a screenshot taken on your laptop goes into Claude
Code running on your desktop. With pasteimage=clipboard, it's put on the
desktop's own clipboard instead, which needs you signed in there (see
the other machine's desktop). Each machine on
the way needs a clackatoo that knows how; the bottom bar says which to update
if one doesn't. See
pasting an image.
Options #
| Option | Environment variable | |
|---|---|---|
--remote <HOST> | Use the daemon on HOST: host, user@host, host:port, or a name from your ssh config. | |
--connect-picker | Pick the machine in the window first (see Picking a machine). | |
--remote-command <COMMAND> | CLACKATOO_REMOTE_COMMAND | The command that runs clackatoo on the other machine. Default: clackatoo. |
CLACKATOO_SSH | The program run as ssh. Default: ssh. It is given ssh's options, then --, the host and the command. |
clackatoo passes ssh a few options of its own:
-T: no terminal on the other end; the bridge doesn't want one.-a,-x, andClearAllForwardings=yes: nothing forwarded, whatever your ssh config says. A daemon the bridge starts on the other machine would otherwise hand your ssh agent, or your X display, to every terminal, agent and language server it runs there, for as long as the connection lasts. What clackatoo forwards goes over its own connection.ConnectTimeout=10: an unreachable host fails after 10 seconds.ServerAliveInterval=5andServerAliveCountMax=3: a connection that has died, such as when the laptop sleeps or changes network, is noticed within 15 seconds. A connection that has moved onto UDP carries on without it.
When the other machine stops answering #
If what the window sends goes unanswered for about five seconds, a red notice
at the right of the top bar says so: No contact with desktop for 12 s,
counting from when it was sent. The window stays as it was. Editors carry on:
what you type in them is kept and goes when the other machine answers again,
landing exactly as it would have. Keys for terminals and everything else
aren't sent late: once what was sent has gone unanswered for three seconds,
the bar says not connected: keys aren't sent, and the pane flashes. The
notice goes as soon as the other machine answers again.
An idle window notices within about 15 seconds, at its next keep-alive.
When ssh's connection closes #
The window opens a new ssh connection in the background, and the same connection carries on through it: nothing is redrawn and nothing is lost. It tries again after 1, 2, 4… up to 30 seconds. Over UDP, typing carries on meanwhile.
When the connection drops #
A connection ends only when the daemon stops, is upgraded or restarts, which tells the window at once, or after two minutes without hearing from the other end. An idle window sends a few bytes every 10 seconds, which keeps it, and your router's memory of it, alive.
The window then connects again by itself. The panes stay as they were, the top
bar says
Reconnecting to desktop (12 s): the daemon is upgrading to a new build, and
it tries again after 1, 2, 4… up to 30 seconds; a connection that drops again
within 10 seconds counts as a failed try. Enter and Esc
are only offered when the first connection fails.
What you typed in an editor and the daemon hadn't yet taken is kept, and goes
again when the window reconnects, catching up with what others changed
meanwhile as if it had all happened live. A file renamed meanwhile keeps its
new name. If the daemon restarted rather than upgraded, and the file is as it
was, your changes go again as they were, and the bar says
reconnected; your unsaved changes to X were kept. If the file changed
meanwhile, the editor keeps your text and :w refuses: :w! writes your
window's text over the file, and :e! takes the daemon's.
Nothing on the other machine stops when the connection drops: the terminals carry on, and output that arrives meanwhile is there when you reconnect.
Bad networks #
Every packet is 1200 bytes at most, which fits tunnels such as Tailscale's (1280). On a network losing packets, small ones (keys, their echoes, acknowledgements) are sent twice. After an outage, the window sends from a new UDP port, so the other machine picks up at once rather than waiting out QUIC's growing timers. A window that falls more than 8 MB behind is dropped and reconnects.
Typing over a slow connection #
Every key goes to the other machine and back before the program's echo shows. So, as mosh does, the window guesses what most keys will show and draws it at once, underlined, until the daemon's screen shows the echo. It guesses printable characters, Backspace, and Left and Right within what you've typed on the line.
It only draws a key you typed at a shell prompt with nothing still running, as
shell integration marks it: never for full-screen programs, programs using the
mouse, a hidden cursor, or in normal mode, and never for keys typed while a
command runs, so a password typed ahead for sudo, or at any prompt a program
shows, is never drawn. A shell that doesn't mark its commands, such as bash
before 4.4, gets no guesses. A wrong guess vanishes, and guessing waits for
the program to echo again. The predictecho option turns this on or off.
clackatoo ping --remote host measures it:
how long the daemon takes to answer, and how long a key takes to come back
from a program. clackatoo's own share is small. To the same machine, where the
network costs next to nothing, a key comes back in about a fifth of a
millisecond over UDP, and a third through ssh, so nearly all of anything above
that is the network.
Two windows on one terminal #
A terminal has one size, so when windows of different sizes show the same terminal, such as your laptop's and your desktop's, they take turns: the terminal takes the size of whichever window last opened on it, was resized or was focused.
Logs #
Lines carry UTC timestamps, and say why each connection closed and which way
it was going. The daemon logs to daemon.log in its runtime directory;
windows log to ~/.local/state/clackatoo/window.log, moved aside past 8 MB.
clackatoo ping --remote host --soak keeps a connection open, logging each
echo and every drop with its reason.
Compatibility between Builds
clackatoo / Reference
A window and a daemon from different builds of clackatoo still talk, at the older of their two protocols.
Protocol compatibility #
A window and a daemon from different releases still work together, as long as they're no more than a release or so apart: your laptop's window carries on when your desktop's daemon is updated first, and the other way round.
When a window connects, each side says which version of the protocol it speaks, and the connection runs at the older of the two. The newer side sends only what the older one can read: what's newer is left out, or turned into something the older one has.
- A pane of a kind the window doesn't have shows "This pane needs a newer clackatoo", naming the kind. The rest of the window works as usual.
- Something the window offers that the daemon doesn't have is refused,
saying the daemon needs a newer clackatoo, which release it is, and how to
update it:
clackatoo updateon the other machine, orclackatoo upgradefor this machine's daemon. - A message the window can't read is passed over. If it changed a terminal's screen or a file being edited, the window asks the daemon for them afresh, and an editor's unsaved changes are kept and sent again, as after a lost connection. If that keeps happening, it stops asking after five times a minute and says to update.
Each release sets how far apart they can be, in two parts: the oldest window its daemon talks to, and the oldest daemon its window talks to. Further apart than that, the window says the daemon is from another build, as below.
The first release that does this, 2026.10.11 (protocol 73), takes windows from the release before it, 2026.10.10, but needs a daemon of at least its own: a daemon older than that can't say it agrees to an older version, so a window treats it as from another build.
A daemon from another build #
If the daemon on the other machine speaks another version of the protocol, the window says so, as it does on this machine.
- An older daemon there: Enter replaces it using the clackatoo installed there: it upgrades it if it can, keeping its terminals, or else stops it, closing them. If that clackatoo is itself from another build, the window says to update it.
- A newer daemon there: Enter updates this machine's clackatoo
to the latest release, as
clackatoo updatedoes, and the window opens again as the new build, connected to the same machine. This machine's own daemon moves onto the new build too, keeping its terminals, and its other windows ask to open again. If the daemon there is from a build newer than any release, there's nothing to update to, and the window says so: use a window from the daemon's build, or move that daemon onto a release. Esc quits, or goes back to the picker if you picked the machine there.
The clackatoo command doesn't replace anything. On the other machine,
clackatoo upgrade upgrades its daemon, and clackatoo stop stops it.
If the daemon speaks the same protocol but is another release of clackatoo,
the window connects as usual and says in the bar which side is older. When
it's the other machine, :update HOST opens a tab there running
clackatoo update, which installs the latest release and moves that daemon
onto it; the window reconnects as it does after any upgrade. When it's this
machine, :update updates it, and the window needs opening again.
MCP Servers
clackatoo / Reference
Open Settings → Agents → MCP Servers to add, edit, disable or remove a server on the connected daemon's machine. Choose a local command over stdio or a Streamable HTTP URL. Commands receive literal arguments, without shell expansion. HTTP requires HTTPS, except for loopback development servers.
The page lists the servers for the project of the pane that was focused when
Settings opened, and says which under its title: Servers chats can use, for ~/notes on desk. Each row says where the server is from, what it runs or
where it is, and how it's connected: Needs review, Not in use,
Connecting…, Connected, Needs sign in, Failed, Ready or
Off. Enter or Open opens a server; Add a server, or
a, starts a new one. The list is read when the page is shown, after
anything done on it, when a lost connection comes back, and every two seconds
while the page is shown, so there is nothing to refresh by hand. A server that failed,
or needs a sign-in, keeps saying why until it next connects. Network, login
and process work runs outside the daemon's event loop.
A server opens as a form, titled MCP Servers › name:
| Section | Holds |
|---|---|
| Connection | How it's connected, and what can be done about it as it is now: Review and enable, Test, Reconnect, Sign in, Finish a sign in from another machine and Forget the sign in. Only those that apply are shown: a command has no sign in |
| Server | Its fields. A command has Command, Arguments and Environment; an address has Address, Headers and Sign in with a browser, which adds Client ID and Scopes. Then Enabled, Read-only server, Give up connecting after and Give up on a tool call after |
| Tools | The tools from its last connection or test |
| Remove | Remove, pressed twice, for a server that's yours to remove |
Test initializes the server, as it's saved, and lists its tools without calling them; with changes in the form it waits for them to be saved. One test holds up nothing else on the page. A successful test closes its temporary connection; Ready means the test passed, and Connected means a chat has a live connection. A server saved as something else, somewhere else, while its form has changes says so, and saving the form is then refused rather than saving over it. What an action came to is said along the foot, and stays there until the next one; what went wrong is said in full under the title.
Nothing in a form is saved until Save, or Ctrl+S. Typing on a field starts it, Enter finishes it and goes to the next, Tab and Shift+Tab go from field to field, and Esc stops typing. A field with something wrong in it says so underneath as the keys leave it. Arguments are written with blanks between them, and quotes round one that has a blank in it; environment and headers are written as JSON. With changes in the form, Esc, Cancel, the cog and a click off the panel ask before they're thrown away, and Finish a sign in counts the changes in the server's form under it. Concurrent edits are refused without overwriting the newer definition.
Configuration files #
Personal servers live in mcp.json in clackatoo's configuration directory
(~/.config/clackatoo/mcp.json by default). ~/.agents/mcp.json is also read.
Project files are .agents/mcp.json, searched from the chat's working
directory up to the repository boundary, in folders that are yours. The
nearest project definition wins, then personal configuration, then bundled
definitions, with two rules for a project's definition that has the name of
one of your own servers:
- Until you've reviewed and enabled it, chats there go on getting your
own. A file in a project can't switch one of your servers off by naming
it. Settings lists the project's beside yours as needing review, saying it
will take yours' place once enabled. The two rows are told apart by where
they're kept. Yours opens as any server does; the project's opens as
This project's name, showing its definition without fields to change, with Review and enable as the one thing to do. A sign in is to the one chats use, so only your own row has the button. - Once enabled, the project's is the one chats there get. Settings says so as it's enabled, and again if you save your own while the project's is in its place. Removing your own says which is still listed, and whether chats use it.
Closing Settings while a sign in is being opened doesn't lose it: the browser opens on its address when the daemon answers.
An invalid shadowing entry stays invalid rather than enabling a lower-priority server.
A file that can't be read, as one caught half written, costs a chat only the servers defined in it. The chat says which file, the rest start as usual, and a connection already using one of that file's servers keeps the definition it has.
Timeouts #
| Setting | Default | Range | Applies to |
|---|---|---|---|
timeout_seconds | 30 | 1 to 600 | Connecting, initialize, and every request that isn't a call, such as listing tools. |
call_timeout_seconds | 600 | 1 to 86400 | Each tool call, and any other request that needs approval, such as reading a resource. |
A call's time starts when it's sent to the server, after any approval, and
starts again each time the server reports progress on it. A call that runs
out is cancelled at the server and fails with an error naming the setting; it
may still have taken effect. initialize is never cancelled: a server that
doesn't answer it in time is connected to again instead.
A server's form in Settings shows timeout_seconds as Give up connecting
after and call_timeout_seconds as Give up on a tool call after, each
in seconds. Saving the form saves both as it shows them.
Project and bundled commands need an explicit review of their exact definition before they start. Review and enable approves that revision on this machine; changing it requires another review. Saving a project definition through Settings also approves the saved revision. A bundled definition is customized by copying it into personal configuration; its package stays intact. Duplicate names in different bundles require unique names or a personal override. Removing an override may reveal a lower-priority definition.
New sessions receive the current enabled selection. Direct file edits are
picked up on the next catalogue refresh: show the MCP Servers page for that
project, open a new chat, or call list_skills. They are not watched
continuously in this version. At that refresh a chat's live connection to an edited
server connects again with the new definition, as it does when you save from
Settings.
Connections #
Each chat reaches each of its servers through a proxy process of its own, which the agent starts as an ordinary MCP server. The proxy stays up for the life of the agent's session, whatever happens on either side of it:
| What happens | What the agent sees |
|---|---|
| The server crashes, or its connection drops | Calls in flight fail with an error saying their outcome is unknown. The proxy connects again, waiting half a second at first and up to 30 seconds between tries, sends the server the agent's initialize again, and tells the agent its tool list changed. |
| The server needs a sign-in | The proxy answers initialize itself and lists no tools. Calls fail with an error asking for a sign-in. Once you sign in it connects and tells the agent its tool list changed. |
| The server can't be started or reached | As for a sign-in, with the reason; the proxy keeps trying. |
| You save a change to the definition, choose Reconnect, or change a credential it uses | Calls waiting or in flight fail with an error, and the same proxy connects again with the new definition. |
| The daemon restarts or upgrades | Calls are refused with an error saying to try again, since they can't be checked. Everything else carries on, and the server's connection is untouched. The proxy gives up only after two minutes without the daemon. |
| The daemon is there but doesn't answer | A call waits up to 30 seconds for the daemon to take it, then fails with the same error. |
| An answer is over 4 MiB | That call fails with an error giving the size. |
| A command server writes a line over 32 MiB | The line can't be read, so its connection is given up: calls in flight fail with that reason, and the proxy connects again. |
| A command server writes a line that isn't a JSON message | The line is passed over. The first on each connection is logged, and shown as the server's detail in Settings for as long as that connection lasts; it's given as the reason if the server then fails to initialize. A command server must write one message a line, and nothing else, on its standard output. |
An HTTP server answers 401 to an Authorization header from its definition | The server shows as an error naming that header. No sign-in is offered, since none would help. |
A proxy ends only when:
- the agent closes it, or its session with the chat ends;
- the chat closes;
- the daemon stays away for two minutes;
- the chat loses the server: you remove or disable it, change a project or bundled definition without reviewing it, turn the chat's Tools off, or pick a specialist that doesn't have it;
- the agent starts a second proxy for the same server, which takes over at once;
- it couldn't start: the chat already has 32 proxies, or its servers couldn't be read for a minute.
Reconnect starts the server's connections again without testing it first, so a server that holds a lock or a port is never started twice. No call is sent a second time. Interrupted or timed-out calls may already have had effects; check their outcome before retrying. Pending approvals don't cross a daemon upgrade: those calls fail with an error saying to try again. A Settings action an upgrade or a lost connection interrupts says so, for you to check the list before trying it again.
The daemon's log records each proxy opening and closing, every refusal, reconnection and change of state, and each approval asked and answered, with the chat, the server and the reason.
Credentials and browser login #
Use Private credential, under the list, to save a value under a local
name, then reference
it with {"secret":"name"} in an environment variable or HTTP header.
Changing a credential reconnects the servers that reference it, and no others.
For an Authorization header, store the complete value, including Bearer
when needed. {"env":"VARIABLE"} reads a variable from the daemon's
environment. Plain strings are for nonsecret configuration. Do not put secrets
in command arguments or URLs.
Credentials and browser tokens are stored separately under mcp-private/ in
the personal configuration directory, with owner-only directory and file
permissions. They are never copied into project files. Credential fields are
masked in Settings. Known stored credential values are removed from retained
connection diagnostics. Local commands receive a minimal environment plus
their configured variables, and never receive the proxy's Clackatoo session
token. They still run as your user; this is not an operating-system sandbox.
For OAuth servers, turn on Sign in with a browser, optionally set a public client ID and scopes, save, then choose Sign in in the server's form. The flow discovers server metadata and uses PKCE, state validation and a loopback callback. Tokens refresh through the SDK and are bound to this server's configuration source and OAuth client. Forget the sign in, pressed twice, cancels sign-in and revokes its local credential generation, preventing a late callback or refresh from restoring forgotten credentials. It does not revoke tokens at the remote service.
A server that needs a login has a gold Sign in button on its row of the
server list, before Open: a click, or Enter with the keys on
it (h and l move between a row's buttons, which start on Open),
starts the same sign-in. The
row says Signing in… while the browser is open, then Signed in, or
why it failed, with Sign in to try again. When a chat's agent can't use a
managed server because it needs a login, whichever agent it is, the chat
shows an MCP sign in shelf above its box with the same button and the
same states, in every window showing the chat. Signing in connects the
server for every chat waiting on it, with no need to reopen them. Only an
HTTP server can ask for a sign-in; a command that fails for want of
credentials shows as an error, with what it wrote. Only the user signs in: an agent with access to
the window, a phone and the web are refused, as they are for the rest of MCP
Servers.
For a remote daemon, complete sign-in in your local browser. If the final localhost redirect cannot reach the daemon, copy the complete callback URL from the browser's address bar into Finish a sign in from another machine, in the server's form while it's signing in. That field is masked. A login expires after five minutes. Confidential-client secrets and legacy HTTP+SSE endpoints are not supported.
Tools and permissions #
Every server keeps its own identity as managed_<name>; clackatoo's built-in
tools remain separate. Tools: Off and side questions receive no managed
servers. With Tools: Allow, calls go straight to the server. With
Tools: Ask, each call asks first:
| Answer | Effect |
|---|---|
| Allow | This call goes ahead. |
| Always allow this server | This call goes ahead, with any other calls to this server already waiting for an answer, and the chat stops asking about this server. Other servers, and the built-in tools, still ask. |
| Reject | The call fails, and the agent is told you refused it. |
Always allow this server belongs to the chat, whichever agent or branch it's on, and to the server as it's defined now. A server defined otherwise under the same name asks again: after any change to its definition, or when a project's definition takes over from a personal one. A copy of the chat starts with no servers allowed, and so does a chat that comes back with its workspace after the daemon restarts; an upgrade keeps them. Setting the chat's Tools again, to any value, takes back every server allowed this way.
Under clackatoo's rules the rules decide instead. A managed
call is named managed_<name>/<tool> there, and only rules on that name
apply: a rule on the agent's own name for the tool, such as
claude/mcp__managed_docs__search, never does. A call no rule covers asks
with Allow and Reject only.
The question waits for as long as you take, as the built-in tools' questions do. It's taken back, and the call fails with the reason, when the agent cancels the call, you stop the turn, the server is reconnected, or the chat loses the server. The agent is told you refused only when you chose Reject. Parameters over 64 KiB can't be shown, so a call that large fails rather than ask; allow the server for the chat to send it. Calls over 256 KiB are always refused.
Claude Code and Codex may ask about the same call themselves, in a mode where they ask before using tools. You're asked once, by whichever of the two decides:
| The chat | The agent asks before tools | The agent doesn't ask |
|---|---|---|
| Tools: Ask | Clackatoo asks, unless you allowed the server. The agent's question is answered for you. | Clackatoo asks, unless you allowed the server. |
| Tools: Allow | The agent asks, with its own choices. | Nothing asks: the agent's mode allows it. |
| clackatoo's rules | The rules decide, and ask where no rule covers the call. The agent's question is answered for you. | The rules decide. |
Clackatoo answers the agent's question only for a server its own proxy is serving the chat, going by what the agent's adapter says of the call, never by the call's input. A server of the same name from the agent's own configuration, and any other agent's questions, are asked about as ever.
A specialist with read-only or no-command limits receives only servers you explicitly mark Read-only server. This is your classification of the whole server, independent of server-supplied tool annotations; it does not inspect or sandbox each tool's implementation. Classify only servers you trust to honour that boundary. Calls still follow the chat's Tools setting.
Skillsets and specialists #
A skillset or specialist can include mcp.json beside its manifest. Ordinary
skillset servers join the project's catalogue; a server belonging only to a
specialist becomes available when that specialist is selected. Bundles still
require local review before execution.
Use mcp_servers: [docs, local-search] in SPECIALIST.md frontmatter to select
specific configured names, or mcp_servers: [] for none. With no explicit
selection, a specialist inherits shared personal/project servers and servers
from its selected skillsets and included bundles. Selection and source review
both apply; a specialist never approves a project command for you.
Provider configuration #
Whether agents also use the servers set up in their own settings is on Settings → Agents → Agents, under Servers from the agent's own configuration, beside the native plugins. Let agents use their own MCP servers is off by default. Claude Code's own servers and Codex's own servers each choose As above, which follows that switch, Never or Always. Like the native plugin policy, changes take effect after a daemon restart or upgrade.
The bundled Claude adapter uses strict MCP configuration. The bundled Codex adapter disables servers from its native configuration layers before adding Clackatoo's selection, and disables its app connector feature in managed-only sessions. Older unverified Claude/Codex adapters are refused in managed-only mode. Where clackatoo can install the bundled adapter, the chat offers it, with an Install button, and a chat already running an older one starts again on the bundled adapter once it's there; otherwise the chat says to let clackatoo run its own adapter or to allow native MCP. Other custom adapters receive the managed selection, but their native MCP suppression is not verified; the chat warns about this limitation. Native plugin controls remain a separate setting.
Copy servers from Claude Code and Copy servers from Codex, under the list, first show the agent's own servers. Pick each server to copy into personal configuration, then Copy. Existing names are never overwritten. Transport credentials move to private references, and provider files remain untouched. Imports refuse tool-filter or permission settings they cannot preserve. Review those entries manually instead.
The native Settings page manages servers for the project it names under its title, on its connected daemon. The phone uses those servers through its chats; it cannot edit their configuration or credentials.
Your Phone
clackatoo / Reference
The daemon can serve a web app: your chats by workspace, with those that need you first, and each chat as a window shows it, with its questions, the message box, Stop, the model, mode and effort menus, how much context it fills, and the cards of the chats its agent started. A phone can answer anything a window can, tool approvals included. And your terminals, to read and type into.
Turning it on #
It's off until the daemon's config,
~/.config/clackatoo/daemon/init.lua, says otherwise. The daemon reads it when
it starts or upgrades (clackatoo upgrade). A name that isn't a setting, or a
value one can't hold, is a mistake in the config, which keeps what it last ran
and says so in a window's bar. Every setting is listed with
the daemon's options.
daemon.. = "tailscale" -- or "public", or "off"
daemon.. = "you@github" -- tailscale: who's let in
daemon.. = "https://desktop.example.ts.net"
daemon.. = 90 -- unpair devices unused this long
daemon.. = 0 -- ask for the password again after this many days
daemon.. = true -- devices may ask a window to let them in
daemon.. = 50 -- wrong passwords in a row before password pairing locks (1 to 10000)
Before, these were set in daemon/web.toml, which the daemon moved into
daemon/settings.lua the first time it started with the Luau config.
Through Tailscale #
The daemon listens on a socket only you can open,
~/.local/share/clackatoo/web/web.sock, or where daemon.web.socket says. Give it to
your tailnet over HTTPS with
and open https://<machine>.<tailnet>.ts.net. A request must come through
tailscale serve, carrying Tailscale's Tailscale-User-Login, and that name
must be daemon.web.login. Without it set, only a window can let the first device
in. The socket keeps other users of the machine out, but not your own
programs: what lets a device in is the token it's given when it pairs.
Connections are counted by the device sending each request, by its whole
tailnet address (IPv6 too), as tailscale serve says: each can have eight
open at once, and its password tries and asks to pair are its own. At most
sixteen connections can wait to say whom they're from; past that, the oldest
is closed. Past 64 in all, room is made as from the network (below).
Straight from the network #
daemon.. = "public"
daemon.. = "0.0.0.0"
daemon.. = 8765
daemon.. = "/path/fullchain.pem"
daemon.. = "/path/privkey.pem"
daemon.. = "https://example.com:8765"
This needs a password and daemon.web.origin, and daemon.web.ask is off
unless you turn it on. Without the certificate, key or origin, the config
goes wrong; without the password, the web app stays off, and the first
window you're at says why.
clackatoo doesn't get certificates by ACME, so you bring your own; it's read
again when its files change. Prefer an ECDSA key, as certbot, acme.sh, and
tailscale cert make by default: each new connection's TLS handshake is
worked out by the daemon itself, and with an RSA key one costs about ten times
as much.
Anyone on the network can open connections, so the daemon limits them. One address can open twenty in a burst, then five a second, and keep eight open at once; IPv6 addresses count by their /64. At most 64 are open in all, and connections that haven't shown a paired device's token can hold only 56 of them: the rest are kept for addresses a paired device's token came from in the last hour. When room is wanted, the one open longest of those that haven't shown a token is closed, whatever it's doing; one that has is never closed while any that hasn't is open. So however many connections others open, from however many addresses, a paired device gets in from where it was last used within the hour. From anywhere else, its new connection is a stranger's until its first request shows its token: it gets in, but a flood of new connections can close it before then. Only when every connection has shown one can a device's connection close another device's: one open over a second, waiting on nothing, and idle or reading what it was sent slower than 4 KiB a second for three seconds. Only four handshakes are worked on in each turn of the daemon's loop, the rest waiting, in order, for the next, so a flood of them slows new connections, not your terminals. Connections a device's app keeps open to follow your chats don't count.
Pairing a device #
A device pairs once:
- with the password, which
clackatoo web passwordsets. Only its Argon2id hash is kept, inweb-passwordin clackatoo's state directory (~/.local/state/clackatoo), which only you can read: never in the config, which people keep in git. Tries are limited to five at once, then one a minute, from each address (IPv6 by /64 from the network, and by the whole address through Tailscale), and to about twenty a minute from everywhere together. Afterlock_afterwrong passwords in a row (50 unless set), password pairing locks, and stays locked after a restart, until:devices unlockorclackatoo devices unlock; every window's bar says so. Anyone who can reach the app can lock it this way, in about a minute and a half, and in public mode keep it locked; devices already paired keep working, and a window can still allow one by its code. - by asking a window. The phone shows a code, and every window's bar says
a device asks. Type
:devices allow CODEto let it in, or:devices deny. The window never shows the code, so only someone holding the phone can let it in. At most four devices ask at once, each address four times in two minutes, so whoever can reach the app can fill your bar with asks and names of their choosing, though never get in by them.
The device then keeps a token in a cookie its scripts can't read; the daemon
keeps only its hash. Every window's bar says so whenever a device pairs,
however it did, such as
phone (you@github) paired with the password: :devices revoke 3 unpairs it.
Windows go on being told until one has shown it: one paired while no window is
open is said by the next window to open, even after the daemon restarts, as
devices.json keeps it. Only windows are told, not devices or the CLI's
commands. :devices (or clackatoo devices) lists paired devices, and
:devices revoke N unpairs one, cutting it off at once. Devices are listed
and unpaired only from a window or clackatoo devices; a device can unpair
only itself. A device unused for expire_days is unpaired, and one past
password_days is asked for the password again; either cuts off a device
that's connected. A device counts as used when it connects, so one that stays
connected longer than expire_days is unpaired while in use. One that's to
give the password again gets no notifications until it does.
On an iPhone, add the app to the home screen first (Share → Add to Home Screen) and pair it from there: the home-screen app keeps its own cookies, and only it can get notifications.
What a phone does in a chat is logged with the device's number.
A paired device has a shell #
A paired device can do almost anything a window can, and it can type into your
terminals. The daemon refuses a few things to devices: connecting to other
machines or forgetting them, :keep, allowing other devices to pair,
unlocking pairing, and listing or unpairing devices. Those are guards against
mistakes, not a boundary: from a terminal, a device can run clackatoo
itself, or anything else you could. A lost phone that's still paired is a lost
shell on your computer. Unpair it with :devices revoke N at once, then check
what's paired with :devices: every pairing since was said in your windows'
bars.
While the agent works, the bar at the foot of a chat says what it's doing and for how long, beside three pulsing dots, however far up you've scrolled. The seconds count only while the page is on screen and the app is connected, and the dots keep still if your phone asks for less motion. In the list of chats, running agents have a blue activity ring; approvals, unread replies, and failures have distinct markers.
Managing agents #
The overview opens on Agents, grouped by workspace. Needs you filters to approvals, unread replies, and failed sessions; Working shows running agents. Workspaces that need attention come first. Search matches chat titles, providers, and workspace names within the selected filter. Terminals is a separate view, with search matching names and directories. The top bar says whether the app is connected or retrying.
A workspace from another machine says
which, after its name, as notes ◯ @desk, with a ring as a window's bar has:
in the accent colour while your daemon is connected to desk, red while the
connection is down or being made, and filled amber while ssh needs a password,
which only a window can give. A chat or terminal on another machine than its
workspace, such as a pane borrowed from desk into one of your own, says so in
its row, and every chat or terminal on another machine says so in its
heading. In a browser on a computer the mouse over the ring, and on a phone a
screen reader, says the machine's name, the machines its connection goes
through, and how it is. The app isn't told what ssh said when a connection
failed: that's for your windows.
Long chats open on their recent turns first. Scrolling near the top fetches older messages without moving the message you're reading; Load earlier messages also fetches a page. Each connected client keeps its own loaded range, and reconnecting retains it. The daemon keeps the complete history.
In a chat, the conversation scrolls independently of its header and composer. New output follows while you're near the bottom; scrolling back keeps your place and reveals Latest to return to the end. Pending approvals stay above the composer, with their full choices. On wide screens, the session list stays beside the conversation. The composer follows the phone's visible screen when the keyboard opens and expands back when it closes. It sits close to the bottom, reserving the home-indicator area only while that area is visible. Long tool output and code scroll sideways inside their own blocks. Message attachments and tool images show through the image layer: each is fetched only as it scrolls into view, as a copy only as big as the screen shows it. With an older daemon, they show their retained thumbnails.
Links in an agent's words open in a new tab; only web and mail links do, and a link's text, written by the agent, might not be where it goes. Press and hold one to see its address. A link an agent asks you to open in a form always shows its address.
Keyboard positioning also updates when you select an already-focused message box or return to the app. Safari can report its new visible size late in the keyboard animation, with no event saying so; for a second and a half after each of these transitions the app reads the size on every frame and follows it, without changing your place in older messages. An idle page reads nothing. Home Screen mode and pinch zoom also stay within the browser's reported visible area; CSS viewport units can extend beyond the drawable window on iOS. The app lets iOS choose its status-bar appearance instead of requesting the deprecated translucent mode. The app's bottom padding is capped at 12 pixels with the keyboard closed and is 6 pixels with it open; space reserved outside the page by iOS is separate.
If the composer still ends up behind the keyboard, or a gap shows under it, select Screen measurements at the foot of the list (touch screens only). It shows, over the page, the sizes the phone reports: its visual viewport, the layout viewport, the window's scroll, the CSS viewport units and safe-area insets, where the page and the composer end, and the latest keyboard, focus and scroll events with their timings. A screenshot of it tells what the phone said when the layout went wrong. It's kept on in that browser (or Home Screen app) until you select the button again, and never takes a touch itself.
Select the model name for Agent settings: model, permissions, reasoning, and any other settings offered by the provider. Search models across all providers, or choose a provider tab. Star a model to keep it in Favorites, saved in this browser. Search shows matching favorites first; clearing it returns to the previous provider. The sheet opens on Favorites when you have any, otherwise on the current provider. Picking another of the chat's own agent's models changes it in the chat. Picking another provider's model moves the chat to that agent at once, though not while the agent answers; unlike in a window, it isn't held for your next message. Your next message takes the new agent up to about 20,000 tokens of the conversation so far, or only what happened since if the chat had that agent before. The same sheet has Permissions for approval mode, tool policy, browser access and how many subagents can work, and Tools for the live harness capability report. These controls share the model button in the composer. The context gauge opens Context & usage, with the chat's token counts and available account allowances across providers. Opening it asks for fresh readings while showing cached values. Both panels close with their close button, selecting outside them, or Escape; keyboard focus stays inside the panel until it closes.
↑ sends a message when idle. While the agent is working, it says Queue
and adds the message to the shared queue, and a Send to queue row above
the box offers Steer now, which sends the text into supported active
sessions without stopping their work. Sessions that can't be steered, and any
message with photos, say Stop & continue instead; a message that might
mention files says Stop & send, since a file it mentions goes only with
the message whole. Ctrl+Enter
(Command+Enter on a Mac) sends when idle and steers
while the agent answers; plain Enter adds a line. A message that is
only the name of a command the agent's own interface has, such as /model or
/clear, isn't sent: the app says to use it in a window. Queued messages are
listed above the box under Up next (or Queue paused), each with a
button to send it now (steering, or Stop & continue, while the agent
works) and × to remove it; there's no pencil to take one back to edit, as a
window has. Stop, in the chat's header while the agent answers, always
stops it.
Draft text stays with its chat when you navigate away, and survives reloads in the same browser tab through session storage. It clears only after the daemon accepts that exact message. If sending fails or the connection is lost, the text is kept. A lost acknowledgment might mean the message was delivered: the app tells you to check the conversation before retrying, and never resends it automatically. The daemon keeps each chat's draft too, as it does for a window's box: the app tells it what's typed after a short pause in typing and when you leave the chat, and a chat opened in this page for the first time starts with the daemon's draft unless you've typed in its box since. When a message is sent from any box, the app's box empties if it holds only that message. An unavailable browser storage API limits recovery after a reload to what the daemon kept.
A daemon that starts afresh, as after the computer restarts (an upgrade doesn't), numbers its chats and terminals anew, so chat 7 might be another chat. When the app reconnects to such a daemon, it closes the chat or terminal it showed, goes back to the list and says why, and drops the drafts and photos it held, so nothing typed for one chat is sent to another or typed into another terminal. Each time it connects, the app sends no message, key, draft or fit until the daemon has said which run it is; a message tried meanwhile says it's still connecting, and keys are turned down. Drafts kept in the tab's storage are kept for one run of the daemon only: a reload shows the chat's draft at once, and drops it if the app then finds the daemon started afresh.
+ (Attach photos), beside the send button, opens the device's photo/file picker, including in the iPhone Home Screen app. Choose up to four photos or screenshots, each under 20 MiB, and review the thumbnails above the message box; × removes one. You can send photos with or without text, or queue them while an agent works. Photos are prepared locally and uploaded only when you send. Browser-decodable images are converted to PNG, with a maximum side of 4,096 pixels and the same 8 MiB encoded message limit as the native client. An unsupported format asks you to choose a PNG or JPEG export.
Unsent photos stay with their chat across navigation and connection interruptions, and clear only when their submission is accepted. They live in this page's memory, at most 32 MiB of them across all chats, so reloading or closing the page discards them; text drafts still survive reloads. An unconfirmed send never retries automatically.
Terminals #
The Terminals filter lists each workspace's terminals, with what each is running, where, and its size; terminals in no workspace are under Elsewhere. Select one to follow it.
A workspace's
background tabs are listed
after its terminals, those of another machine's workspaces your daemon shows
too: each with how it's getting on (Running, Idle, Ended, or Failed with its
exit status), the ports its programs listen on, and ↻ if it's kept running.
Select one to follow its terminal; Bring back puts it back in its
workspace's tab bar and shows it; ✕ dismisses it, closing its terminals,
and one still running asks you to select it again, Stop?, within three
seconds. A workspace's heading says how many of its background tabs are
running, ⚙ 2, red with the exit status of one that failed, ⚙ 1 ✗ 2, as a
window's icon after the tabs does; select it to list them. Listing them counts
as having seen a failure, as a window's list does, but the list goes on saying
it while it's shown. The app doesn't mark a terminal to keep running (the
daemon refuses that from a phone: it's for you at a window), nor offer
starting a background tab.
A terminal is shown at its own size, the one your windows gave it: with
readable 14–16 pixel text by default, so a wider one pans sideways under your
finger. Pinch to zoom, or open ⋯ for text size controls and Reset. These
change only this browser's view. Scroll up for its history, fetched as you go.
A command that failed ends its prompt's line with a dim red ✗ and its exit
status, as in a window, on the screen and in history.
Fit, in ⋯, makes the terminal the phone's size instead, and says Fitted while it lasts; it's fitted again when the keyboard comes up or goes. It goes back when you select Fitted, leave the terminal or put the phone away, or type into it from a window; windows' resizes wait till then, and it takes the latest they asked for. A phone that stops asking for the fit, as one asleep does, loses it within a minute. The phone never resizes a terminal any other way.
Select the rows or Keyboard to type; the down chevron hides the keyboard
again. What you type goes as you type it, a key at a time, with the keyboard's
corrections off and curly quotes made straight. One compact row appears while
typing, with Esc, Tab, Ctrl (for the next
key: Ctrl then c is Ctrl+C) and the arrows.
⋯ holds ^C, |, ~, /, -, and Paste; using these controls keeps the
input focused. A keyboard attached to the phone works too. A paste of several
lines into a program that hasn't asked for pastes marked as such asks first,
since each line would run as you'd typed it; a paste over a megabyte is turned
down. When the daemon can't be reached, or hasn't answered for three seconds,
keys are turned down and the phone says how many, rather than reach a shell
long after you meant them. Nothing is kept to send later.
The log notes the device that fits a terminal, or starts typing into one, never what it typed.
Notifications #
Select Enable in the overview. The phone is then told when a chat finishes a turn, or asks you something, while no window you're using shows it. A window counts as in use while it has the focus and has been used in the last five minutes. A notification carries only the chat's title and a few words, sealed for your device, and goes only to Apple's, Google's, Mozilla's or Microsoft's push services. A window on a desktop shows its own desktop notifications besides, on the computer it runs on; one without the focus says nothing of a turn you watched end on the phone.
A terminal you mark with :notify phone sends the phone the
notifications its program asks for
too, while no one whose window or phone shows it is looking. Tapping one opens
the terminal.
What's kept #
~/.local/share/clackatoo/web/: devices.json, with names, token hashes,
push subscriptions, pairings no window has shown yet, and whether password
pairing is locked, and vapid.p8, the key notifications are signed with. Only
you can read either.
A chat keeps reconnecting #
If a chat stays on Opening while the connection keeps retrying, inspect
the daemon's daemon.log in its runtime directory. Repeated "dropping a
client on another machine" warnings with more than 8 MiB pending can indicate
an older daemon whose send-buffer limit is smaller than a valid conversation
snapshot. Update the daemon; a large initial snapshot is allowed to drain
before further view updates are sent.
Building it #
The web app is built into the program when it's compiled, which needs the
wasm32-unknown-unknown target and wasm-bindgen-cli 0.2.129. A build
without them serves a page saying the app is missing; CLACKATOO_WEB_APP=off
leaves it out on purpose, and CLACKATOO_WEB_APP=required makes a build
without them fail, as releases' builds do, so releases always include it.
CLACKATOO_WASM_BINDGEN names the wasm-bindgen program, if it isn't
wasm-bindgen on PATH.
Permissions
clackatoo / Reference
Open :Settings, then Permissions under Agents. The page says under
its title which machine's chats it's for. Its first control, Who answers
agents' requests, chooses for new chats:
- The agent's own settings uses the agent's own permission mode.
- clackatoo's rules reviews approval requests with your rules and asks you when none matches. There is no model reviewer.
While the choice is the agent's own settings, new chats don't go by the rules, and the page says so under Rules: they're kept, and used by chats set to clackatoo's rules. Saving a rule then says the same, not that it's in force.
Existing chats keep their selection. To change one, open its permissions menu beside the model and choose Who answers agents' requests. Finish or stop its turn and answer pending permission questions first. The choice survives reconnects, daemon upgrades and saved workspace restoration. A chat started by another chat inherits its parent's engine.
Provider modes and coverage #
clackatoo's rules support Claude Code and Codex. Claude uses Manual mode; Codex uses Workspace access, which keeps its own sandbox. Their more restrictive modes, Claude's Plan and Codex's Read-only, remain available. Clackatoo waits for the provider to confirm a compatible mode before sending a pending message. Selecting the agent's own settings restores the mode the chat used before the switch, where that mode is still offered.
Other providers use the agent's own settings. To move a chat using clackatoo's rules to one of those providers, select the agent's own settings first.
Rules apply to requests that reach Clackatoo:
| Request | Coverage |
|---|---|
| Provider tool approvals | Requests the provider sends over ACP, the Agent Client Protocol |
| Clackatoo's built-in tools | The calls that ask you: running a command, typing into a terminal, showing a file outside the project, the browser's first page, and a message to a chat that can do more (send_to_chat), which no rule allows but a Deny refuses, unless you allowed messages between those chats always |
| Managed MCP servers | External tool calls and other operations; connection metadata does not ask |
Clackatoo's other tools, such as list_panes, read_chat and
board_read, never ask and are not checked against the rules. A rule naming
one of them has no effect. A chat working in the background is therefore
never left waiting on a question nobody sees.
Providers can still run operations without requesting approval. Claude's read tools and existing provider allow rules are examples. Codex can run commands and edits already allowed by its sandbox. Those operations do not reach these rules. Provider-owned MCP connections also keep their provider's permission behavior.
Tools Off, Browser Off, specialist limits, native window grants and managed server trust remain in force. Rules cannot turn those capabilities on. While clackatoo's rules are selected, they review commands regardless of whether Tools was set to Ask or Allow; Tools Off still refuses them.
Some requests always need your direct approval, whichever rule would allow them. A Deny still refuses them.
- Typing into a terminal, or into a command Codex left running.
- Showing a file outside the chat's project.
- The browser's first page in a chat. Its question keeps the Allow for this chat answer, which lets the agent open further pages.
- Provider plan approvals and the provider's own questions.
- Requests for more sandbox or network access: Claude Code's
SandboxNetworkAccess, and Codex's requests for additional permissions or for network access with a command. - A command whose request carries anything beyond the command itself, such
as Claude Code's
dangerouslyDisableSandbox.
Add or edit a rule #
The page lists each rule as a sentence, which says how far it reaches: "Allow
the command git status" is of those words and no more, and "Deny commands
starting git push" of whatever starts with them. Choose New rule, or a, or Edit beside an existing rule:
it opens as a form, titled Permissions › New rule. Choose what it does
When it matches, what It matches (a tool, a command, reading files or
changing files) and its target, then Save or
Ctrl+S. Typing on a field starts it, Enter
finishes it and goes to the next, Tab goes from field to field,
and Esc stops typing. A target that can't be right says why
underneath. With changes in the form, Esc and Cancel ask
before they're thrown away. Delete this rule asks for a second press to
confirm, which any other key or click takes back; Enter in the
field above it never goes on to it.
A rule that allows a whole tool which runs commands, such as claude/Bash,
reads "Allow any command through claude/Bash", and its form says so as it's
typed, since that is what it allows.
Rules that the daemon's own init.lua sets are locked: the page says so,
each rule has a lock with the line that sets them, and Enter on a
rule, or a click on its lock, opens that line.
The daemon validates and saves the complete rule list. While it does, the form's button reads Saving… and nothing in it changes; a save from a form you've since cancelled doesn't hold up the next. A failed save keeps the form, and says why. A rule is saved into the list as the daemon has it then, so a change made meanwhile in another window is kept; a rule that was itself changed or deleted meanwhile is refused, for you to open again.
A list this window can't read, as a newer daemon's may be, is never shown as empty: the page says why under its title, lists no rules, and adds none, so nothing is saved over it. A form open when the list became unreadable isn't saved either.
Decisions have this precedence, regardless of list order:
- Deny refuses the action.
- Ask asks you once.
- Allow approves this action once.
With no matching rule, Clackatoo asks you. An Allow never teaches the provider to stop sending subsequent permission requests.
| Match | Example target | Meaning |
|---|---|---|
| Tool | clackatoo/run_in_terminal | One of Clackatoo's tools that asks you |
| Tool | managed_docs/search | The managed server named docs, tool search |
| Tool | managed_docs/resources/read | Another MCP method of that server |
| Tool | claude/Bash | The provider's own tool, as the provider names it |
| Command | git status | A simple command, compared word by word |
| Read | {project} | Recognized file reads beneath this chat's project |
| Edit | ~/src/example | Recognized file edits beneath this directory |
Clackatoo works out which tool a request uses from what it knows of the
call, never from the request's own input. A request that names no tool
matches no Tool rule. Codex names the tool for only some of its commands, as
codex/exec_command; others arrive without a name. Use Command rules for
Codex's commands, which match either way. Its approvals of MCP tool calls
always ask you. A managed tool whose name contains / could be mistaken for
an MCP method, so it matches no rule either.
A managed server's tool is ruled on once, as managed_docs/search, when
clackatoo's proxy is asked to make the call. Claude Code may ask about the
same call first, under its own name for it, such as
claude/mcp__managed_docs__search: that question is answered for you, and no
rule is read for it. So a rule on the agent's name for a managed tool never
applies. Write rules for managed tools on the managed_… name only. See
MCP servers.
Tool rules can also say Only with these arguments, a complete JSON
argument value. Left empty, it matches any arguments; null matches JSON null
specifically.
For managed tool calls, this is the tool’s argument value. Other MCP methods
match their complete request parameters, including resource URIs and prompt
names. Keep credentials out of rules.
Command rules #
A command is compared word by word, however its words are spaced. There are no wildcards.
- Allow matches when every word is the same.
git statusallowsgit status, but notgit status --shortor/usr/bin/git status. - Ask and Deny match every command that starts with the rule's
words, wherever its program is run from.
git pushmatchesgit push origin mainand/usr/bin/git push.
Only simple commands can be allowed. Shell operators, quotes, substitutions, redirects and a variable set before the program require approval, even when a broad tool Allow matches. So does a command that names a working directory outside the chat's project.
An Ask or Deny on a command is a guard rail, not a sandbox. It matches the
words as written, from the first. A Deny on git push does not match any of
these:
env git push,nice git pushorcommand git push, which start with another program.git -C . pushorgit --no-pager push, which put an option first.- A script or an alias that pushes.
Under a rule that allows the whole tool, those run. A command that is not
simple, such as true; git push or "git" push, is not denied either: it
asks you. Use a Deny to catch mistakes, not to contain an agent you do not
trust.
Allowing a whole command tool #
A Tool rule that allows claude/Bash, clackatoo/run_in_terminal,
clackatoo/run_in_background or clackatoo/start_activity without exact
arguments allows any simple command. That includes sh script.sh,
make and python3 x.py, which run code the rule never sees.
An agent allowed to run any command can do what you can. It can read your files, reach the daemon's socket, and change these rules by writing the daemon's config. Clackatoo does not try to list the commands that would do so. Choose such a rule only for an agent you would let work unattended, and prefer the provider's sandbox for limits that must hold.
File rules #
Read and Edit targets are directories written as absolute paths, ~/…,
{project}, or {project}/…. ~ and {project} have that meaning in a
rule's target only. A path in a request must be absolute; one that is not,
including one starting with ~, asks you. Links are resolved before
matching, including the existing parents of new files. Unresolvable paths
ask you.
{project} is the chat's git repository, or its working directory outside
one. It names nothing when that is your home directory or a folder that
contains it, so a project rule never comes to cover everything you own.
A rule whose target names nothing, because of that or because the target is a broken link, behaves by its decision:
- An Allow matches nothing.
- A Deny or Ask cannot be placed, so Clackatoo cannot tell which files it was meant to restrict. Every read (for a Read rule) or edit (for an Edit rule) in that chat asks you.
These matches require recognizable file inputs, which are Claude Code's own file tools:
| Tool | Matched as | Path |
|---|---|---|
| Read | Read | The file |
| Grep, Glob | Read | The folder searched |
| Write, Edit, NotebookEdit | Edit | The file |
A request from one of these tools that carries an input the rules do not know asks you. An opaque or multi-file provider approval asks you too. Codex approvals carrying additional consent content also ask directly, including network-access consent. Clackatoo's own file-opening tools ask only for a file outside the project, and that question is always yours to answer; a Deny on a Read rule still refuses it.
Searches #
Grep and Glob read whatever lies beneath the folder they search, so they are judged on more than the folder's own path:
- A Deny or Ask rule on a Read applies when its directory is the folder
searched, contains it, or lies beneath it. A Deny on
{project}/vendorrefuses a search of{project}. - An Allow rule applies only when its directory contains the folder searched.
- A search asks you when one of the home-directory credential stores, or
Clackatoo's own config, state or data, lies in or beneath the folder. A
search of your home directory, or of
~/.config, therefore always asks. - A search asks you when its file pattern leaves the folder, or spells the
name of a credential file or folder in one of its parts, such as
.env*,*.pemor**/.ssh/*. This check goes by spelling only: a pattern such asid_rs?or*.{pem,crt}matches the same files and is not caught.
Two limits apply:
- Files and folders that are protected by name only, such as a
.envor a.sshfolder somewhere beneath the folder searched, are not found in advance. A search of a project that holds one is allowed, and can print its lines. Add a Deny or Ask rule for the folders that hold them. - A search that names no folder is taken to search the directory the chat's session started in. If the agent has since changed directory in a command, the search runs somewhere else. Clackatoo cannot see that.
Files that always ask #
Some files ask you even if an Allow matches, whether the Allow is a file rule or a rule for the whole tool. A Deny still refuses them. Names are compared in any letter case, and a protected name that is a symbolic link is still protected.
Credentials, for Read and Edit:
| Where | What |
|---|---|
| In your home directory | .docker, .azure, .pulumi, .password-store, .terraform.d, .terraformrc, .mozilla, .thunderbird, .vault-token, .pgpass, .my.cnf, .yarnrc.yml, .claude.json, .var/app, snap/firefox, and the histories .bash_history, .zsh_history, .python_history, .psql_history |
| In your config directory | gh, glab-cli, github-copilot, gcloud, sops, op, rclone, pip, google-chrome, chromium, BraveSoftware, microsoft-edge, Code, git/credentials, containers/auth.json |
| In your data directory | keyrings, atuin, fish/fish_history |
| Agent and tool sign-ins | ~/.claude/.credentials.json, ~/.codex/auth.json, ~/.gemini/oauth_creds.json, ~/.cargo/credentials.toml, ~/.cargo/credentials, ~/.composer/auth.json, ~/.m2/settings.xml, ~/.gradle/gradle.properties, ~/.gem/credentials |
| macOS | ~/Library/Keychains, and the Google and Firefox folders in ~/Library/Application Support |
| Folders, wherever they are | .ssh, .aws, .gnupg, .kube, and Clackatoo's mcp-private |
| Files, wherever they are | .env, .env.* and *.env (but not .env.example, .env.sample or .env.template), .envrc, .netrc, .git-credentials, .npmrc, .pypirc, .dev.vars, id_rsa, id_dsa, id_ecdsa, id_ecdsa_sk, id_ed25519, id_ed25519_sk |
| Files, by ending | .pem, .key, .ppk, .p12, .pfx, .jks, .keystore, .kdbx, .tfvars, .tfvars.json, .tfstate, .tfstate.backup |
| The kernel | Anything under /proc or /sys, which show running programs' environments |
| Clackatoo | Its config, state and data directories (the data directory holds the browser profile, web devices and agent adapters) |
Your config directory is ~/.config and your data directory is
~/.local/share. Where XDG_CONFIG_HOME or XDG_DATA_HOME put them
elsewhere, the stores are protected in both places.
Certificates and public keys often end in .pem or .key too. Reading one
asks you, because Clackatoo cannot tell it from a private key by its name.
Agent instructions and settings, for Edit:
| Where | What |
|---|---|
| Folders, wherever they are | .clackatoo, .claude, .codex, .agents, .agent, .cursor, .gemini, .windsurf, .roo, .continue, .opencode, .clinerules, including skills and specialists; .github/instructions, .github/prompts, .github/agents |
| Files, wherever they are | CLAUDE.md, CLAUDE.local.md, AGENTS.md, AGENTS.override.md, AGENT.md, GEMINI.md, .mcp.json, .cursorrules, .windsurfrules, .clinerules, .roorules, .roomodes, .rules, .aider.conf.yml, opencode.json, opencode.jsonc, .claude.json, .github/copilot-instructions.md |
Files that run code, for Edit:
| Where | What |
|---|---|
| Folders, wherever they are | .git (hooks and config), .githooks, .vscode, .zed, .idea, .devcontainer, .husky, .mise, .yarn, .circleci, .buildkite, .github/workflows, .github/actions, .forgejo/workflows, .gitea/workflows |
| Files, wherever they are | .envrc, .devcontainer.json, .pre-commit-config.yaml, lefthook.yml, lefthook.yaml, lefthook.toml, .lefthook.yml, .lefthook.yaml, lefthook-local.yml, lefthook-local.yaml, .gitmodules, mise.toml, .mise.toml, mise.local.toml, .mise.local.toml, .config/mise.toml, .tool-versions, .yarnrc, .yarnrc.yml, .npmrc, .pnpmfile.cjs, bunfig.toml, .gitlab-ci.yml, .gitpod.yml, .travis.yml, .drone.yml, azure-pipelines.yml, bitbucket-pipelines.yml, Jenkinsfile, *.code-workspace, .cargo/config.toml, .cargo/config |
| In your home directory | .bashrc, .bash_profile, .bash_login, .bash_logout, .bash_aliases, .profile, .zshrc, .zshenv, .zprofile, .zlogin, .zlogout, .xprofile, .xsessionrc, .xsession, .xinitrc, .pam_environment, .vimrc, .vim, .emacs, .emacs.d, .tmux.conf, .tool-versions, .gitconfig, .cargo/env |
| Program folders in your home directory | bin, .local/bin, .cargo/bin, .bun/bin, .npm-global/bin, go/bin |
In ~/.config | fish, git, nvim, emacs, tmux, sway, hypr, i3, direnv, mise, environment.d, systemd/user, autostart |
In ~/.local/share | systemd/user, applications, dbus-1/services |
| macOS | ~/Library/LaunchAgents |
Folder names count anywhere along a file's path, so a chat started inside
~/.claude/skills is still asked before it edits a skill. There is one
exception. Agent tools keep their agents' worktrees in .claude/worktrees,
.codex/worktrees and .cursor/worktrees. A chat whose project is one of
those worktrees is not asked about that enclosing folder, so it can use an
Edit rule on {project} like any other project. A .claude folder inside
the worktree still asks.
When Clackatoo cannot tell where your home directory is, every file asks,
and rules written with ~ or {project} name nothing. That happens when
the daemon runs with HOME unset or set to a path that is not absolute.
These lists apply to the file tools named above. They do not apply to other
tools that reach files, such as an MCP filesystem server or a command: a
rule that allows managed_fs/write_file or claude/Bash allows writes to
these files. Allow such tools only when you accept that.
The lists are a guard against accidents. They do not cover every file that can run code, such as a build script, or every place a secret can be kept.
Recent decisions #
The daemon keeps the latest 64 rule decisions in memory, and the page lists them under Recent decisions, read again every two seconds while it's shown. Each says what was decided of which tool (allowed, asked of you, denied, or stopped being asked about, for a check that was cancelled), in which chat and roughly how long ago, with the matching rule number, or why approval was needed. It does not record action arguments, command text or file contents. The history clears when the daemon restarts or upgrades.
Checks that fail or take longer than three seconds ask you.
Changing the rules cancels nothing. A check still in progress is evaluated again against the new rules. A question you have already been asked is checked again too. It stays open unless the new rules now allow or deny what it asks about; then they answer it.
A question stays open for you to answer when it could not be checked against the new rules:
- the check timed out;
- more than 64 questions were open at once;
- the question was asked before a daemon upgrade.
A new Deny does not close such a question, so read it before you allow it.
A check is Cancelled when nothing was decided:
- You stopped the turn. Nothing runs, and the agent is told you stopped it and not to try again. This holds across a daemon upgrade. It affects that turn only: a turn the agent starts later, such as when a background task ends, is checked as usual. There is one exception after an upgrade: if such a later turn had already ended when the daemon upgraded, a request that arrives before the next turn begins is treated as stopped.
- The turn ended, or the chat moved to another session, before the check finished. Nothing runs, and the agent is told nobody refused, so it may ask again.
A request whose agent exits while it is checked is dropped and recorded as Cancelled. No question is asked for it.
Pending checks become human questions before an upgrade; they are never replayed.
Configuration and enforcement #
The page saves permissions.engine and permissions.rules in the daemon's
daemon/settings.lua. Your daemon/init.lua can set them instead; the page
then shows where, as init.lua:12, on the engine or on each rule, which a
click opens, and offers no way to add or edit a rule.
daemon.. = "provider"
daemon.. = [[
[
{"decision":"allow","kind":"command","target":"git status"},
{"decision":"ask","kind":"command","target":"git push"},
{"decision":"deny","kind":"tool","target":"managed_upload/send"}
]
]]
The list is limited to 128 rules and 64 KiB of JSON; each target is at most 4,096 bytes. Unknown fields and invalid values are refused. Invalid config keeps the last configuration that ran successfully.
Rules belong to the daemon a chat runs on. A chat on another machine follows that machine's rules and default engine, whichever window shows it, and this page edits the rules of the daemon the window is connected to. Rules are not copied between machines.
These are approval rules, not an operating-system sandbox. An approved
program can run other code and make changes the rule does not inspect.
Provider-approved operations can bypass this approval boundary, and an
unsandboxed shell running as you can reach your config and daemon sockets.
The daemon applies changes to its config as they are saved, so a program
that can write daemon/settings.lua can change these rules.
Use the provider's sandbox to enforce filesystem and network boundaries.
Configuration
clackatoo / Reference
The window's behavior is configured in code: an init.lua, as Neovim's is,
written in Luau, a fast dialect of Lua with optional types
and a sandbox. Without one, the window works as it always does. Settings
needed before the window starts, such as the graphics API, stay in
startup.toml, beside it. The font is
both: startup.toml's is what the window starts in, and init.lua's outdoes
it.
-- ~/.config/clackatoo/client/init.lua
-- tmux's split keys, as well as clackatoo's own.
client..
client..
-- Closing a pane takes :close, not a key.
client..
-- The list of background tabs on Ctrl+B Space, rather than Ctrl+B b l.
client..
client..
-- x in normal mode closes a chat, and does what it always did elsewhere.
client..
Where it goes #
~/.config/clackatoo/ or $XDG_CONFIG_HOME/clackatoo/
client/settings.lua what :setpersist, :mappersist and :Settings saved, run before init.lua
client/init.lua the window's config
client/lua/ modules for it to require
client/startup.toml the window's settings, needed before it starts
daemon/settings.lua the daemon's settings clackatoo saved, run before its init.lua
daemon/init.lua the daemon's config: its agents, this machine, the web app
daemon/lua/ modules for it to require
lua/ modules shared by the window's config and the daemon's
require("theme") loads theme.lua from client/lua/, or else lua/, or
theme/init.lua from either. A dot in a name is a directory:
require("keys.tmux") is keys/tmux.lua. A name is letters, digits, _ and
-, never a path, so nothing outside those folders is required, and a module
is read only as text, up to 1 MiB, never Luau's bytecode. Each module runs
once, and later requires get what it returned.
Windows #
The config runs once for the client, the process that opens clackatoo's windows, not once for each window. Its bindings, handlers and options apply in every window, and a window opened later goes by them as they are, without the config running again, so state a config or a module keeps, such as a count, is kept once. It runs on a thread of its own, alongside the first window starting up, and a typical config takes under a millisecond. The window never waits for it to show itself: keys pressed before it has run do what they do without it.
Each window is an object in it. client.windows lists them, and an event says
which window it happened in, as ev.window. A pane, tab or workspace is always
one window's, the one it was found through: two windows can be on two
machines' daemons, whose panes are numbered apart. So ev.pane:split("right")
splits in the window whose key it was, and client.cmd runs its command
there; while the config loads, in no window's handler, it runs in the window
with the focus.
A window opened in a process of its own, as with CLACKATOO_WINDOW_HOST=off,
or one that couldn't share the others' process, as with another graphics API,
runs the config for itself.
:reload runs the config again, from the start, for every window:
settings.lua, then init.lua. Everything the old config bound or listened
for goes, the window's own keys come back first, and options go back to how
they start, including those changed with :set and :setlocal.
You rarely need it: the windows watch settings.lua, init.lua and the
modules they require, and a quarter of a second after one is saved with
something new in it, they run the config again as :reload does, and the
bar says so. What the settings menu or :setpersist saves in settings.lua
isn't a change to run it again for: the windows go by it already. A module
the config doesn't require yet is picked up once the file that requires it
changes. If the user's inotify instances are all in use, nothing's watched,
which the window's log says, and :reload still works.
A config run again by itself, as its files changed, applies only its plain
options. It runs beside the config the windows go by, which keeps its keys,
handlers and all it does, and only the options it sets are taken: not keys
it binds, handlers, client.cmd, client.connect, client.forward or
splits, and not the options that start programs, reach the network or
loosen what agents may do (agent, agenttools, claudetask,
chatbrowser, rewindfiles, languageinstall, osc52 and
updatecheck). The bar says what it held back, as the config changed: its options are as it says; :reload turns on what's held: agenttools=allow, client.cmd(bg make), 2 key maps, 1 handler, so you see what :reload would
turn on before you run it. Running it is your OK: an agent's keys can't, and
neither they nor a chat with Control of the window can set those options,
with :set or in the settings menu.
A window opening runs its whole config, as Vim runs your init.vim: it's
yours, and what you started the window with. Only a change to it as the
window runs is held back. So a file an agent writes never runs anything by
itself, until you open a window or :reload; see
What this guards against.
How a key travels #
Each key you press goes through, in order:
- Keypress handlers, added with
on("keypress", …), in the order they were added. A handler on a pane only hears keys pressed in that pane. - Bindings, the window's own and those made with
client.keys.map. - The pane: the program in a terminal, the box in a chat, or the pane's normal mode.
A handler lets the key go on unless it calls ev:stop(), which ends its
journey there. A binding stops its keys unless it calls ev:propagate(),
which lets them go on to the pane, as if they weren't bound. If the binding
took several keys, such as <C-b>x, they all go on, in order.
Whether a key goes on is decided when the handler finishes, or first waits for
something, as pane:split waits for the new pane. Calling stop or
propagate after that is a mistake. A key waits at most 300 milliseconds for
the config to decide. After that, it's as if the config had done nothing more:
a binding's keys stop there, and a key a handler heard goes on.
A binding made with {propagate = true} decides at once, without the config:
its keys go on to the pane as soon as they're pressed, as if it had called
ev:propagate(), and its function runs after, so a slow one never holds them
up. Calling ev:stop() in it is a mistake.
-- u undoes at once, as it always does, and the config notes it after.
client..
How handlers are run #
One config runs for every window, on one thread, so its handlers take turns.
The handlers a key waits for, those of on("keypress") and a binding's
function, run first, each until it finishes or first waits. Everything else is
background work: a handler going on once what it waited for has come, a
handler of an event nothing waits on, such as a chat's turn ending, and a
binding with propagate. Background work runs a slice of a couple of
milliseconds at a time, in turn, and a key that comes meanwhile is decided
first, so a busy handler in one window never holds up keys in another: a key
waits a fraction of a millisecond for it. A binding with propagate pressed
again before its function has started runs it once, for the latest keys. At
most 64 handlers wait their turn; past that, a new one is left out, and the
bottom bar says so.
A handler that calls coroutine.yield() itself lets other work go first, and
goes on after. A coroutine of its own, made with coroutine.create or
coroutine.wrap, is never ended for a slice: it runs on until it yields to
the handler, which is then. Nor can Luau end one inside a metamethod, or a
function called from C, such as table.sort's comparator; there it runs on.
Keys #
client.keys.map(modes, keys, function) binds keys in one or more modes,
replacing what they were bound to. client.keys.unmap(modes, keys) takes a
binding away, the window's own included.
A binding can say what it does, as Neovim's vim.keymap.set takes it:
client.keys.map("n", "<Space>ft", function() client.cmd("Files") end, {desc = "find todos"}).
The panel of keys shows it in place of "from your config". {propagate = true}
lets its keys go on at once and runs the function after (see how a key
travels). Neovim's silent,
noremap, nowait, unique, and remap = false are taken and change
nothing; any other option is left out, with a warning in the bar, and the
binding is still made. client.keys.group(modes, keys, name) names the keys
that start several, as which-key.nvim's groups do:
client.keys.group("n", "<Space>f", "my files") makes Space's
panel say f +my files. A group with no name stops naming them. Keys that
finish a binding of their own say what that does instead.
Keys can be bound to other keys too, given as a string, as Vim's noremap
maps them: client.keys.map("n", "gi", "gri") makes gi go to
implementations, and client.keys.map("n", "<Space>w", ":w<CR>") writes the
file. The keys are typed as if pressed, so the window's own keys do what they
do, but the config's bindings and keypress handlers don't see them, so a
binding can't set off itself or another of the config's. They're typed after
any keys typed before them: a mapping to @qx types q's keys and then x,
and a key among them that fails stops the rest, as in Vim.
Modes are written as letters, together: "niv" is all three of normal,
insert and visual. c is typing into a pane's prompt, such as a search.
Keys are written as in Vim. A character is itself, and <…> holds a key
with modifiers or a named key:
| Written | Is |
|---|---|
<C-b>, <A-h> | Ctrl+B, Alt+H. <M-h> is <A-h>. |
<C-O>, <C-S-o> | Ctrl+Shift+O. Shift is part of a letter: <C-o> is Ctrl+O. |
<S-Tab> | Shift with a named key |
<Esc>, <CR>, <Tab>, <BS>, <Del>, <Insert>, <Space> | Named keys. <Enter> and <Return> are <CR>, and <Escape> is <Esc>. |
<Up>, <Down>, <Left>, <Right>, <Home>, <End>, <PageUp>, <PageDown>, <F1>–<F12> | More named keys |
<lt> | < |
Several keys in a row, such as <C-b>", make a sequence. A key that starts
one waits for the rest as long as it takes, as tmux's prefix does. If the next
key goes on to no binding, the keys typed so far go to the pane as if nothing
were bound to them, as Vim's do, so binding gi leaves gg as it was, and
the next key is looked up on its own. Keys that began with Ctrl or
Alt held, as <C-b> does, are the window's, and are dropped
instead. A binding whose keys start a longer binding's, such as <C-b> beside
<C-b>x, can't be reached.
client.cmd(line) runs a command, as if typed after :, so a key can do
anything a command can. To find files with <Space>ff rather than
<Space>pf:
client..
client..
client.cmd("reload") is refused: the config can't run itself again.
client.forward(spec) forwards a port as
:portforward does,
client.forward(8080) or client.forward("3000:8080"), in every window on
another machine, those opened later included. A window on this machine passes
it over silently; a spec it can't read is an error.
client.connect(host) has the daemon bring another machine's workspaces in,
as
:connect HOST
does. Every window asks its own daemon, those opened later included, and asks
again whenever it connects, saying nothing unless it fails; the daemon keeps
its connections, so windows on the same one asking again leave it as it is.
client.disconnect(host) ends that connection.
client.connect("server", {share = false}) keeps that machine from the
daemons connected to this one, as :connect HOST --no-share does.
Options #
Options are settings, as Vim's are, read and set by name through client.opt,
as through Neovim's vim.opt:
client.. = false -- absolute line numbers only
client.. = 5
client.. =
print -- true
print -- 80
A list, such as colorcolumn, reads as a table of numbers, and is set with
one, with a string as :set writes it, such as "80,120", or with a number
for a list of one. "" or {} sets none. Text, such as showbreak, is a
string. A number can have a fraction where the option takes one,
client.opt.fontsize = 10.5, and a number can be set as a string, as :set
writes it.
An option has one value every window shares, as Vim's global options have:
client.opt, :set and
:setpersist change
it for every window at once. A few can also be set for one window alone, with
:setlocal.
:set changes them as you go, as in Vim, and a config reads what it sets:
| Written | Does |
|---|---|
:set number, :set nonumber | Turns an option on or off. |
:set number!, :set invnumber | Turns it over. |
:set number? | Shows it in the bottom bar. The name alone does too, for an option that isn't on or off. |
:set numberwidth=5 | Sets a number. |
:set colorcolumn=80,120 | Sets a list, with commas between its numbers. :set cc= sets none. |
:set showbreak=↪\ | Sets text; \ is a space and \\ a backslash. |
:set number& | Puts it back as it starts. |
:set | Shows the options changed from how they start. |
:verbose set number? | Shows it, and where it was set. |
Several can go after one :set, such as :set nu rnu. Each option has a
short name, as in Vim, which works everywhere the long one does.
Font #
| Option | Short | Is | Starts |
|---|---|---|---|
font | gfn | The font family terminals and editors are drawn in, as fc-list : family names it, such as JetBrains Mono. Empty is your system's monospace font. A family that isn't installed is refused, and the font stays as it was. --font or CLACKATOO_FONT outdoes what init.lua sets as it runs, but not :set or what your keys set afterward. | your system's |
fontsize | fsz | The size text is drawn at, in points, from 4 to 200, such as 12 or 10.5. The window keeps its size, and the panes fit as many cells as now fit, as when it's resized. --font-size or CLACKATOO_FONT_SIZE outdoes what init.lua sets as it runs. | 12 |
Editors #
| Option | Short | Is | Starts |
|---|---|---|---|
number | nu | Line numbers down an editor's left, the cursor's line showing its own. | on |
relativenumber | rnu | The other lines show how far they are from the cursor's, for counts such as 5j. Without number, the cursor's line shows 0. | on |
numberwidth | nuw | The fewest columns the line numbers take, with the space after them, from 1 to 20. | 4 |
cursorline | cul | The cursor's line is lit faintly across an editor, so the eye finds it. | on |
colorcolumn | cc | Columns marked down an editor, such as 80, to keep lines short by. A list, counting from 1, as the bottom bar's column does, up to 9999. | none |
virtualtext | vt | What a language server says is wrong with a line, written dimly after its end: the worst, if there are several. | on |
gitsigns | gs | The column of git signs left of the line numbers. While it's on, it's there for every file, so the text doesn't move when the first change comes. | on |
agentsigns | as | A column right of git's signs marking the lines an agent changed that you haven't reviewed, in the chat's color. It shows only while a file has such lines, or :blame is on. | on |
wrap | wrap | A line too long for an editor's pane goes on over as many rows as it needs. Off, the view scrolls sideways to follow the cursor. | on |
linebreak | lbr | Wrapped lines break between words, not in them. | on |
breakindent | bri | Wrapped rows start as far in as their line is indented. | on |
showbreak | sbr | Text drawn at the start of each wrapped row. | none |
scrolloff | so | The fewest lines kept in view above and below an editor's cursor. Half the pane or more keeps the cursor's line in the middle. | 5 |
markdownview | mdv | How a Markdown file opens in an editor: as its text, raw, or rendered, as prose, rendered. :markdown and <Space>tm turn each editor from one to the other. | raw |
Editing #
| Option | Short | Is | Starts |
|---|---|---|---|
tabstop | ts | How wide a tab is drawn: to the next column that's a multiple of it, from 1 to 32. | 4 |
shiftwidth | sw | The columns >> and << indent by, as does Tab where it indents with spaces, up to 32. 0 means tabstop's, so the two can't drift apart. | 0 |
expandtab | et | Indents with spaces, not tabs, where no line nearby is indented yet. A file keeps the kind of indent it has. | on |
smartindent | si | A new line, and one where }, ] or ) is typed first or : ends else and the like, is indented as its language's tree-sitter rules say, not Vim's rules for C, a moment after it's given the line before's indent. Off, it keeps the line before's. = indents by the rules either way. | on |
autoread | ar | A file changed on disk by something other than an agent is read again if it has no changes not written, as an edit u undoes. Off, or with changes, the bottom bar says so. | on |
formatonsave | fos | :w formats the file first, as its language server does, then writes it. If the server can't format, or takes over 3 seconds, the file is written as it is, and the bottom bar says why. | off |
tildeop | top | ~ takes a motion, as g~ does. | off |
startofline | sol | These go to the line's first character that isn't blank, as Vim's do: gg, G and Ctrl+Home, H, M and L, Ctrl+D, Ctrl+U, Ctrl+F, Page Down and Page Up, in editors and terminals; and in an editor, : and a line number, and deleting, shifting or indenting whole lines (dd, dj, dG, >>, <<, ==, and their kin). Off, as Neovim's are, they keep the column, as j and k do. Yanks and Ctrl+E and Ctrl+Y keep it either way, and :d goes to the first non-blank either way. | off |
Searching #
| Option | Short | Is | Starts |
|---|---|---|---|
ignorecase | ic | Searches ignore case, in editors, in a terminal's normal mode, in a chat's and in lists'. An editor ignores the case of plain English letters only: é doesn't match É. | on |
smartcase | scs | With ignorecase, a search with a capital letter in it matches case, in editors, terminals, chats and lists. Does nothing without ignorecase, as in Vim. | on |
hlsearch | hls | Every match of the last search in view is lit up, in editors, in a terminal's normal mode, in chats and in lists, the one the search went to brighter than the rest, as Neovim's are: after /, ?, n and N, and in editors *, #, :s and :g too, until Esc or :nohlsearch. Off, only the match the search went to is lit. | on |
incsearch | is | While / or ? is typed, in editors, a terminal's normal mode, chats and lists (explorers, boards, and reviews), the cursor and the view go to the match the search would go to from where it started, and its matches are lit, as Neovim's are. Esc puts them back; Enter keeps them, and is the search. Off, nothing moves until Enter. | on |
inccommand | icm | Shows what :s would do while it's typed: nosplit, in place, or none. | nosplit |
hintpattern | hpat | A regular expression whose matches hints label too, as CLACKA-\d+. One that can't be read is said in the bar as hints start. | none |
Completion and language servers #
| Option | Short | Is | Starts |
|---|---|---|---|
completion | cmp | Asks the language server what could finish a word as you type it. Off, Ctrl+Space, Ctrl+N, and Ctrl+P still ask. | on |
completedelay | cmpd | How long typing pauses, up to 2000 milliseconds, before completion asks, so a burst of keys asks once. 0 asks at every key. | 40 |
completeaccept | cmpa | What Enter does with the menu open: accept the item you moved to (picked), always accept (enter), or never (ctrl-y), leaving it to Ctrl+Y. | picked |
completetab | cmpt | Tab accepts the picked item too. | off |
signaturehelp | sig | Shows the signature of the call you're typing the arguments of. | on |
highlightuses | hlu | Lights the other uses of the name the cursor rests on, as the language server says; where it's given a value a little brighter. | on |
inlayhints | ih | Writes what the language server says between the code: names' types and arguments' parameter names, dim, never part of the text. <Space>th toggles it. | on |
languageinstall | li | What happens when a file is opened in a language, or with a language server, that isn't installed but can be: ask in the bottom bar, install it always without asking, or never offer. | ask |
The clipboard #
| Option | Short | Is | Starts |
|---|---|---|---|
clipboard | cb | Which of the desktop's the unnamed register goes along with, for what's yanked or deleted in an editor and yanked in a terminal or a chat: the clipboard (unnamedplus), the primary selection (unnamed), or neither (none), keeping it the window's own but for "+ and "*. | unnamedplus |
osc52 | osc52 | What programs in a terminal can do with the clipboard through OSC 52: copy, paste, copy-paste, or off. What they copy goes to "+ and "* too. Reading is off unless allowed, since whatever runs in the terminal would get the clipboard. Only the window that last typed into the terminal acts, and text is capped at 1 MiB. | copy |
pasteimage | pi | How Ctrl+Shift+Alt+V pastes an image into a terminal: path, kept in a file on the terminal's machine whose path is pasted, or clipboard, put on that machine's clipboard and Ctrl+V typed, which needs a desktop session there. A chat attaches the image either way. | path |
Terminals #
| Option | Short | Is | Starts |
|---|---|---|---|
blockmarks | bm | Which finished commands a terminal marks at the end of their prompt's line, where the shell says how they ended: those that failed, with a red ✗ and their exit status (failed), every one, with a faint ✓ for those that worked (all), or none (none). | failed |
predictecho | pe | Shows what's typed in a terminal at once, underlined, before its echo comes back: auto for a daemon on another machine whose round trip is over 30 ms or has stalled moments before, always, or never. | auto |
Agents #
| Option | Short | Is | Starts |
|---|---|---|---|
agent | ag | The agent :Agent and Ctrl+B a open a chat with: claude, codex, gemini, or one the daemon's config adds. Empty leaves it to the daemon. | claude |
agenttools | agt | What a new chat's agent can do with clackatoo's tools: ask before running commands or typing, allow commands in its own terminals, or off. | ask |
claudetask | ct | A new Claude Code chat keeps Claude Code's own Task tool, which runs helpers inside one turn, folded under the Task's card. Off, Claude hands work on only as subagents, which you can watch. Other agents have no such tool. | off |
chatbrowser | cbr | A new chat starts with its Browser setting on, so its agent can drive a headless browser with a profile of its own. Off, a chat has none until you turn it on in its settings. | off |
chatcost | chc | Under each chat turn, what it spent, its tokens and, where the agent says, its cost; and what the session cost, in the chat's usage detail (see what else a turn says). | on |
carryover | co | About the most of a chat's conversation, in tokens, that an agent the chat moves to hears, from 1000 to 50000, but never more than a quarter of its context. | 20000 |
notify | ntf | Which chats you can't see get a desktop notification: all (those that finish, fail, or ask something), questions, or off. A program's own notifications show unless it's off. | all |
rewindfiles | rwf | What rewinding a chat, or switching its branch, does to the files the turns it takes out changed: ask each time, undo them, or keep them. :rewind! undoes them without asking. | ask |
The window #
| Option | Short | Is | Starts |
|---|---|---|---|
smoothscroll | sms | Ease mouse-wheel scrolling in native panes, and all scrolling in the settings menu. Trackpad pixels stay direct; keyboard motions and jumps in panes stay immediate. | on |
whichkeydelay | wkd | How long, up to 5000 milliseconds, keys that start others, as Space does, wait before a panel lists what can come next, so keys typed quickly never flash it. Keys held with Ctrl or Alt, as Ctrl+B, show it at once; 0 shows it at once for every key. | 400 |
ime | ime | Type through the desktop's input method, as Chinese, Japanese and Korean are typed and as an emoji picker sends its emoji, while keys type text. Off, keys go straight to the pane, in case the input method gets in the way. | on |
explorerwidth | ew | How wide a file explorer opens, in columns: 0 is 30, or a quarter of the tab if that's narrower; otherwise from 10 to 200. | 0 |
explorerhidden | eh | File explorers show hidden files when they open. | off |
updatecheck | uc | Look for a new release at most once a day, a while after the window opens, and say so in the bar. It sends one request to api.github.com, saying the version. | on |
renderer | — | The graphics API windows draw with: vulkan, fastest where it works well, or opengl, which on some machines with two GPUs opens a window much sooner. It's read from startup.toml as the window process starts, so :set can't change it: :setpersist renderer=opengl saves it for windows opened after. | vulkan |
priority | — | Whether windows run ahead of your other programs (high) or as they do (normal). Read from startup.toml as the window process starts, so only :setpersist changes it, for windows opened after. | high |
Other machines #
| Option | Short | Is | Starts |
|---|---|---|---|
showhost | shh | When a workspace from another machine shows its machine after its name, as notes@desk: only while another workspace has the same name (ambiguous), always (always), or never (never). | ambiguous |
forwardpace | fp | Forwarded ports hold themselves back on a slow link so keys don't wait behind them. Off, they take the whole link. What the daemon sends changes for connections made after it's changed; what the window sends changes at once. | on |
Setting an option that doesn't exist, or to a value it can't hold, such as
client.opt.number = 1, is a mistake. renderer and priority are read only
as a window opens, so client.opt reads them but can't set them, and neither
can :set.
One window's own: setlocal #
:setlocal, or :setl, sets an option for this window alone, over the value
every window shares, as Vim's :setlocal does for its window-local options.
It takes what :set takes. These can be set so:
font, fontsize, number, relativenumber, numberwidth, cursorline,
colorcolumn, wrap, linebreak, breakindent, showbreak, scrolloff
| Written | Does |
|---|---|
:setlocal nowrap | Turns wrapping off in this window, leaving the others as they are. |
:setlocal wrap< | Takes this window's own value away, so it has every window's again. :set wrap< does too. |
:setlocal wrap& | Sets this window's own to how it starts. |
:setlocal | Shows this window's own values. |
:verbose setlocal wrap? | Shows it, and says whether it's this window's own. |
:set in a window sets the value every window shares, and takes that window's
own value of it away, so it shows what was set; other windows keep theirs. So
does setting client.opt in a handler of a key pressed in the window, once
the config has loaded. While the config loads, and in a handler of a chat's
turn ending, which is every window's, it sets only the value every window
shares.
:setlocal values aren't saved: :setpersist saves the value every window
shares, and a reload takes them away.
The font a window is opened with, --font and --font-size or
CLACKATOO_FONT and CLACKATOO_FONT_SIZE, is its own in the same way: the
config setting the font as it loads doesn't change it, but :set in that window
does. A reload, and :set font&, put it back.
client.opt reads the value every window shares while the config loads, and
in a handler of a chat's turn ending; in a handler of a key, it reads the
window's the key was pressed in, its own if it has one, as Neovim's vim.o
reads the current window's.
Saving options: settings.lua #
:setpersist, or :setp, is :set that also saves what it sets, so it's set
again after a :reload, and whenever clackatoo's windows open again. Like
:set, it changes every window open at once. It takes what :set takes, and
Tab completes the same:
:setp nowrap colorcolumn=80,120
Most options are saved in client/settings.lua, beside init.lua. The font,
its size, renderer and priority are saved in
startup.toml instead, as the window
needs them before any Lua runs, keeping the rest of that file, comments
included. :setp number& puts an option back as it starts and takes it out of
the file.
clackatoo writes settings.lua, and says so at its top. It holds a line for
each option saved, set as your config would set it:
-- Written by clackatoo, whose :setpersist and settings menu change it.
-- Your own config goes in init.lua, which runs after this and outdoes it.
client.. = false
client.. =
It runs before init.lua, so anything init.lua sets outdoes it. An option
your init.lua sets as it loads, or a module it requires, isn't saved: :setp
sets it for now, and the bottom bar says which line of yours sets it, such as
client/init.lua:12 sets wrap, so it's set for now and not saved. Change that
line instead, or take it out.
Each save reads the file again and changes only the saved option's line, so
saving from one window never undoes what another saved, and everything else
stays as it was: blank lines, comments, a comment after a value
(client.opt.wrap = false -- too narrow here), and options this build doesn't
know, saved by a newer one. An option saved for the first time goes among the
options at the end of the file, in the order they're listed here. A block
comment, --[[ … ]], is kept whole, so an option commented out in one stays
commented out, and saving it adds a line of its own. The file is replaced all
at once, never left half written, off the window's thread, keeping its
permissions; a new one is readable only by you. If settings.lua or
startup.toml is a link, as stow and home-manager make, the file it links to
is changed and the link kept; the bottom bar says if its folder can't be
written in.
If the file has a line clackatoo didn't write, such as code, or a block comment
it can't follow, as one that doesn't end, nothing is saved, and the bottom bar
names the line: move it to init.lua. A line settings.lua can't set, such as
an option a newer build saved, is said in the bottom bar, and the rest are set
all the same.
Where an option was set #
:verbose set shows what last set each option it shows, as Vim's does:
:verbose set wrap? cc? nu?
nowrap · set in client/init.lua:4 colorcolumn=80,120 · saved in client/settings.lua:5 number · as it starts
An option can be as it starts; set as the window opened, by startup.toml or
the command line; saved in settings.lua; set in your config as it loaded,
with the line, and the line of a module's helper that really set it if that's
elsewhere, as client/init.lua:3 (in lua/opts.lua:8); set by your config after
it loaded, by a handler or a binding; or set with :set or a key. A :set
your config runs, with client.cmd, is your config's, at its line. Your config
is loading until each file has run to its end, even one that waits partway, as
pane:split waits. An option set in a coroutine of your own, one made with
coroutine.create or coroutine.wrap, is said to be set at a line of that
coroutine's, as only its lines can be seen from there.
The settings menu #
:Settings opens a menu of your settings over the panes, in one of two
modes: Easy, pages of the settings most people change, each with a
control, and Advanced, every option and every key bound, as a list to
search. :Settings wrap opens it searching for wrap. The cog at the top
bar's right, a button's width apart from the window's buttons there, or at
the right edge if they're on the left, opens it too, in the mode used last,
and closes it again; it's lit while the menu is open.
Easy and Advanced #
The header has the title, one search box, the switch between the two modes
and a close button. The menu opens in the mode used last, in any window, and
in Easy the first time. m, or a click on the switch, changes mode, keeping
what's typed in the search.
Easy groups its pages into General (Appearance, Editor, Terminals, Keys, and Phone & other machines) and Agents (Agents, Specialists, Skills, MCP Servers and Permissions), each with its own icon; in a window too short for them all, the pages down the side scroll to the one shown. The Agents page has separate native-plugin opt-ins for Claude Code and Codex, off by default, and under Servers from the agent's own configuration, whether agents also use the MCP servers of their own settings.
The last four of those list things rather than settings: specialists,
skills, MCP servers and permission rules, for the project of the pane that
was focused when Settings opened, which each says under its title, with the
daemon's machine if it's another. Each has one button by its title, which
a presses too, and Enter opens what the keys are on. A
specialist, a server and a rule open as a form: only the fields that apply,
Save and Cancel along the foot, and what's wrong with a field said
under it. In a form every key is the form's: typing on a field starts it,
Enter finishes it and goes to the next, Tab and
Shift+Tab go between the rows with something to press
or type into, Esc stops typing, Ctrl+S
saves, and the letters that act elsewhere in the menu do nothing. A button
that takes something away asks for a second press, which any other key or
click takes back, and Enter in the field before it never goes on
to it. A form with changes is never thrown away without asking:
Esc, Cancel, the cog, a click off the panel, the keys that go
back to normal mode and a :Settings run over it ask first, and do it if
asked again. Asking ends typing in a field, so one more Esc is
the answer. A reply that comes late from the daemon never replaces or closes
a form begun since. A list is read when its page is shown, after anything
done on it, and when a lost connection comes back; a page with nothing to
list says why. The search finds servers, specialists, skills and rules by
name, as well as settings. The foot names the keys that work on the page
shown.
A click acts only on a control; on the rest of a row, it takes the keys
there. A settings page has rows in
cards under small headings: what the setting does in words, a line of help,
and its control at the right, drawn as such: a switch, buttons side by side,
a slider, a number between − and +, a card for each agent, the font picker
or a box to type in. Some controls set several options together: Line
numbers is Off, On or Relative, which sets number and relativenumber.
Appearance starts with a sample of a terminal's text and an editor's, drawn
in your font and size, with line numbers and the cursor's line as set; while
the size's slider is dragged, the sample is drawn at the size it's at, and
the size is set when it's let go.
Easy shows what's configured, what the menu saves. A setting changed since
your config loaded, with :set or a key, says what it is currently under its
help. One your init.lua sets as it loads is greyed out, with the place it's
set, as init.lua:12, which a click or Enter opens. A change saves
at once, and the foot of the menu says what was saved where, as "Saved
nonumber norelativenumber in client/settings.lua", one write for the two. u undoes a row's last change,
in either mode: a control that set several options undoes them together.
The Keys page lists the keys for what's done most, such as a new tab or a split: Record… records more keys for one, as Advanced's keys section does. Every key, in every mode, is in Advanced.
A page longer than the menu scrolls, by the wheel, a touchpad, or the keys
moving to a row out of view, a bar at its right saying where you are; so do
Advanced's list and the font picker. With smoothscroll on, as it starts,
they glide there, as panes do; off, they jump. A touchpad's own motion is
always followed as it comes. Rows part way out of view are cut off at the
page's edge, and a click goes to what's drawn where it lands.
Easy leaves out what few change: numberwidth, showbreak, shiftwidth,
startofline, tildeop, inccommand, hintpattern, completedelay,
completeaccept, carryover, explorerwidth, renderer and priority.
Some rows are the daemon's settings, which the
daemon saves in its own daemon/settings.lua: on Terminals, Keep what
terminals showed and Lines kept of each terminal after a restart, and
Wide emoji; on Agents, the notification When a long command
finishes, the Subagents working at once, the native plugins and the
servers from the agent's own configuration; on Permissions, Who answers
agents' requests; and each switch on Skills. They show once the daemon
has said them, so not with a daemon from before them. One your
daemon/init.lua sets is greyed out with its place, as your window's
init.lua is. One the daemon reads only as it starts says it takes effect
at the daemon's next upgrade or restart, lit while a change waits for that.
If the daemon's config
doesn't run as its files are now, the foot of a page of its settings says
why, and the daemon goes by what last ran. In a window whose daemon is on
another machine, they're that daemon's, and the header says so, as daemon on desk.
The search finds what Easy has, then what only Advanced has, which says in Advanced: Enter or a click on one switches to Advanced, with it picked. While you type a search, the arrows and letters only type, and Tab or Enter leaves the box. A click off the menu closes it, as Esc does, though the window's edges, top bar and buttons still work. Everything works by the mouse, as it looks, and by the keys:
| Key | Does in Easy |
|---|---|
j, k; Down, Up | The next or previous row; on the pages down the side, the next or previous page |
| Tab, Shift+Tab | The next control, on to the next page's first; or the one before, and from the first, the pages |
}, { | The next page, or the one before |
l, h; Right, Left | The next or previous value: on or off, a choice, a card, or a number by its step; from the pages, l goes into the page |
| Enter, Space | Changes the row: turns it on or off, the next choice, opens the font picker, types a value, or records keys; or opens where a locked row is set |
/ | Searches both modes |
r, u, o | As in Advanced, below |
m | Switches to Advanced, or back |
Esc, q | Clears the search or puts away the font picker, or else closes the menu |
Advanced #
Down Advanced's left are its sections: the options' groups, as they're listed
here, then Keys, then the daemon's, group by
group: This machine, The daemon's agents, Chats agents start, The web app,
What terminals keep and The daemon's terminals. Each row is an option and its
value, its name in bold if it isn't as it starts; beside the list, the row
picked is said in full: its value, its default, what it takes, where its
value comes from, as :verbose set
says it, and the file it's saved in.
| Key | Does |
|---|---|
j, k; Down, Up | The next or previous row |
gg, G; Home, End | The first row or the last |
Tab, Shift+Tab; }, { | The next section, or the one before |
/ | Searches the names, short names and what each does, as the finder matches; Enter stops typing and keeps what's found |
| Enter, Space | Changes the row: turns it on or off, picks the next choice, types a value, picks a font, or records keys |
l, h; Right, Left | The next or previous value: on or off, a choice, or a number up or down |
r | Puts the option back as it starts, and out of its file |
u | Undoes the row's last change, one at a time, even after the menu is closed and opened again |
x | Takes away this window's own value, as :setlocal nu< does |
d | Takes keys the menu saved out of settings.lua |
o | Opens the line of config that set the row |
m | Switches to Easy |
Esc, q | Clears the search, or else closes the menu |
A change applies at once, in every window, as :set does, and is saved where
:setpersist saves
it: in settings.lua, or for the font, its size, renderer and priority,
in startup.toml, which takes effect
for windows opened after; the font and its size change in this one too.
renderer and priority are only saved, for windows opened after.
The font picker lists the monospace font families installed, those whose
font says so or whose letters are all as wide, with the system's monospace
font first, and the font in use whatever it is. Tab lists every
family, as fc-list : family does, or only the monospace ones again. A value
typed, as for
colorcolumn or showbreak, is written as :set takes it after =.
Locked. An option your init.lua sets as it loads is locked: it would
outdo anything the menu saved, so the menu says where, as init.lua:12 at the
row's end, and changes nothing. Enter on it opens that line in an
editor beside the focused pane, by the daemon on this machine, where your
config is. If the window's daemon is on another machine, the bottom bar says
so instead, and nothing opens there.
Configured and current. An option changed since your config loaded, with
:set or a key, says both: "configured 4, currently 7", and not saved at
the row's end. Changing it in the menu changes what it's configured to as
well.
This window's own. An option this window has a value of its own for, from
:setlocal, says so
at the row's end, and x takes it away.
The daemon's. A daemon option is changed by the daemon: the window asks
it, and it saves the option in daemon/settings.lua, changing only that
option's line, as the window's settings.lua is changed, then runs its
config with it. If the config won't run with it, as
daemon.subagents.default more than daemon.subagents.working wouldn't,
the file is put back as it was, and the foot of the menu says why. One your
daemon/init.lua sets is locked, and Enter opens that line on the
daemon's machine. One the daemon reads only as it starts says so beside it,
and restart at the row's end while a change waits for its next upgrade or
restart; the rest take effect at
once, for what the daemon starts from then on. A web device never sees them,
and the daemon refuses a change from one.
Keys #
The Keys section lists every key bound, in every mode, those bound alike
in several as one row, with what each does and what bound it: as the window
starts, settings.lua, or a line of your config. Enter on one
records more keys to do the same: press them, then Enter.
Backspace takes the last one back, and Esc gives up.
They're bound at once, and saved in settings.lua as keys bound to the
binding's keys, in the same modes:
client..
Keys your config binds as it loads are locked, as options are, and so are
keys it binds to a function, which settings.lua can't hold: bind more keys
to those in init.lua. d takes keys the menu saved out of settings.lua,
in the row's modes, and puts back what the window binds them to as it starts,
if anything; the bottom bar says if settings.lua no longer binds them. A
row is keys bound alike in several modes by the same thing, so keys saved for
some modes and bound otherwise in others are rows of their own. u after
recording keys over ones saved before binds those again.
:mappersist, or :mapp, does the same from the command line: modes, keys,
and the keys to type, the rest of the line, as Vim's :map takes them:
:mappersist niv <A-t> <C-b>c
It's refused for keys your init.lua binds as it loads, and the bottom bar
names the line.
Bindings in settings.lua go at the end of the file, after its options.
Saving one changes only the lines binding its keys, and those only in its
modes: a line binding them in the same modes is changed where it is, keeping
its comment; a line binding them in other modes too keeps those, as
client.keys.map("niv", …) taken out in iv is left "n". So the last line
binding the keys in each mode, which is what counts, is always the one saved
last.
The menu is the window's own: options are the window process's, not the daemon's, so the web app doesn't list them.
Events and handles #
client.on("keypress", function) listens for keys anywhere. Windows, tabs and
panes have :on too, to listen only there. Each returns a subscription, whose
:off() stops it. A pane's or tab's handlers go when it closes, and a
window's when it closes.
client.on("turnend", function) hears a chat's turn end: its agent finished,
or failed. It's heard once, however many windows show that daemon's chats, so
a config can count turns or notify once. It can't be stopped, and only
client.on hears it, as a chat's turn ends for every window. Its handler gets
ev.chat, the chat's number, ev.title, ev.agent (as "Claude Code"),
ev.failed (true or false, or nil from an older daemon that doesn't say),
and ev.window and ev.pane, the window that heard it and the pane showing
the chat there, if one does.
client.
A handler gets the event, ev:
| Field | Is |
|---|---|
ev.key | The key, as a binding writes it, such as <C-b> or q |
ev.keys | For a binding, all of its keys |
ev.text | The text the key types, if any |
ev.mode | The mode's letter |
ev.count | For a binding, the count typed before its keys, 0 if none, as Vim's v:count |
ev.count1 | The same, but 1 if none, as v:count1 |
ev.pane, ev.window | Where it was pressed |
These are a key's. A chat's turn ending has its own, above.
A binding that lets its keys go on passes the count on with them, so 5x
bound to a function that calls ev:propagate() still deletes five.
Windows, workspaces, tabs, and panes are handles: values that stand for one of them, whose fields are read as they are at the time. Reading a pane that has closed is a mistake. Two handles to the same pane, found through the same window, are equal.
| Fields | Methods | |
|---|---|---|
client | windows, focused (the focused pane of the window with the focus), opt | on, keys.map, keys.unmap, keys.group, cmd, forward, connect, disconnect |
| A window | workspace, tab, pane | on |
| A workspace | name, tabs | on |
| A tab | name, panes, focused, workspace | on |
| A pane | kind ("terminal", "chat", "editor", "explorer", "folder", "board", "review", "browser", or "other" for a kind this window doesn't know, or one on a machine not shared with it), title, tab | on, split, close, focus |
pane:split(side) puts a new pane on that side, "right", "left",
"below" or "above", of the same kind, or another with { kind = "chat" }
or { kind = "terminal" }. Those are the only kinds the config can make, so
splitting any other pane, such as an editor,
needs one. It waits for the daemon to make it, then focuses it, as
Ctrl+B | does, and returns it:
client..
While it waits, the window carries on, and so does the key. Each handler and binding runs in a coroutine, a function that can pause partway and carry on later, so waiting holds up nothing else.
Nothing is shown while init.lua first runs, so client.focused is nil then:
handles are for handlers. The first window is in client.windows already, to
listen to with client.windows[1]:on.
The daemon's config #
The daemon, which runs terminals, agents and the web app for every window, has
a config of its own, also in Luau: daemon/settings.lua, which clackatoo
writes, then daemon/init.lua, your own, which runs after it and outdoes it.
Each sets settings through daemon, a table for each group of them:
-- ~/.config/clackatoo/daemon/init.lua
daemon.. = "jack-desktop"
daemon.. = "tailscale"
daemon.. = 20000
-- An agent of your own, and Claude Code run another way.
daemon.. =
daemon.. =
A setting reads back what it is, the default until something sets it, so
print(daemon.history.lines) prints 10000, and nil puts it back as it
starts. daemon.agents is a table by name, so
daemon.agents.mine.tasks = false changes one set above, = nil takes one
out, and for name, agent in daemon.agents do … end goes through them
(pairs finds none, as the table only stands for them). A name that isn't a
word is written daemon.agents["my agent"]. Agent fields are described in
Which agent.
Specialists are defined separately in
SPECIALIST.md files and edited in Settings; Lua does not define them.
require loads modules from daemon/lua/, or else the lua/ shared with the
window's config, by a name of letters, digits, _ and -, a dot being a
folder, as the window's does. Where an option was set, the file and line, is
kept, as for the window's.
When it runs #
The daemon runs its config as it starts, and each time it upgrades, on a thread of its own, before it does anything else; a config of a few dozen lines takes about a millisecond.
It watches its files too: daemon/settings.lua, daemon/init.lua, and the
modules they require, in daemon/lua/ and lua/. A quarter of a second
after one changes, it runs the config again, on a thread of its own, never
holding up the terminals. What can change as the daemon runs does, at once,
for what it starts from then on: the agents new chats can start
with, the limits on chats agents start, whether agents go on through
upgrades, the notification when a long command ends, how terminals started
then lay out emoji, and how many lines of terminals' history are kept, and
how often. The rest, as the daemon's options say,
is read only as the daemon starts: clackatoo upgrade, which keeps every
terminal and agent running, takes it in.
Changes made outside clackatoo are said #
When the config runs again as its files changed, and not for a change you
made in the settings menu, every window says what it changed of what runs
programs, lets the web in, or keeps lines programs mark secret: any field of
any agent, any specialist, a limit on chats agents start raised, any web.
option, and any hints. option loosened, as daemon.hints.noagent = "show". The bar says each, with what it was and what it is, as config changed outside clackatoo: agents.claude command: { "claude-agent-acp" } → { "other" }, and the daemon's log says it too. Nothing waits on it: the
change has applied, as any other does. If it isn't yours, put the file back.
Saving daemon/init.lua yourself is said as well, as the daemon can't tell
your editor from an agent's.
What this guards against #
Nothing, on its own: it tells you. An agent that can write your config as you can write any other file of yours too, and run what it likes; nothing in clackatoo stands in its way once it can. The daemon tells a window from an agent by what the connection is, a window's or an agent's tools', not by which program opened it: any program of yours can open its socket. What an agent may write and run is the agent's own permissions' to say, as Claude Code's are: they're the boundary. Keeping agents from writing clackatoo's folders is planned.
What clackatoo does keep from an agent is what it does through clackatoo: an
agent's keys, or a chat with Control of a window, can't change the daemon's
settings in the settings menu, nor the window's options that run programs or
reach the network, with :set, :setp or the menu.
It runs in a sandbox. There's no io or os, nothing that loads code but
require, and require reaches only those two folders. Luau's bytecode is
never run, only text. A run may take half a second and 64 MB, or it's stopped
where it is, and stays stopped, so a pcall can't carry it on: a loop that
never ends can't hold up the daemon. As the daemon upgrades, its terminals
waiting, a run may take a fifth of a second. The build an upgrade is to is
asked first whether agents go on through it; it answers from what last ran,
never running your init.lua for it.
When it goes wrong #
A mistake never stops the daemon. A value a setting can't hold, a name that
isn't a setting, a Lua error, or a run stopped for taking too long, stops the
config there, and none of what it set is used. Instead the daemon keeps what
the config set the last time it ran without a mistake, kept in
daemon-config.lua in clackatoo's state directory (~/.local/state/clackatoo).
With none kept, as when no config has run yet, it goes by its defaults, but
with terminals' history and the web app off until one has. It writes why in
its log, and the first window you're at says so in its bar, with the file and
line of the mistake that stopped it:
the daemon's config went wrong, so it kept its settings from the last time it ran: daemon/init.lua:4: daemon.history.lines is a whole number from 1 to 1000000
A config that stops running once the daemon has started, as you edit it, is the same: the daemon goes on by what it has, and every window says why in its bar, as does the settings menu, until the files run again.
Some settings are checked together, once the config has run, at the line that
set the one that can't be: daemon.subagents.default more than
daemon.subagents.working, daemon.images.terminal_mb more than
daemon.images.total_mb, or a web app set to
public without its certificate, key and origin.
Moved from TOML #
The daemon was set before in daemon/agents.toml, machine.toml and
web.toml. The first time a daemon with this config starts or upgrades, and
finds them there and no settings.lua, it moves every value they set into
settings.lua, a line each, with their comments, and keeps the old files
beside it as agents.toml.bak and so on. machine.toml's [terminals]
becomes daemon.terminals. A value the config can't hold, or a
key that was never a setting, is written commented out, saying why, so the
rest still runs. A field an agent or specialist never had is left out alone,
keeping the agent, as before. If any of web.toml is left out, so is its
mode: the web app stays off until it's put right, as it did when web.toml
went wrong. Every comment written is a line comment of its own, with nothing
in it that could end it or open a block comment.
It goes in order, each step only once the one before has worked: the web
app's password to the state directory (see
the phone); then settings.lua, once it
compiles; then the old files to .bak, web.toml's without its password, so
no password stays in the config folder. If a step fails, the old files stay
as they are and are read as they would have been, and the first window you're
at says why. When it works, that window says what was moved, and what was left
out.
That happens once. A TOML file there after it is passed over: the daemon's log and the first window you're at say so, and it can be deleted.
What outdoes it #
As for the window, the environment outdoes the config, for tests and CI:
CLACKATOO_HISTORY (a folder, or off), CLACKATOO_HISTORY_LINES,
CLACKATOO_HISTORY_EVERY and CLACKATOO_IMAGE_MEMORY (as 64,256) over the
settings below, and CLACKATOO_AGENT over the command of the agent a chat
gets when it asks for none. CLACKATOO_CONFIG names a folder to take the
config from in place of ~/.config/clackatoo, keeping the web app's password
and the last settings that ran in state in it, never in your own state
directory; or it's off for none, as tests' daemons run.
The daemon's name #
daemon.machine.name names this machine's daemon, as other machines show it.
Without it, the daemon takes the machine's hostname.
daemon.machine.priority = false has the daemon run as other programs do,
rather than
ahead of them.
Each daemon also has an ID of its own, chosen the first time it starts and
kept in machine in clackatoo's state directory (~/.local/state/clackatoo),
or in $CLACKATOO_MACHINE. Deleting that file makes the daemon a new machine
to every other; copying it to another machine makes the two refuse each other
until one of them deletes it. CLACKATOO_MACHINE=off chooses a new ID at
every start, as tests do.
The daemon's options #
Each is set as daemon. and its name, such as daemon.web.mode = "public".
Those of this machine, the web app, daemon.history.keep and the images'
limits are read only as the daemon starts or upgrades; the rest change as its
config runs again (see When it runs). The
settings menu changes any of them.
This machine #
| Option | Is | Starts |
|---|---|---|
daemon.machine.name | The name other machines show this one by, as connections list them. | none |
daemon.machine.priority | The daemon takes a higher priority and a place of its own, ahead of other programs. | on |
Agents #
| Option | Is | Starts |
|---|---|---|
daemon.upgrade.keep_agents | Agents go on through an upgrade, with what they run, rather than being stopped and started again (see agents through upgrades). | on |
daemon.permissions.engine | Default engine for new chats: provider or clackatoo. Existing chats keep their selection. See permission rules. | provider |
daemon.permissions.rules | JSON array of literal Allow, Ask and Deny rules. Edited in Settings → Permissions. | [] |
daemon.plugins.claude | Allow Claude Code's native plugins and skills alongside shared skills. Takes effect after a daemon restart or upgrade. | off |
daemon.plugins.codex | Allow Codex's native plugins and skills alongside shared skills. Takes effect after a daemon restart or upgrade. | off |
daemon.skills.disabled | The shared skills never offered to any agent, by name, with spaces or commas between them. | none |
daemon.mcp.providers | Allow provider-managed MCP servers alongside clackatoo's managed servers. Takes effect after a daemon restart or upgrade. | off |
daemon.mcp.claude | Claude Code override: inherit, off, or allow. Takes effect after a daemon restart or upgrade. | inherit |
daemon.mcp.codex | Codex override: inherit, off, or allow. Takes effect after a daemon restart or upgrade. | inherit |
Chats agents start #
How far chats agents start may go.
| Option | Is | Starts |
|---|---|---|
daemon.subagents.working | The most chats agents started that may work at once, in all, from 1 to 64. | 16 |
daemon.subagents.default | A new chat's Subagents setting, from 0 (off) to working. Unless it's set, it's no more than working. | 6 |
daemon.subagents.open | The most chats agents started open under one of yours, from 1 to 256. | 32 |
daemon.subagents.started | The most chats agents start under one of yours between two of your messages there, from 1 to 10000. | 128 |
daemon.subagents.depth | How deep chats agents start go, from 1 to 8. | 3 |
daemon.subagents.hops | The longest chain of messages between agents, from 1 to 64. | 6 |
daemon.subagents.notice_turns | The most turns notices of chats finishing start under one of yours between two of your messages there, from 1 to 10000. | 100 |
The web app #
How phones and browsers reach the daemon: see the phone.
| Option | Is | Starts |
|---|---|---|
daemon.web.mode | off, tailscale (through tailscale serve) or public (straight from the network, over TLS). | off |
daemon.web.socket | With tailscale, the unix socket tailscale serve connects to. None is web.sock in the web app's data. | none |
daemon.web.login | With tailscale, the only Tailscale login let in. None is the first device's, which only a window can let in. | none |
daemon.web.address | With public, the IP address listened on. | 0.0.0.0 |
daemon.web.port | With public, the port listened on. | 8765 |
daemon.web.certificate | With public, the certificate chain's PEM file, read again when it changes. | none |
daemon.web.key | With public, the certificate's private key's PEM file. | none |
daemon.web.origin | The address the app is reached at, as https://host:port: requests for any other, or from a page anywhere else, are refused. Needed with public. | none |
daemon.web.expire_days | Days a device can go unused before it's unpaired, from 1 to 36500. | 90 |
daemon.web.password_days | Days before the password is asked for again, or 0 for never. | 0 |
daemon.web.ask | A device may ask to be let in from a window. | on with tailscale, off with public |
daemon.web.lock_after | Wrong passwords in a row before pairing with the password locks, from 1 to 10000. | 50 |
What terminals keep #
| Option | Is | Starts |
|---|---|---|
daemon.history.keep | Terminals' scrollback is kept across restarts. | on |
daemon.history.lines | The most lines kept of each terminal, from 1 to 1000000. | 10000 |
daemon.history.every | How often, in seconds, the scrollback of terminals that changed is written, from 1 to 86400. | 30 |
daemon.images.terminal_mb | The most MiB of images each terminal, chat, picture pane or Markdown buffer may hold. | 64 |
daemon.images.total_mb | The most MiB of images they may hold together. | 256 |
The daemon's terminals #
How the daemon's terminals behave, for every window.
| Option | Is | Starts |
|---|---|---|
daemon.terminals.notify_after | How many seconds a command must run for its end to be told in a notification while you aren't looking at its terminal, up to 86400. 0 tells none. | 10 |
daemon.terminals.vs16 | Variation selector 16 widens an emoji to two columns. Terminals already open keep what they started with. | on |
daemon.hints.hide | Lines programs mark hidden: mask masks them until you ask to see them; show shows them. | mask |
daemon.hints.nosave | Lines programs mark nosave are never written to disk. | on |
daemon.hints.noagent | Lines programs mark noagent: hide keeps them from agents; show lets agents read them. | hide |
daemon.hints.shown_for | How many seconds hidden lines you asked to see stay shown, from 1 to 86400. | 30 |
When it goes wrong #
A mistake, such as a key that doesn't exist, a mode that isn't one, or a pane
that has closed, is shown in the bottom bar, with the file and line, until the
next key, and written in full to the window's log, window.log in clackatoo's
state directory (and to stderr, for a window opened in a process of its own).
A mistake in init.lua itself stops it there, as an error in any Lua program
does: what it bound before that line stays bound.
init.lua can run for 2 seconds before it's stopped where it is. A handler or
binding that runs for more than a quarter of a second, as a loop that never
ends would, is stopped there, and its key is decided as if it had done nothing
more. The quarter second is counted from when it starts, or what it waited for
comes, until it finishes or waits again, across its slices.
print writes to the window's log, window.log in clackatoo's state
directory, which keeps what it prints unless RUST_LOG says otherwise (and to
stderr, for a window opened in a process of its own).
Known limits #
- The daemon's config only sets settings: it has no events or handles yet.
- The settings menu has no colour options yet, as no option is a colour. The
web app's password isn't one of its settings:
clackatoo web passwordsets it. - A config file that's a link, as stow makes, is watched where the link is:
an edit of the file it goes to, made elsewhere, isn't seen until
:reload, or for the daemon's, the next change beside the link. - The settings menu can't record Enter, Esc or Backspace as keys, nor Ctrl+;, which closes it.
- Bindings made in Lua don't show in Ctrl+B's list in the bottom bar.
- Keypresses and chats' turns ending are the only events.
client.optcan't set a window's own value::setlocalcan, throughclient.cmd.- There are no type definitions for editors to complete the API with.
Editing Files
clackatoo / Reference
An editor pane edits one file, with Vim's keys. Its text lives in the daemon, in a buffer, as a terminal's screen does, and each window showing it keeps a copy that it changes as you type, so a key never waits for the daemon.
:e src/main.rs edit a file in a new tab
:|Editor src/main.rs the same, beside the focused pane
:w write it
:q close the pane
These pages cover the editor, each listed with its sections:
- Files and Buffers: Opening a file, Folders, Buffers, Writing, Recovery.
- Languages and Language Servers: Languages, Language packs, Language servers, Trusted folders, Completion.
- Registers, Macros, and Marks: Registers, Macros, Marks.
- Substituting and Lines: Substituting, Lines.
- The Editor's View: Git signs, Agents' changes, Line numbers, Tabs and indenting, The view, Rendered Markdown.
- Editor Keys: Keys, Moving, Shown as you type, Lit matches, Jumps, Changing, Insert mode, The mouse, Known limits.
Files and Buffers
clackatoo / Reference
An editor shows a buffer: the text of one file, kept by the daemon, which every window showing the file edits together.
Opening a file #
| Command | Does |
|---|---|
:e PATH, :edit PATH | Opens the file, or the folder's listing, in place of what the pane shows, as Vim's do; from a terminal, in a new tab. :e . shows the folder of the file shown. |
:e, :edit alone | Opens the explorer at the folder you're in, the folder of an editor's file or a terminal's, beside an empty file with no name yet, where :e PATH would put a file: in place of an editor's file, or in a new tab. The explorer has the focus. |
:Editor PATH | Opens the file, or the folder, in a new tab; with no path, the focused pane's folder. |
:|Editor PATH, :|<Editor PATH, :-Editor PATH, :-^Editor PATH | Opens it beside the focused pane: right, left, below or above, as the split marks do for terminals. |
clackatoo edit [PATH] | From a shell: opens it, a folder too, in a new tab of the workspace last used; with no path, the current directory. See the CLI. |
An image file opens in an image pane, fitted, to zoom and move about in, rather than as text.
A relative path is from the focused pane's directory: for a terminal, the
directory of the program in front, as for a new terminal; for an editor, the
directory its file was opened from. ~/ is your home directory.
A file a pane stops showing, as after :e, closes too, unless another pane
shows it, or it has changes that aren't written: then it's kept, unseen, the
bottom bar says so, and :e it again to go back.
A file that's already open is shown again, not read again: two panes on one file are two views of one buffer, each with its own cursor. A file that doesn't exist yet opens empty, and is made when it's first written. A file that isn't UTF-8 text can't be opened, and the bottom bar says so. Nor can anything but a regular file of up to 256 MiB, such as a pipe or a device, even one put in a file's place while it's open: it's never waited on or read. A save writes the new text to a new file beside the old one, made with a name no one can guess, and puts it in the old one's place, so nothing put beside the file can make a save write anywhere else.
A file with no name yet, as :e alone makes, is called [No Name]. Nothing
is written until :w NAME names it, from the folder it was opened in; :w
alone asks for the name on the command line. Nothing could open it again once
no pane shows it, so while it has changes the daemon refuses to close, or to
show anything else in, the last pane showing it, whoever asks: :w NAME
writes them, :q! closes it, :e! empties it.
Folders #
An editor shows a folder as its listing, as oil.nvim does: an entry on each
line, folders ending /. The first line is .., except at /:
Enter or a double click on it goes up, and deleting or moving it
changes nothing. It's the
explorer's listing,
edited the same way: change a line to rename, delete one to delete (to the
trash), add one to make a file, or a folder if it ends /. :w lists every
change, and asks under them; y makes them, n goes back. Once they're made,
the folder is listed again. In a listing, r leaves each line's hidden mark
and the .. line as they are; J, and deleting, changing or putting over
characters across lines, are refused, since they would join entries: act on
whole lines instead. > and < are refused too, since a name can start with
a space.
| Key | Does |
|---|---|
| Enter | On a file, opens it in the listing's place; on a folder, goes into it; on .., the first line, goes up |
- | Goes up a folder; in a file, shows the folder it's in, with the cursor on the file |
g. | Shows hidden files, or hides them, as explorerhidden starts them |
A listing with changes isn't left until they're made or thrown away: :e!
throws away every listing's changes, and :q! closes the pane. One with no
changes is listed afresh whenever its folder changes on disk, and a folder
you've left as it was stops being watched. The finder (<Space>pf) is rooted
at the folder shown, and a relative :e path starts there. Going into a
folder, up from one, and from a listing to a file are jumps:
Ctrl+O and Ctrl+I go back through
them, landing on the entry the cursor was on. If a folder with changes
disappears from disk, y makes none of them.
Buffers #
The daemon keeps each buffer, as it keeps terminals:
- Every window edits the same text. Edits made in one window, or by anyone else, show in the others, and move their cursors with the text around them.
- Edits made at once meet. If an agent edits a file while you type in it, both edits are kept, and every copy ends up with the same text. The daemon puts edits in order, and brings each one up to date past those made since, by operational transformation, as Google Docs does.
- Undo undoes your edits, not anyone else's.
utakes back your last change, from whichever window you made it in, and leaves an agent's edits made since in place. See the files an agent changes. - Nothing is lost when the window closes, or the daemon upgrades. Buffers come through an upgrade with their undo history. Changes not written outlive a crash or a stop too: see Recovery.
Each command in normal mode is one undo step, as is each go of insert mode,
with the command that started it, such as cw.
Undo is the daemon's, one history per file that every window shares: each step
keeps where the cursor was and the file's last selection as it began, which
follow other windows' and agents' edits made since, so an undo puts them back
whoever edited meanwhile. Undo keeps your last 1000 steps in each file, or as
many as fit in 64 MB. Past that the oldest are let go, and u past the oldest
one kept says so in the bar. The daemon also keeps the last 32 MB of edits
made to each file, to bring up to date an edit a window made before it heard
of others'. A window that has fallen further behind than that, or so far that
bringing its edit up to date would hold up the daemon for more than a few
milliseconds, catches up itself and sends its edit again. You don't see this
happen, except with a window from before protocol 92, whose edit that far
behind isn't made: it keeps its own text, as when a change couldn't be made,
until :w! or :e!. An edit of more than 16,384 pieces, as :%s over a big
file can make, is sent with neighboring changes joined into one, so marks
between them move as if the text between had been typed again.
A file whose lines end with CRLF, as Windows ends them, is edited with plain line ends, and written with CRLF again, as its first line says; a file that mixes the two is written all one way. Its git signs compare it line by line, but it's staged a change at a time in a terminal, not here.
A buffer closes with its last pane, unless it has changes that aren't written.
:q won't close that pane, and :q! throws the changes away. A pane closed
another way, such as with Ctrl+B x or by closing its
tab, keeps the buffer's changes, unseen: opening the file again shows them.
Writing #
| Command | Does |
|---|---|
:w, :write | Writes the file, formatting it first if the option formatonsave is on. |
:format | Formats the file, as its language server does, as one undo step. If the server won't format the file, the bar says why: "not formatted: …". |
:'<,'>Format, :{range}Format | Formats only those lines, as the language server does, as one undo step. Any changes the server makes outside them are made too, as :format's are. If the server can't format part of a file, the bar says so. |
:w! | Writes it even if it's changed on disk since it was read or last written. |
:wq, :x | Writes it, then closes the pane. :wq! writes it even if it's changed. |
:w NAME, :w! NAME, :wq NAME | Names a file with no name yet and writes it there, from the folder it was opened in; not over a file that's there, unless with !. In a file that has a name, it's refused. |
:q, :quit | Closes the pane, unless it's the last showing a file with changes not written. |
:q! | Closes the pane, throwing away the file's changes not written. |
:e! | Throws away the changes not written, reading the file again. That's an edit like any other: u brings the changes back. |
Writing writes a new file beside the old one, with its permissions, then
renames it over the old one, so the file is never half written. If something
else has changed the file since it was read or last written, :w refuses, so
as not to write over the change; :w! writes over it. The bottom bar shows
[+] after the file's name while it has changes that aren't written.
When something other than an agent changes the file on disk, such as a git
checkout or another editor, a file with nothing unwritten is read again, as
Vim's autoread does. That's an edit like any other, so u takes it back.
With changes not written, yours stay, :w refuses, and the bar says the file
changed: :e! takes it, :w! keeps yours. A file over 4 MB is never read
again by itself: the bar says it changed. Turn autoread off to be told in
every case.
Recovery #
Changes not written, a [No Name]'s too, are kept on disk as you make them,
so they outlive the daemon crashing, being killed or stopping, or the machine
going down, as Vim's swap files do. Each buffer with changes has a file in
~/.local/state/clackatoo/recovery, for you alone: the folder is 0700, each
file 0600. It's written a second after you stop typing, and every few seconds
while you don't (less often for a big file), by a thread of the daemon's own,
so a key never waits for the disk. It goes once the file is written, its
changes are thrown away with :e!, or they're undone. A buffer over 64 MB
isn't kept, and the bar says so. CLACKATOO_RECOVERY sets another folder for
the daemon, or off for none. Only one daemon at a time keeps the files in a
folder: a second one keeps none, and says so. An upgrade hands the folder to
the next build.
When the daemon next starts, each comes back unseen, as a file with changes
not written does after :q: opening the file shows it.
| What came back | What happens |
|---|---|
| A file unchanged on disk since | It opens with its changes, not written yet, and the bar says so. :w writes them, :e! drops them, and u puts the file's text back. |
| A file changed on disk since | It opens as it is on disk, and the bar says its changes were set aside. :recover takes them, as an edit u takes back, or, if you've changed the file since, opens them beside it as a [No Name]; :recover! drops them. Nothing is written until you write it. |
| A file already open, as after an upgrade | Its text is never replaced: what came back is set aside, as above. |
A [No Name] | It comes back with no name. :recover shows it. |
| Command | Does |
|---|---|
:recover, :rec | In a file whose changes were set aside, takes them. Otherwise shows the next file or [No Name] that came back that no pane shows: in place of an editor's file, or in a new tab. |
:recover! | Drops a file's changes that were set aside. |
As the daemon starts, it takes back at most 64 files or 256 MB at once;
:recover takes back the rest, one at a time.
Languages and Language Servers
clackatoo / Reference
A file is colored by its language's grammar, and checked by its language server, both of which clackatoo offers to install when you first open such a file.
Languages #
A file in a language that's installed is colored as the language's grammar reads it: keywords, strings, comments, functions, types, and so on.
Opening a file in a language that isn't installed, but that clackatoo knows where to get, asks in the bottom bar:
Install toml's grammar and taplo? [Y/n]
y or Enter installs the language, and its
language server if that isn't installed either. The bar
says when it's done, and the file is colored and checked straight away. n
means it's never offered again. Any other key leaves the question unanswered,
and does what it would have done. Each window asks once about each language,
so a window opened later asks again. The question waits while a terminal has
the focus, or the command line is open.
The option languageinstall decides
what happens instead: ask, always (install without asking) or never.
clackatoo language installs languages
from the command line too:
clackatoo language list what can be installed, and what is
clackatoo language install rust install one, or several, with their servers
clackatoo language install --all install every one
clackatoo knows where to get Bash, C, CSS, Go, HTML, JavaScript, JSON, Lua,
Python, Rust, TOML, TypeScript (and TSX) and YAML. A file's language is found
from its name: its extension, such as .rs, or the whole name, such as
.bashrc.
How it works:
- Grammars are tree-sitter's, compiled to WebAssembly by their authors, and run in the daemon by wasmtime. A grammar can't reach anything outside itself, so one that goes wrong can't take the daemon, and every terminal it keeps, with it. Nor does a new language need a new clackatoo.
- The daemon parses each file once, whichever windows show it, on a thread of its own, so typing never waits for a parse. After an edit, only what it changed is read again: about a tenth of a millisecond in a big source file. The colors of text you've typed follow within a frame or so; until then, the colors already there move with the text.
- Opening a file reads it all, which takes about 50 ms for an 80 KB file in a language not used since the daemon started, most of it getting the grammar ready, and less after.
Language packs #
Each language is a directory in ~/.local/share/clackatoo/languages (or
$XDG_DATA_HOME/clackatoo/languages), which clackatoo language install
writes, and you can write yourself for a language clackatoo doesn't know:
| File | |
|---|---|
language.toml | grammar: the grammar's name, which the WebAssembly is built with (tree_sitter_NAME). extensions: the endings of the names of files it's for, without the dot. filenames: whole names of files it's for. server and roots, if given: its language server. word, if given: the characters its words are made of besides letters, digits and _, as Vim's iskeyword adds them, as a string ("-") or a list (["-", "?"]) of ASCII punctuation; with word = "-", w, e, b, iw, * and completion take margin-top as one word. A pack that doesn't say takes what clackatoo's own pack of its name says: CSS's is -, and the rest have none, as in Neovim. |
grammar.wasm | The grammar, as tree-sitter build --wasm makes it. Many grammars' releases have one. |
highlights.scm | The query naming what each piece of text is. Where two patterns name the same text, the first wins, as grammars' own queries are written: nvim-treesitter's queries expect the last to win, so the more particular patterns come first here. A query that never names the same text twice reads the same either way. |
textobjects.scm | Optional. Where its functions, classes and arguments are, written as nvim-treesitter-textobjects writes them: @function.outer and @function.inner, @class.outer and @class.inner, @parameter.outer and @parameter.inner. clackatoo language install gets it; install a language again to get it for a pack installed before. Without it, they're found by the kinds of the grammar's nodes. |
indents.scm | Optional. How its lines are indented, written as nvim-treesitter writes it: @indent.begin, @indent.end, @indent.branch, @indent.dedent, @indent.align, @indent.zero, @indent.ignore, and @indent.auto. clackatoo language install gets it; install a language again to get it for a pack installed before. Without it, a new line keeps the indent of the line before, and = says so. |
= "rust"
= ["rs"]
= []
A query's names are colored by the first part: @function.method.call as a
function, @string.escape as an escape. A pack the daemon can't load is
passed over, and its log says why.
Language servers #
A language server is a program that knows a language well enough to say what's wrong with a file as you write it, such as rust-analyzer for Rust. It speaks LSP, the Language Server Protocol, which most editors share. When you open a file in an installed language whose server is installed, its mistakes are underlined with a wavy line: red for errors, yellow for warnings, blue for information, and cyan for hints. With the cursor on a line with one, the bottom bar says what it is, after the cursor's place:
main.rs 12:9 error: mismatched types [E0308 rustc]
That's the one under the cursor, or else the one on the line that matters most.
The worst on each line is also written dimly after the line's end, in its
color, as far as the pane has room, unless the
option virtualtext is off; and the
line's number takes its color. ]d goes to the next mistake and [d to the
one before, round the file's ends.
K asks the server what's under the cursor and shows it in a panel under the
cursor, or over it where there's more room, as wide as its text up to 80
columns, scrolling past 20 lines. Headings and strong text are bold, and code
is on a faint band. Code in a fenced block is colored in the language its tag
names, such as rust or py, or in the file's own language if it has no tag,
once the daemon has read it; code in a language that isn't installed stays
plain. The name the server says it's about is underlined while the panel is
shown, until the panel closes or the text there changes. What's wrong there
comes first, in full. Ctrl+W d shows only what's wrong
there, in full.
grn renames what's under the cursor everywhere the server knows of it,
asking in the bottom bar for the new name. The new name starts selected, so
what you type replaces it; an arrow key, Home or End
keeps it to edit, and Backspace, Delete or
Ctrl+W clears it. A server that can tell is asked first
whether there's anything there to rename: if there isn't, the bar says so at
once, in the server's words if it gives any; if there is, the new name starts
as the server suggests, or as the name it would rename. With any other server
it starts as the word under the cursor. Files that are open are changed as if
you'd typed it, one undo step each, so every window sees it. Files that aren't
open are written: all of them, or none, if one can't be, or has changed
meanwhile. A rename that would make, rename or delete files, or write outside
the project, is refused, as is one touching over 200 files that aren't open.
gra asks the server what it could do to the text under the cursor, or to
what's selected in visual mode, such as fix what's wrong there or rewrite it,
and shows it in a menu by the cursor: quick fixes first, and those the server
would pick before the rest. j and k, the arrows, Tab,
Ctrl+N, and Ctrl+P move through
it; Enter does the one picked, and 1 to 9 the one so numbered;
Esc or q closes it. Its changes are made as grn's are, as if
you'd typed them, one undo step in each file, and refused the same way. An
action that runs one of the server's commands runs it, one at a time, and the
changes the server makes while it runs are made the same way; changes a server
makes unasked are refused. The bar says how it went.
<Space>bs lists the file's symbols in
the finder, as the server knows
them, in the order of the file's outline. <Space>ps finds symbols in the
whole project. Enter goes to the one picked.
Once the cursor rests on a name in normal mode, the other places it's used in
the file are lit, as the server says: where it's given a value a little
brighter than where it's read. They go once the cursor leaves the name, the
text changes, or the mode does. The
option highlightuses turns this off.
A server that can also writes notes between the code, dim and italic: the type
of a name bound without one written, as : u32 after let total, and the
name of the parameter an argument is for, as count: before it. They're never
part of the text: the cursor steps over them, motions, searches and yanks
don't see them, a click on one lands on the character after it, a long line
wraps with them, each staying with its character, and colorcolumn runs
straight past them. While you type, the cursor's line shows none; they come
back once typing pauses. They're asked for the part of the file in view and a
screenful either side. <Space>th, or the
option inlayhints, turns them off.
12 let total = count + "1"; ■ cannot add `&str` to `u32`
Trusted folders #
A language server can run the code of the project it reads. rust-analyzer
builds and runs a crate's build scripts and procedural macros;
typescript-language-server loads the plugins tsconfig.json names from
node_modules; gopls runs the go command, which can fetch and run another
toolchain. So a server starts only for a folder you've trusted. The first time
a file's server would start for a folder you haven't said anything about, the
bottom bar asks:
Trust ~/src/cloned-thing? Its language servers may run its code (y/n)
- The folder is the project the server would start for (see below), named
as the daemon's machine names it, with any character that could hide or turn
round what's around it shown by its number, as
<U+202E>. - It's asked while an editor showing a file of that folder has the focus,
in normal mode, with nothing half typed, and neither the command line nor
the finder open; until then it waits. So a file an agent opens beside its
chat asks only once you go to it. A file moved or saved under a new name
into a folder not trusted asks too. A file on another machine names it, as
in
Trust ~/src/thing on desk?, and is trusted there. - A window older than the daemon's trusted folders isn't asked, as it
can't answer: its files get no servers until you run
clackatoo trustfor the folder, or:trustin a newer window. ytrusts the folder, and its files open get their servers at once.nmarks it not trusted, and it isn't asked about again. Any other key leaves it unanswered, and does what it would have done; the bar says:trustruns its servers. Each window is asked once about each folder while it's connected.- Only a key you press then answers it. Not one a
macro or a key binding
types, nor one held while the window waited for something, nor one pressed
in the first half second the question shows, which says to press it again:
so a
ymeant for a yank, typed right as the question came, doesn't trust anything. Agents never answer it: no tool of theirs trusts a folder, and a window under an agent's native control refuses to send a trust. A device on the web app can't trust a folder either, and isn't asked. - A folder is trusted with everything inside it, but for a folder inside
it marked not trusted: the nearest folder marked, the project's own or one
it's in, decides. So
clackatoo trust ~/srctrusts every project under it, andclackatoo untrust ~/src/cloned-thingstill keeps that one out. - What's marked is the folder a server starts for, the project's root (see
below), so only a mark on that folder or one it's in counts. A Rust
project's root is the outermost folder with a
Cargo.toml: in a workspace of many crates, marking one crate's folder does nothing, as rust-analyzer starts for the workspace's folder.:trustedlists what's marked, and the question names the folder that counts. - Trust covers what a project gives agents, too. A project's
skills, skillsets and
specialists load in chats only from a trusted folder. A chat isn't asked:
a new one in a project not trusted says its skills aren't loaded, and
:trust FOLDERloads them. - A folder not trusted keeps its colors, which clackatoo's own parser
gives, and every editor key that doesn't need a server; it gets no mistakes,
K,gd, completion, renames, or formatting.
| Command | What it does |
|---|---|
:trust | Trusts the focused file's project, the folder its server starts for, and starts its servers. |
:trust DIR | Trusts that folder, from the focused file's directory, or else from home; ~ works. |
:untrust, :untrust DIR | Marks the folder not trusted: its servers stop, and it isn't asked about again. |
:trusted | Lists the folders marked, trusted or not, in the bar (:Messages shows it again). |
Only a :trust you type trusts a folder: one a macro, a key binding, or your
config runs is refused. clackatoo trust
does the same from a shell. The folders marked are kept in
~/.local/state/clackatoo/trusted (or under $XDG_STATE_HOME), readable by
you alone, so they're remembered across restarts and upgrades. A folder whose
name isn't UTF-8 is never asked about; clackatoo trust trusts it for the
daemon's run.
When a daemon from before trusted folders upgrades to one that has them, the
projects of the files open then, whose servers are installed, are trusted, as
their servers were running anyway. The daemon's log names each, and the first
window you use says how many:
trusted 3 folders whose language servers were running: :trusted lists them.
That's only ever said by an upgrade from such a daemon: deleting the file of
folders, or starting the daemon afresh, trusts nothing, and every other folder
is asked about.
How it works:
- The daemon runs the server, not the window, one for each project, and keeps each file open in it as it's edited, by anyone. Every window, and every agent, sees the same.
- A project is found from the file's place: the nearest directory above it
with one of the server's root files, such as
go.mod, or else the nearest with a.git, or else the file's own directory. A file right in your home directory has no project, and no server, rather than make the whole of home one. A Rust project is the outermost directory with aCargo.toml, so a workspace of many crates has one rust-analyzer, not one each. - Only what changes is sent after each edit, for servers that can take that, which most can.
- A question asked again cancels the last. A newer
K, completion or call help from the same window about the same file tells the server to stop working on the one before, and an answer that comes anyway is ignored. So do a newer search of the project's symbols, the file's symbols asked again, and a rename's check. Inlay hints asked again cancel only those asked for a part of the file the new question covers, so two panes on one file never cancel each other's. Another window's questions are never canceled. - A server starts when a file of its is first opened, if its folder is trusted, and stops five minutes after the last closes, so going to a library's file and back, or closing a project's files and opening another soon after, doesn't make it read the whole project again. A file gone to from an answer, such as a library's definition, is opened in the server that answered, not one of its own. One that stops by itself is started again at once, for the files of its on screen; if it stops by itself again, it's left stopped until its project's files are all closed, and the daemon's log says why. Servers don't come through an upgrade: they start again as their files are next shown. A server stopped is asked to shut down, then told to exit, as LSP asks, and killed if it hasn't gone a second later. The daemon stops its servers the same way when it stops or upgrades, waiting at most a second and a half. What a server writes to stderr reaches the daemon's log, its last lines too. A server that stops listening is still read for a moment, so its last answers arrive, but it isn't asked anything more: questions, and commands from code actions, fail at once with "its language server has hung up". A server runs in a process group of its own, so stopping it also ends whatever it started (before Linux 6.9, only the server's own process).
- A server's big answers don't hold up typing. A message of 256 KiB or more is read, and later freed, on a thread of the daemon's own, so a 60 MB list of a project's symbols doesn't stop a key's echo in another pane. What the server sends after it waits behind it, so its messages are still taken in the order it sent them, and an answer sent right before a server stops still arrives. A message longer than 64 MiB stops the server, and the daemon's log says how long it was.
- Servers hear of files changed on disk, by git, an agent or another
editor, if they ask, as rust-analyzer does: a file made, written or deleted
is told them a tenth of a second later, a few at a time. Only folders inside
the server's project are watched, never
.git, what.gitignoreleaves out, ortarget,node_modules,.venvand__pycache__, and the servers share up to 3072 of them. A file open in a buffer isn't told of, as the server has it from the buffer. A server that asks for nothing still hears of changes to files it has said are wrong.
clackatoo knows each installed language's usual server, so nothing needs
setting up. A server that isn't installed is offered along with
its language, or on its own when the language is installed but the server
isn't. The daemon looks for a server's program on PATH first, only in its
absolute directories (an empty or relative one, such as ., would find a
program in the project, which anyone could have filled), and runs it by the
path found, giving it that PATH; then in ~/.local/share/clackatoo/servers,
where clackatoo installs servers, each in its own directory:
- A server with a release built for Linux is downloaded, from its own GitHub releases, at the version clackatoo was tried with, and checked to be exactly that file: rust-analyzer, taplo, lua-language-server, and clangd. clangd has no build for ARM.
- A server published to npm is installed with npm, at a pinned version:
pyright, typescript-language-server (with TypeScript 6, as 7 has no
tsserver), the CSS, HTML and JSON servers, yaml-language-server and bash-language-server. Without npm, these aren't offered. - gopls is installed yourself, with
go install golang.org/x/tools/gopls@latest.
| Language | Server |
|---|---|
| Rust | rust-analyzer |
| Go | gopls |
| Python | pyright-langserver --stdio |
| JavaScript, TypeScript, TSX | typescript-language-server --stdio |
| C | clangd |
| Lua | lua-language-server |
| Bash | bash-language-server start |
| CSS, HTML, JSON | vscode-css-language-server, vscode-html-language-server, vscode-json-language-server, each with --stdio |
| TOML | taplo lsp stdio |
| YAML | yaml-language-server --stdio |
A pack's language.toml can name another, or none:
# The command that starts it, speaking LSP on its stdin and stdout.
= ["pylsp"]
# The files that mark a project's root.
= ["pyproject.toml", "setup.py"]
server = [] turns a language's server off.
Lines past the end of the file show a faint ~.
Completion #
As you type a word in insert mode, the language server is
asked what could finish it, once typing pauses; a character it names, such as
., asks at once. Ctrl+Space,
Ctrl+N, and Ctrl+P ask too. The
menu under the cursor narrows as you type, best first. Each item's label
starts under the word you're typing, with its letters that match in blue, then
its detail, dimmed, and its kind, dimmed, at the right. When the menu is too
narrow, the detail is cut short first, then the label, and in a very narrow
pane the kind goes. The picked item's documentation shows in a box of its own
beside the menu: what it is, dimmed, then under a line, what it does.
The word completed is the one before the cursor as the file's language reads
it. Where the server doesn't say where the word starts, an item whose text
starts with what's right before it, such as libcap-tools after libcap-t,
takes that in too, rather than being put in twice.
| Key | Does |
|---|---|
| Ctrl+N Ctrl+P, Down Up | The next item, the one before |
| Ctrl+Y | Accepts the picked item |
| Enter | Accepts the item you moved to; with none moved to, a new line, as the option completeaccept says |
| Ctrl+E | Closes the menu |
| Esc | Closes it and leaves insert mode |
Accepting puts in the item, and any import it needs elsewhere in the file, as
one undo step with what you typed, which . repeats. A snippet, such as a
function with its arguments, goes in with places to type. Its lines after the
first take your line's indent, and its tabs are what Tab would put
in. Its first place's text is selected: typing replaces it, and
Backspace deletes it. What you type in a place is copied to the
places that mirror it as you type, and a place with choices shows them in the
menu. Tab goes to the next place, and from the last to the
snippet's end; Shift+Tab goes to the place before.
Tab is Tab again once you reach the snippet's end, press
Esc, or move out of it. Filling it in is one undo step with the
rest of what you typed, and . types what you left, indented as the line it
types on.
While you type a call's arguments, its signature shows over the cursor, with the argument you're on in bold.
Registers, Macros, and Marks
clackatoo / Reference
Registers hold what you yank and delete, macros replay keys you recorded, and marks remember places, as in Vim.
Registers #
What's yanked and deleted is kept in registers, as in Vim. " and a
register's name before a command keeps text in it, or puts it from it: "ayy,
"ap, "_dd. A count can go either side: 2"a3yy copies six lines.
| Register | Holds |
|---|---|
"" | What was last yanked or deleted: what p puts when no register is named. |
"0 | The last yank with no register named. |
"1 to "9 | Deletes of a line or more, newest first. "1p then . puts "2's, and so on back. |
"- | The last delete within a line, with no register named. |
"a to "z | Whatever's kept in them. "A to "Z add to them, on a line of their own if either is lines. |
"_ | Nothing: what goes to it is thrown away, and the others keep theirs. |
"+ "* | The clipboard, and the primary selection that a middle click pastes. |
A terminal's normal mode yanks into the same registers, "a before y too,
so p puts a line copied from a terminal as a line, and so does a chat's (see
Yanking). Text selected with the
mouse there goes only to "*, as in Vim.
A block is kept as one, its rows a line each, and p and P put it back as
one: a row on each line from the cursor's, padded with spaces where text
follows, and on new lines past the end. :Registers marks it b.
As the option clipboard says, the unnamed register goes along with the
clipboard by default, as Neovim's unnamedplus does: what's yanked or deleted
can be pasted anywhere, and p puts what was last copied anywhere. Deleting
nothing, as D on an empty line, leaves them alone. The window reads the
clipboard and the primary selection when it gets the focus, off to one side,
so a program slow to answer for them never holds it up. In visual mode, p
and P put in place of what's selected; p keeps what was selected, as a
delete, and P doesn't. :Registers lists them by the cursor.
Macros #
q and a register records the keys you press, until q; the bar says
recording @a meanwhile, in every pane you move to and below a search or
command line you type. Every key is kept, whatever has it: the editor, a
terminal, the command line, the finder, or a binding. So a macro can run :w,
move to another pane with Ctrl+L, or open a file with
<Space>pf. @ and the register types the keys again, as if you pressed them
now, through your bindings as they are now; @@ types the last one again, and
a count that many times: 100@a. Each file a macro changes takes one u to
undo. The keys are kept as text, written as bindings are
(A;<Esc>:w<CR><C-l>j), so "ap puts them in the file to change, and "ay$
keeps them again. An item picked from the completion menu is kept as the text
it put in, and a snippet as the text you left in it, not the keys that filled
it in.
A key that fails stops the macro, as in Vim: a motion that can't move, a
search that finds nothing, an empty register, a command that isn't one or is
refused, Enter in the finder with nothing picked, or a write the
daemon refuses. So a macro ending j@a goes down the file and stops at its
end. When a key starts something that takes a moment, such as gd, :w,
opening a file or a search in the finder, the macro waits for it before its
next key, and keys you press meanwhile wait behind it. After 5 seconds it
gives up and says what it waited for; Esc stops it at once, and so
does moving to another pane yourself while it waits. Recording and replay work
in every text and list pane in normal mode; see
macros and marks across panes.
A macro typing through a terminal's normal mode or a chat stops there the same
way, at a motion that goes nowhere, a search that finds nothing or a command
they refuse; keys after a terminal's search or [[ wait for the daemon's
answer, as they wait for a chat's search.
Marks #
m and a letter marks the cursor's place: a to z for each file on its
own, A to Z anywhere. `a goes to it, and 'a to its line; both are
jumps, and an operator takes them: d'a deletes the lines from here to the
mark's. A mark in another file opens it in place, as :e does. `. goes
to your last change. Marks move with the text, whoever edits it, and lines
:m moves take theirs with them; once no pane shows a file, its marks keep
their lines. :Marks lists them in the finder. '< and '> are the last
selection's start and end, which gv selects again, kept as Vim keeps them
(see gv below); by lines, '< is the first line's start and '> the last's
end. They follow lines :m moves too, so the binding
client.keys.map("v", "J", ":m '>+1<CR>gv=gv"), the keys of a well-known
Neovim mapping, moves the lines selected down a line at a time, and keeps them
selected.
Substituting and Lines
clackatoo / Reference
:s replaces what a pattern matches, and :g runs a command on every line
that matches, as in Vim.
Substituting #
:s/pattern/replacement/flags replaces what matches on the cursor's line, or
in a range typed before it: :%s/old/new/g replaces every match in the file.
Patterns are Vim's, as / reads them too: \( \), \|, \+, \{n,m},
\< \>, \s \d \w and their kin, \v for fewer backslashes, \zs and
\ze, \c and \C. Case is matched as ignorecase and smartcase say. An
empty pattern is the last search's, and :s makes its pattern the last
search, for n.
| Range | Lines |
|---|---|
12 . $ | Line 12, the cursor's, the last. |
12,20 .,$ | From one to the other. |
% | Every line. |
'a '<,'> | A mark's line; the last selection's lines, which : in visual mode starts with. |
/pat/ ?pat? | The next line that matches, or the one before. |
.+3 $-1 | Counted on from another. ; between two counts the second from the first. |
| Flag | Does |
|---|---|
g | Every match on a line, not only the first. |
c | Asks about each in the bottom bar: y replaces it, n leaves it, a replaces the rest, l replaces it and stops, q or Esc stops, Ctrl+E and Ctrl+Y scroll. |
i I | Ignores case, or matches it, whatever the options say. |
n | Counts the matches, replacing nothing. |
e | Says nothing if nothing matches. |
& | The last :s's flags, with these. |
r | With no pattern, the last search's rather than the last :s's. |
In the replacement, & and \0 are the match, \1 to \9 its groups, \r
and \n a line break, \t a tab, ~ the last replacement, and \u \l
make the next character a capital or small, \U \L the rest, until \E.
& does the last :s again on the cursor's line, without its flags; g& on
every line, with them and the last search's pattern. :&& keeps the flags,
and :~ uses the last search's pattern. A count after it does that many lines
from the range's last: :s/x/y/ 3.
Each :s is one undo step, however many lines it changes. While you type it,
what it would do shows in place, as Neovim's inccommand shows it, with the
replacements lit; the file isn't touched until Enter, and
Esc puts the view back. A :g being typed lights its pattern's
matches. When nothing matches, the bar says so and a macro stops, as in Vim.
Lines #
| Command | Does |
|---|---|
:g/pattern/command | Does the command on each line that matches: :g/TODO/d, :g/x/normal Atext, :g/x/s//y/, :g/^/m0 turns the file upside down. :v and :g! on each line that doesn't. All of it is one undo step. Marks move as lines are deleted. |
:d :y | Deletes or copies the lines, into a register if one's named: :2,5d a. |
:m 0 :t $ :co . | Moves or copies the lines after the line given; 0 is the top. Lines moved take their marks, and the last selection, with them, and so does undoing it. |
:normal keys | Types the keys on each line of the range, as in normal mode, then Esc. |
The Editor's View
clackatoo / Reference
Beside its text, an editor shows git's signs, the lines agents changed, and line numbers, and it can show Markdown rendered.
Git signs #
When a file is in a git repository, a column left of the line numbers shows how it differs from the file in git's index, as gitsigns.nvim does: a green bar beside lines added, a blue bar beside lines changed, and a red line under a line where lines after it were deleted. The signs follow your typing, and update a moment after you pause, or at once when something stages changes, in a terminal or anywhere else.
| Key | Does |
|---|---|
]c [c | The next change, or the one before, round the file's ends. A jump, so Ctrl+O comes back. |
<Space>hp | Shows the change at the cursor: its lines as they were, and as they are. |
<Space>hr | Puts the change at the cursor back as git's index has it. u undoes it. |
<Space>hs | Stages the change at the cursor, and only it, as git add -p would. |
:gitsigns preview_hunk, reset_hunk, stage_hunk, next_hunk and
prev_hunk do the same, so client.cmd can bind them to other keys. A file
with conflicts is compared with your side. A file git converts, such as one
whose line endings it changes, or that Git LFS keeps, shows its signs but is
staged in a terminal, not a change at a time. Files that git doesn't track, or
that are bigger than 8 MiB, have no signs.
Agents' changes #
Lines an agent changed and you haven't reviewed have a bar in a column right
of git's signs, in the chat's color, shown while a file has such lines
(agentsigns). They follow your typing; typing a line back as it was clears
it.
| Key | Does |
|---|---|
<Space>ga | Keeps the agent's change at the cursor |
<Space>gx | Rejects it: takes it out, unless you've changed its lines since |
<Space>c | Comments on the line, for the agent |
<Space>gr | Opens a review of the chat's changes (see Agents) |
:blame writes after each line an agent changed which chat and turn changed
it, and :blame again stops.
Line numbers #
Line numbers run down the pane's left. To begin with, the cursor's line shows
its own number, in clackatoo's yellow, and every other line shows how far it
is from the cursor, so the count for a motion such as 5j or 3dd can be
read off the screen. The numbers widen as the file grows, and a pane too
narrow for them to leave the text 12 columns shows none.
Three options choose them, as in Vim.
Set them in the config, or as you go with :set:
| Options | Show |
|---|---|
number and relativenumber, as they start | The cursor's line's number, and the others' distances from it. |
number alone (:set nornu) | Every line's own number. |
relativenumber alone (:set nonu) | Distances, with 0 on the cursor's line. |
Neither (:set nonu nornu) | No numbers. |
numberwidth is the fewest columns they take, with the space after them: 4 to
begin with.
Tabs and indenting #
A tab is drawn to the next column that's a multiple of tabstop: 4 to begin
with. >>, << and Tab in insert mode indent by shiftwidth
columns, which is tabstop's while it's 0, as it starts.
A file keeps the kind of indent it has, whatever the options say. >, < and
Tab indent with tabs or spaces as the first indented line among
those they change does, or else the nearest indented line around them.
expandtab, on to begin with, decides only where no line nearby is indented
yet: spaces while it's on, tabs while it's off.
> and < write each line's indent afresh, as many tabs as fit and spaces
for the rest, or all spaces. Empty lines stay empty. Changing tabstop with a
file open redraws its tabs, and the cursor and selection stay on their
characters.
A new line is indented as its language says, where its pack has the rules for
it. It takes the indent of the line before at once, so typing never waits, and
is put right a moment later, when the daemon has worked it out: usually within
a millisecond or two. What you type meanwhile stays after the indent, but if
you've typed in the indent itself, as a Tab or Backspace
does, or made another change, it's left as you made it. A line where }, ],
or ) is typed first is worked out again. So is a line that starts with
else, elif, elsif, elseif, except, finally, catch, rescue,
ensure, case or default, or with end, fi, done or esac, which
end blocks, once you've typed the word: the key after it, such as a space,
Tab, {, : or Enter, or Esc, finishes it.
Only a word you type counts, not one that was there or was pasted, nor a
longer word such as elsewhere. The rules decide the indent, so a word that
isn't one of the language's gets what = would give the line. :set nosi
turns this off, for new lines and these words, and a new line keeps the line
before's indent. = indents by the rules either way.
:set ts=8 sw=4 tabs 8 wide, indenting by 4
:set noet indent new lines with tabs
The view #
| Option | Does | Starts |
|---|---|---|
scrolloff | The fewest lines kept in view above and below the cursor, so what's around it shows as it moves. 999 keeps the cursor's line in the middle. | 5 |
cursorline | Lights the cursor's line faintly, across the pane. | on |
wrap | A line too long for the pane goes on over as many rows as it needs, rather than off the pane's edge. j and k still move by line; gj and gk by row. | on |
linebreak | Lines break between words, after a blank or one of !@*-+;:,./?. | on |
breakindent | The rows a line goes on over start as far in as it's indented, keeping 20 cells for text. | on |
showbreak | Drawn at the start of those rows, after the indent, such as :set sbr=↪\ . | none |
colorcolumn | Marks columns down the file's lines, such as :set cc=80,120, to keep lines short by. They count from 1, as the bottom bar's column does. | none |
The marks are drawn behind the text, and the selection over it. See the options for setting them.
Rendered Markdown #
<Space>tm, or :markdown, shows a Markdown file (.md, .markdown)
rendered, in place of its text: headings, lists, task lists, quotes, tables,
rules, links, and code colored as the editor colors its language, in a column
of prose down the pane. Again, it shows the text. Either way it keeps your
place: the rendered view opens with the block holding the line at the top of
the text's view at its top, and the text comes back with the top block's first
line at the top. It's a view of the file: what anyone changes, in another pane
or window or an agent's chat, shows as it's made.
| Key | Does |
|---|---|
j k, gj gk, Ctrl+E Ctrl+Y | A line, or as many as a count says |
| Ctrl+D Ctrl+U | Half a view, rounded down, or as far as a count before one set, a view at most |
| Ctrl+F, Page Down, Page Up | A view less two lines, which stay in view; a count goes that many |
gg G | The top, the end; 10G or 10gg, the block holding line 10 |
The keys are read as the text's are, so a count or g shows in the bar while
it's typed, and Esc forgets it. The wheel scrolls it too. Any other
key is the text's: the text comes back where the view was, and the key does
there what it does, so i types at the start of the top block, and /
searches the text. :w, :q, and the rest of the command line are the same
either way.
Selecting a link opens it: a web address with the desktop's opener, as a
terminal's links open, asking first, with where it goes shown whole, if it
isn't a plain http:// or https:// address or a mail address; a file in the
editor, in place of this one, as :e would, written from the Markdown file's
folder; and # and a heading scrolls to that heading, named as GitHub names
them.
An image a relative path names, from the Markdown file's folder, shows below
the block naming it, as wide as it is or as the column; its description stays
in its place, after ▣. An image from the web, or an absolute path, shows only
its description: nothing is fetched from the web. See
Images.
The option markdownview says how a
Markdown file opens: as its text, raw, to begin with, or rendered.
Editor Keys
clackatoo / Reference
The editor's keys are Vim's.
Keys #
An editor in a window of its own starts in normal mode, as in Vim. One you go
to takes the window's mode: in insert mode
it types at its cursor once its text has come, holding what you type until
then. A file opened from the explorer or a review opens in normal mode. The
bottom bar shows the mode, the file's name, and the cursor's line and column,
and before them a command half typed, as 2d or "a, as Vim's showcmd
shows it.
Moving #
| Keys | Moves to |
|---|---|
h j k l, the arrows | The next character or line. A count moves that many. |
| Space, Backspace | The next character or the one before, as l and h, but on over a line's end to the next line's start, or back to the line before's last character, as Vim's do. With an operator, a line's end counts as a character, so d and Space on a line's last character deletes it, and d and Backspace at a line's start joins it to the line before. |
+ Enter, - | The next line's first character that isn't blank, or the line before's. A count goes that many lines. With an operator, they take whole lines. |
_ | This line's first character that isn't blank, or with a count, that many lines down less one, taking whole lines: d2_ is 2dd. |
| Shift+Left Shift+Right, Ctrl+Left Ctrl+Right | As b and w, and B and W, as in Vim; in insert mode, either moves a word back or on. Ctrl+Home is gg and Ctrl+End goes to the last line's last character, or in insert mode the text's start and end. Shift+Up and Shift+Down page up and down in normal mode, and are Up and Down in insert mode and in menus. |
w b e | The start of the next word, the start of this one or the one before, the end of this one or the next. |
ge gE | The end of the word before, or of the run of anything but blanks before, back over line ends, stopping at an empty line. With an operator, they take the character under the cursor too. |
W B E | The same, for anything between blanks. |
0 ^ $, Home, End | The line's start, its first character that isn't blank (on a line of blanks, the last), its last character; 2$ the next line's last, a count that many lines down less one, as Vim's. Home is 0 and End is $. |
g_ | The line's last character that isn't blank, or with a count, that many lines down less one. |
| | The column a count says, counting from 1, or the line's last character if it's shorter, wanting that column on as j and k go. |
gg G | The first line, the last, keeping the column, as Neovim's do, or at its first character that isn't blank with the option startofline, as : and a line number do. With a count, that line: 12G and 12gg are line 12. A count works the same after an operator, so d3G deletes from the cursor's line to line 3, and y2gg copies from line 2 to the cursor's. |
]f [f | The start of the next function, or the one before, as the grammar finds them. A count goes that many. ]C and [C go to classes, structs, impls, traits, enums and interfaces. |
H M L | H and L the view's first and last lines shown whole, M the line half its rows reach; 3H and 3L count that many lines from the top or bottom. They keep scrolloff screen rows from the view's edges, unless it's at the file's start or end, but an operator takes to the edges: dL, yH, and with a count past the view's other edge as far as the text goes, as Vim's does: d99L to the text's start. They keep the column as gg does. |
% | The bracket that pairs with the one under the cursor, or with the next on its line: (), [] or {}, across lines, looking no further than 10,000 lines away. With a count, the line that far through the file, 50% half way, as Vim's: whole lines to an operator. |
{ } | The empty line before the paragraph, or after it; or the file's first line, or the end of its last. A count goes that many paragraphs, or nowhere if there aren't so many, as Vim's. With an operator, from a line's start, they take whole lines, so d} deletes the paragraph. |
( ) | The start of this sentence or the one before, or of the next, as Vim's go: a sentence ends at ., ! or ?, with any of ) ] " ' after it, before a space, a tab or a line's end, and at an empty line. A count goes that many, or nowhere if there aren't so many. At the text's end, ) goes to its last character, which an operator takes too. They're jumps. |
* # | Searches for the word under the cursor, or the next on its line, as a whole word: forward, or back. n and N go on. Case is ignored as ignorecase says, whatever smartcase says, as in Vim. |
f t F T and a character | The next one on the line, or the character before it with t; back with F and T. ; does it again, and , back, after an operator too, as d;. The window keeps one last find, as Vim does, so ; finds again what f found in another editor, a terminal's normal mode or a chat. A tab is one character to them: f<Tab> finds it. |
/ ? | Searches forward or back for a pattern, written as Vim writes it (see Substituting). n and N find the next and previous match, going round the file's ends. A count before either goes to that match, as 3/x, never going round more than once. Case is ignored unless the search has a capital letter, as ignorecase and smartcase start. Every match in view is lit up, the one found brighter, until Esc or :noh (see Lit matches). While you type, the cursor goes to the match it would find (see Shown as you type). |
gj gk | The next or previous screen row, where lines wrap; a count moves that many. With nowrap, as j and k. |
g0 g$ | The screen row's first or last character; with nowrap, the first or last in view. |
| Ctrl+D, Ctrl+U | Half the view's screen rows down or up, rounded down, the view and the cursor together. As Vim's, the view goes no further down than shows the file's last line at its bottom, and starts at a line's start where lines wrap, while the cursor goes as far as the view would have. A count sets how far they go from then on, a whole view at most, until the view changes size. |
| Ctrl+F, Page Down, Page Up | A view down, or up with Page Up, to the start of a line, as Vim's does: its screen rows less two, keeping two lines of what was in view where they fit, or one, or none, or a whole view with the text's end in view, and no further down than puts the last line at the top. Then the cursor goes to the first line shown whole, or the last going up, as many rows of whole lines in as scrolloff asks, as far as they fit. If the view can't move, nothing does. A count goes that many pages. With startofline, these and Ctrl+D and Ctrl+U put the cursor at its line's first character that isn't blank, as Vim's do. |
| Ctrl+E Ctrl+Y | The view a screen row down or up, or as many as a count says, keeping the cursor in view, scrolloff rows in, as the wheel does. While a panel by the cursor is shown, they scroll it instead. |
zt zz zb | Scrolls the cursor's line to the top, middle or bottom, zt and zb keeping scrolloff lines above or below it, with the view starting at a line's start, as Vim's does: where lines wrap, one that doesn't fit is left out. With a count, that line, the cursor going to it in the column it's in, as a jump, as Vim's does: 5zt. |
]d [d | The next mistake a language server found, or the one before, going round the file's ends. A count goes that many. |
gd gD gy gri | Where what's under the cursor is defined, declared, where its type is defined, or what implements it, as the language server says, as Neovim's keys go. A place in another file opens there in place of this one, as :e does. Several places open the finder on them, each with its line. |
grr | Everywhere what's under the cursor is used, its declaration included, as the language server says, in the finder, each with its line. |
K | What's under the cursor, as the language server says, in a panel by the cursor, with what's wrong there in full above it, its code colored and the name it's about underlined. K again pages through a long one, Ctrl+E and Ctrl+Y scroll it, and Esc, moving the cursor or an edit closes it. |
Ctrl+W d, Ctrl+W Ctrl+D | What's wrong under the cursor, or else on its line, in full, in the same panel. |
A word is letters, digits and _, and in a language whose pack says so, more:
in CSS, margin-top and --main-color are each one word to w, b, e,
iw, aw, cw, *, # and Ctrl+W in insert mode,
and to \<, \> and \k in a search, which take words as the motions do,
past ASCII too: * on the 中文 of x中文 searches for 中文, a word of its own,
as Vim's does. A search with \< or \> in such a file that would take too
long to finish says it's too complex, and changes nothing. W, B and E
are the same in every language, and terminals keep plain words. Past ASCII,
characters make words as Vim sorts them: in Latin-1, accented letters and µ
are letters, but ª, ² and ½ are punctuation and the no-break space is
blank; past it, CJK ideographs, kana, hangul and emoji are each a kind of word
of their own, apart from letters, so w goes from 中文 to the x after it. A
skin tone after an emoji, or after any other character, goes with it as part
of its word to the motions (dw on 👍🏽 takes it whole), though not after a
tab or at a line's start, and only up to four in a row; to *, #, \< and
\> a skin tone is punctuation, so * on 👍🏽 searches for 👍 with any tone
or none.
Shown as you type #
While you type a search after / or ?, the cursor goes to the match it
would find from where you started, the view follows, and its matches are lit
up, the one it would go to brighter, as Neovim's incsearch shows them. Each
key shows it afresh from where you started, Backspace too.
Esc puts the cursor, the view and what was lit before back;
Enter keeps them, and is the search, so n, the search history and
macros have it as they would without it. A pattern you haven't finished, such
as \( without its \), shows nothing yet, nor does a count before / until
Enter.
It's worked out once before each frame is drawn, not at each key, so typing
fast costs one search between frames, and a macro typing /foo and
Enter costs none. It looks no further than a megabyte from where
you started each way round the file's ends, and through no more than so many
matches going back. Where it can't be sure it would find what Enter
will, such as a match further away than that, matches along a very long line
found from part way along it, or a pattern that crosses line breaks in a big
file, it shows nothing until Enter, rather than a match
Enter wouldn't go to. Edits from elsewhere while you type move
where it started, and show at your next key. A pattern with \<, \> or \k
in it also reads the whole file once a key to check how its words are made, as
any search with them does. With the
option incsearch off, nothing moves
until Enter.
Lit matches #
After /, ?, *, #, n or N, every match of the search in view is lit
up, as Neovim's hlsearch lights them, and the one the search went to
brighter than the rest. :s, :g and a :/pattern/ address make their
pattern the last search, and light its matches, as in Vim. They stay lit as
you move, edit and scroll, until Esc in normal mode (leaving visual
mode keeps them) or :nohlsearch (:noh), and come back at the next search,
n or N. A terminal's and a chat's do the same. With the
option hlsearch off, only the match
found is lit.
Matches are found along each line from its start, or a few kilobytes before
what's shown of a very long line, one after another, as n finds them, so
they never overlap, and none is drawn over the one found. Only the lines in
view are looked through, with a few kilobytes around what's shown of each, for
a match that runs into view from before it, from an earlier line too, or on
past it, and at most 512 matches on a line; and only again when the text, the
view or the search changes, not at each n. So a huge file or a very long
line costs no more than a short one. A match starting at a line's break, as
/\nfoo finds, lights the cell after the line's end.
Jumps #
gg, G, 12G, Ctrl+Home,
Ctrl+End, H, M, L, %, {, }, (, ), ]c,
[c, ]f, [f, ]C, [C, `a, 'a, '', a search found with Enter,
*, #, n, N, ]d, [d, gd and its kin, zt, zz and zb with a
count, :12, :$, :+3, and :e are jumps: the window remembers where the
cursor was, and Ctrl+O goes back there, opening the file again in place of the
one shown if it has to, as :e does. Ctrl+I goes forward again. A count goes
that many places, as 3 Ctrl+O, or nowhere if there aren't that many. Moving
to another pane is a jump too (see
the window).
A jump from the line the last one left replaces it, so going back never stops twice on one line. A place moves with the text while a pane of the window shows its file, whoever edits it. Once none does, it keeps its line and column, as far as the file still goes.
` and a mark go to it, and ' to its line's first character that isn't
blank (see Marks). ''
and `` go back to where the last jump left in this file, and again to come
back. m' makes where the cursor is a place to come back to.
Changing #
| Keys | Does |
|---|---|
i a I A | Insert mode before or after the cursor, at the line's first character that isn't blank (after a line of blanks), at its end. I in a selection by characters or lines types at the start of the line its other end is on, or at the cursor if it's on a line before, as Vim's. |
o O | Insert mode on a new line below or above, indented as the language says, or as the cursor's line is where it has no rules. |
d, c, y and a motion | Deletes, changes, or copies what the motion moves over: dw, c$, y2j. |
d, c, y and an object | The same, for a text object: diw, ci", ya(. |
dd cc yy | Whole lines: the cursor's, and with a count, those after it. |
>> << | Indents the cursor's line by shiftwidth, or takes as much off its indent. A count does that many lines. |
~ | Turns over the case of the character under the cursor, and as many after it as the count, moving on past them. With tildeop, ~ takes a motion as g~ does. |
g~ gu gU g? and a motion or an object | Turns over, lowers or raises the case of what it moves over, or rot13s it: gUiw. Doubled, as guu or gUgU, the line. A character stays one character, as in Vim: ß goes up to ẞ. |
> < and a motion or an object | Indents, or takes off, the lines it moves over: >j, >i{, <G. |
== | Indents the cursor's line as its language says. A count does that many lines. |
= and a motion or an object | Indents the lines it moves over as the language says, in one undo step: =ip, gg=G, =af. Blank lines are emptied, and lines the rules say to keep, such as those in a string, keep their indent. Keys typed while the daemon answers wait their turn, as for af. |
x X, Del | Deletes the character under the cursor, or before it; a count deletes that many. Del is x; while a count is typed, it takes the count's last digit off, as Vim's. |
D C Y | Deletes, changes, or copies to the line's end: Y is y$, as Neovim's is, where Vim's copies the line; client.keys.map("n", "Y", "yy") makes it Vim's. In visual mode, Y copies the lines selected, whole, wherever on them the selection starts and ends, or a block as it is, as Vim's does. |
s S | Changes the character under the cursor, or the line. |
r and a character | Replaces the character under the cursor with it, or with a count that many: 3rx. If the line hasn't that many, it changes nothing and fails, stopping a macro, as Vim's. r and Enter breaks the line in their place, as Vim's: the blanks after them go, and the new line takes this one's indent. |
J | Joins the next line onto the cursor's, its indent taken off, with a space between, but none onto an empty line, after a space or a tab, or before a ), as Vim's. A count joins that many lines: 3J. |
p P | Puts what was last deleted or copied after the cursor, or before. Lines go on the line below or above. |
d, c, y and af, if, ac, ic, aa, or ia | A function and its body, a class (or struct, impl, trait, enum, interface) and its body, an argument with its comma and the argument, as the grammar finds them: daf, cif, yaa. As Vim's d does with any text object or motion by characters, d takes one that starts a line, or its indent, and ends one as whole lines. A last argument followed by a comma is one argument, with the comma after it. With none around the cursor, the next one; a count takes the one that many out. Typed again in visual mode, they grow the selection to the next one out. Keys typed while the daemon answers wait their turn; if it takes over a second, or Esc is pressed, nothing is done. |
u Ctrl+R | Undoes your last change, or redoes the last undone. The cursor goes back to where it was as the change began, as Vim's does: where an operator began, such as the start of what dk took, if that's in or beside the lines the change made, or else the first of those lines. The file's last selection comes back as it was then, for gv. A command that changes nothing still makes a step where Vim's does, such as 3J on the last line, X at a line's start, x on an empty line, or an operator on an empty line, and u undoes it on its own, putting the cursor back. With a daemon from before 2026.10.81, the cursor goes to where the text the undo changes starts. |
gra | What the language server could do to the text under the cursor, or selected, such as fix what's wrong there, in a menu by the cursor to pick from with Enter or a number. The bar says how many files it changed. |
grn | Renames what's under the cursor everywhere the language server knows of it, asking for the new name in the bottom bar; it starts selected, so typing replaces it. The bar says how many places in how many files. |
. | Makes the last change again, with what was typed in insert mode after it. A count makes it that many times. A change made in visual mode is made again on as much text from the cursor: as many lines; on one line, as many columns, a tab counting for its width; over several lines, as many lines, to the same column of the last, or to its end if the selection went there with $. It keeps its own count, as in Vim, so V3> and . indent by three steps again. In visual mode, . makes a change made in visual mode again on what's selected, so V> and . indent the lines once more. Unlike Vim, as many columns take no line break past a shorter line's end, though to its end after $ does, and after p over a selection it puts the same text again, where Vim's only deletes. After a change to a block, it makes it again on a block as big from the cursor, as many lines by as many columns, or to each line's end; a count changes nothing. |
v V | Visual mode, by characters or whole lines. d, x, c, s and y act on what's selected, D and X delete the lines selected, whole, and C, S and R change them, as Vim's, o goes to its other end, and the cursor can go right past a line's end, as Vim's, with l, Space, Backspace, $ or a move up or down after it, taking the line break, and i or a and an object selects the object. > and < indent the selected lines, by as many steps as the count, and keep them selected, so they can be pressed again. ~, u and U turn over, lower or raise the selection's case, as do g~, gu and gU, and g? rot13s it, J joins its lines, r and a character replaces every character in it, p and P put in its place (see Registers), I types at its first line's start, or at the cursor if that's above the other end, as the I row says, and A after the selection's end, as Vim's: after the cursor's character, or at the start of the other end's line if the cursor is above it, but before the last character after $, which . types again, Del deletes it, and : starts a command for its lines with '<,'>, count or not. = indents the selected lines as the language says, and leaves visual mode. gq has the language server format what's selected, as one undo step. |
| Ctrl+V | Selects a block of columns, from the corner it starts at to the cursor; v, V, and Ctrl+V switch between the kinds of selection. Columns are as drawn: a tab or wide character at a corner is in whole, and one an edge cuts is split into spaces, as Vim does. o goes to the opposite corner, O to the other corner on the same line, and $ takes every line to its end. d, x, X, y, Y, c, r, ~, u, U, >, and < act on the block; D and C act from its left edge to each line's end, and S and R change its lines, whole, as Vim's. I and A type on the first line, and once insert mode ends, what was typed goes before the block on every line long enough to reach it, or after it, padding short lines, or after $, at each line's end; if someone else changed those lines meanwhile, it stays on the first and the bar says so. A line break typed goes on the first line only. J joins its lines and : starts with '<,'>. Each change is one undo step. In a folder's listing it changes names only, leaves .. alone, and won't type starting on .. or put past the end. |
gv | Selects the file's last selection again, by characters, lines or a block as it was, with the cursor at the end it was at; '< and '> are its ends. Each file keeps its own, through going to another file and back. Its ends are kept as Vim keeps '< and '>, a line and a column each: lines put in or taken away above take them along, and lines :m moves; a line taken away leaves them at that line; J joining a line on takes their columns with its text; but text typed or taken away within a line, or a line broken in two with Enter, leaves them at their columns, unlike other marks, and an end beyond its line's end selects right past it. Each undo step keeps the file's last selection as it began, and undoing it puts that selection back, as Vim's does, keeping the one you had for a redo to put back; any other edit, even one that makes the text as it was, moves it as edits do. In visual mode, it swaps what's selected with the selection before. A selection . made isn't one. Terminals' normal mode has it too. |
cw changes to the end of the word, not up to the next word, as in Vim.
What y copies goes on the clipboard too. What d and c delete only goes
where p puts from, so deleting doesn't lose what you copied from somewhere
else.
Insert mode #
Keys type into the file. Esc, or Ctrl+; as in a terminal, goes back to normal mode.
| Keys | Does |
|---|---|
| Enter | A new line, indented as the language says, or as the line before where it has no rules. |
| Tab | Indents with a tab, where the file is indented with tabs, or else with spaces to the next multiple of shiftwidth columns. |
| Backspace, Ctrl+H | Deletes the character before the cursor, joining the line to the one before at its start. |
| Delete | Deletes the character under the cursor. |
| Ctrl+W | Deletes the word before the cursor. |
| Ctrl+U | Deletes back to the end of the line's indent, or from there, to the line's start. |
| The arrows, Home, End | Move, and start a new undo step. |
A count before i, a, or o types what's typed that many times: 3ix
Esc types xxx.
The mouse #
A click puts the cursor where it's clicked, or at the line's start if it's on the line's number, and the wheel scrolls. A click beside a row a line goes on over goes to that row's start. Moving up and down after a click aims for the column clicked, as Neovim's cursor does, even past the end of a short line or in the middle of a tab.
With Alt held, or Ctrl and Alt, dragging
selects a block of columns. Dragging selects, as in Neovim: from where the
button went down to where the mouse is, in visual mode, ready for d, y,
c, > and the rest once you let go. A double click selects a word, by the
file's own word characters, and dragging after it selects whole words; a
triple click selects the line, and dragging after it whole lines. A long line
wrapped over several rows is selected row by row, and an inlay hint is never
selected: the mouse on one takes the character it's drawn before. A click ends
the selection, and gv selects it again. An editor showing a folder selects
the same way, but a double click there opens what's clicked, as
Enter does.
Mouse-wheel scrolling is smooth across native panes, including editors,
terminal history, chats, rendered Markdown, explorers, boards and reviews.
Trackpads retain pixel precision, and keyboard navigation remains immediate.
Use :set nosmoothscroll to disable wheel animation, or save
client.opt.smoothscroll = false in client/init.lua. Programs that handle
their own mouse input receive wheel events directly.
Past the pane's top or bottom, the view scrolls while the button is held,
faster the further past the mouse goes. While you drag, the view keeps still
under the mouse; once you let go, scrolloff keeps rows around the cursor
again. If the text changes under a drag, say by an agent's edit, where it
started moves with the text.
Letting go puts what's selected on the primary selection, which a middle click
pastes, as selecting in a terminal does; not with clipboard=unnamed, where
p over the selection would put the selection itself.
A drag from insert mode selects in visual mode for a while, as Neovim's
"(insert) VISUAL" does, and the bar says (insert) VISUAL: once the selection
ends, by an operator, Esc or a click, the editor goes back to
insert mode at the cursor; c types over it. A binding or macro run on it
goes back to insert only once all its keys have run. : on it, gra, and
leaving the pane leave it in normal mode.
Known limits #
- A window isn't told of changes that came back until it opens their file, or
:recover; a[No Name]that came back isn't in:Buffers. - No
breakatorbreakindentopt. Typing near the start of a line of megabytes that isn't plain ASCII takes a moment, as the rest of it is laid out again. - Lightbulbs or gutter hints for lines with code actions, and typing to narrow the menu of them.
:jumps, to list them.- A server installed some other way than through clackatoo, after a file of its was first opened, isn't looked for again until the daemon restarts.
indentkeysandindentexpras options. Esc on a line with nothing but its indent leaves the indent..doesn't wait for a repeated new line's indent to be put right.- In Python,
else:typed under the body it ends stays where it's typed, where Neovim takes it back a step: the grammar clackatoo installs reads that line differently. - Languages inside others, such as code in a Markdown file, or CSS in HTML: they're colored as the outer language only. Code in a Markdown file is colored only when it's rendered.
- Selecting, copying or searching rendered Markdown, images in it, scrolling a wide table in it sideways, and a link's heading in another file.
- Choosing the colors. They're the palette's named colors where there's one to suit, so they follow the terminal's.
- Options for one pane only:
:setsets them for every pane. clackatoo editopens the tab, but the window doesn't switch to it (clackatoo opendoes).\1inside a pattern,\@lookaround,\&, and\%V;\zsand\zeinside a group;:ginside:g, or:swithcunder:g; a:gthat moves more than one line, as:g/^/m0does, leaves marks on them where they were, as its moves are made as one edit. There are no'[and']marks. Macros don't record pastes. A mark on deleted text stays where the text was, rather than going.- Sideways scrolling while dragging with
nowrap. In visual mode,D,X,C,SandRdon't act on whole lines as Vim's do,X,RandSdon't act on a block as Vim's do, and.doesn't makegqagain. - A change typed right as the connection to the daemon drops can be lost.
- Where
uputs the cursor differs from Vim in a few cases: afterAon a selection made from its end back to its start, afterdwith a search, and after:dor:mon lines selected in visual mode, which Vim starts from the selection's first line's start.
Images
clackatoo / Reference
clackatoo shows images in several places: an image file in a pane of its own, the images a Markdown file names, the images in a chat, and those programs show in a terminal. All of them go through one layer, kept once by the daemon and drawn the same way everywhere.
Opening an image file #
:e plan.png, or picking an image file in the
explorer, opens it in an image
pane. The same goes for the rest of the ways of opening a
file, such as
:|Editor plan.png. clackatoo shows PNG, JPEG, GIF (its first frame) and WebP
files, by their names' endings. An SVG file is text, so it opens in the
editor.
The image opens fitted to the pane, in proportion, and never bigger than its own size. The line above it names the file and gives the image's size, its format and how it's zoomed.
| Key | Does |
|---|---|
+ - | Zooms in or out, by a quarter |
= | Fits it to the pane again |
0 | Shows it at its own size, a pixel for a pixel |
h j k l, the arrows, the wheel | Move about in it, once it's zoomed |
g G | Its top, or its bottom |
q | Closes the pane |
Ctrl+? lists the keys too. How it's zoomed is your window's own, as a pane's scroll is.
The file is read by the daemon of the machine it's on, so an image on another machine opens as one there does. That daemon reads it only if it's a regular file, not a pipe or a device, of no more than the limit for one owner (see Limits). A file that isn't an image of a format clackatoo shows says so, in the pane's top line. A file you're already editing as text stays in the editor.
Images in Markdown #
The editor's rendered Markdown
shows each image a file names, as , below the block
that names it, as wide as it is or as the column. Its description stays in its
place, after ▣.
Only a relative path, from the folder the Markdown file is in, is shown. In a
folder you trust it may climb out of that
folder with .., as far as the root of the repository it's in, but no
further; in a folder not trusted, only a path down from the file's own folder
is shown. The daemon never reads one through a link, at any part of its path,
and never reads a pipe or a device. A Markdown file shows at most 64 images,
each asked for as it comes near the view. An absolute path, a path starting
~, or an image from the web shows only its description: clackatoo doesn't
fetch anything from the web for Markdown.
Images in chats #
Images you paste into a chat, and those an agent's tools show, are kept in the same layer. Each is shown from the image itself, at the size it's drawn, and fetched once. Selecting one opens it whole, over the chat. A window older than the image layer, or a daemon older than it, still shows the small previews it always did, even of a chat on another machine that comes to it through newer daemons.
Images in terminals #
Programs show images in a terminal with kitty's graphics protocol, its Unicode
placeholders, sixel, or iTerm2's inline images: kitten icat plan.png,
img2sixel plan.png, imgcat plan.png, or the previews of yazi and ranger.
They're kept in the same layer, as the terminal's own, and drawn wherever the
terminal is, the phone included. Terminal
emulation says what each
protocol does.
On the phone #
The web app shows a chat's images too, and a terminal's. It fetches each one only as it scrolls into view, and as a copy only as big as the screen shows it.
Limits #
The daemon keeps each image once, as it was sent, however many places show it: a PNG stays a PNG. Pixels sent with no format are kept as a PNG.
Each terminal, chat, image pane or Markdown file may hold up to 64 MiB of
images, and all of them together 256 MiB. Past either limit, the image used
longest ago that isn't showing in an image pane is let go, and its place says
[image dropped: over the 64 MB limit]. An image bigger than the limit by
itself isn't kept at all. Each window keeps the images it has fetched for
itself, within limits of its own, and lets go of the oldest the same way.
A terminal's images that its screen shows are never the ones let go: those that scrolled into history, or that kitty's commands keep for later, go first. So a terminal whose screen shows more than its limit of images, or Unicode placeholders of them, can't be given another until some leave the screen: new ones are refused meanwhile. A terminal lets go of an image once nothing it shows or keeps holds it.
daemon.images.terminal_mb and
daemon.images.total_mb in the daemon's config
set the limits, and CLACKATOO_IMAGE_MEMORY, in MiB, each owner's and then
all of them together, as 64,256, overrides them. They're read when the
daemon starts or upgrades. The daemon keeps its
images through an upgrade, but not through a restart: a terminal's history
kept across one says each image's size where it was.
Agents never see an image's bytes in what they read of a pane: an image pane
reads as image, ~/plan.png [image 640×480], and an image in a terminal as
[image 640×480] where it starts.
Known limits #
- An image pane on another machine, in a workspace from there, shows as a pane
that needs a newer clackatoo. Open the file on that machine's own workspace,
or with a
--remotewindow. - An animated GIF or WebP shows only its first frame.
- A JPEG of more than about 37 million pixels (8000 × 6000, say) isn't shown: decoding one would take more memory than clackatoo allows an image.
- SVG isn't shown as an image.
- kitty's animations, and its placements relative to others, aren't done (see terminal emulation).
Project Code Outlines
clackatoo / Reference
Clackatoo builds a shared index of source definitions when an editor outline, project symbol finder or agent first asks for it. Windows and chats in the same project use the same index. Indexing runs in the background and appears in the bottom bar's work indicator. The queries themselves don't. Queries can return useful partial results while the rest of the project is being indexed.
The home directory, and any folder above it, is never indexed: it's no
project, and far too much to walk. That's the home directory as it really
is, with links followed. A chat there with no project of its own gets no
symbol search or repository map, and says why. The outline of a single
file there still works, in the editor and through file_outline: only
that file is read.
Editor outline #
In a saved source file, <Space>bo or :Outline toggles an outline on the
editor's right. <Space>bO or :OutlineFocus focuses it without closing it.
It lists up to 1,024 definitions, indented inside their enclosing definitions,
and reports when there are more. An installed grammar is needed; a language
server is not.
Use j/k or the arrow keys to select a definition and Enter to jump to
it. Home/End and Page Up/Page Down move through a long outline. A click
on a definition jumps there; the wheel moves through the list. Esc or h
returns the keys to the editor, leaving the outline visible; q or the
heading's cross closes it. r refreshes it. Jumps enter the normal jump
history, so Ctrl+O comes back.
The outline follows the current file and highlights the enclosing definition as the editor's cursor moves. Source edits clear outdated definitions and refresh after a short pause, including unsaved edits. The panel is local to this window and stays open when the same editor switches files. In panes narrower than 64 columns it hides until there is room again.
Project symbol finder #
<Space>ps or :ProjectSymbols searches across the project using identifier
and path word prefixes, including camel-case components. It works from a
terminal or explorer too. With nothing typed, it shows a bounded initial
page. Up to 200 results are returned; narrow the query when there are more.
The finder shows indexing and partial-coverage status and refreshes partial
results as indexing advances, preserving the selected location. Its usual
preview, Enter, Ctrl+V/Ctrl+X, Ctrl+T and jump-history controls apply.
Unsaved editor text replaces cached disk results. Cancelling indexing in
:Work leaves partial results available; automatic finder refreshes do not
restart the cancelled job. Reopening the finder, typing a new query or
pressing r in the outline explicitly retries indexing.
An older daemon keeps its language-server project search. <Space>bs and
:Symbols remain the language-server file-symbol picker.
Agent tools #
| Tool | Reads |
|---|---|
file_outline | Definitions, signatures, source lines and import declarations in a relative project file. It can index that file immediately, ahead of the background scan. limit defaults to 200, at most 200. |
search_symbols | Definition names and path words matching the query's word prefixes, including camel-case components. limit defaults to 50, at most 200. |
repo_map | A compact outline selected by identifier/path words and optional focus files. Focus files and their neighbours come first. With no explicit focus, open editor files supply it. max_bytes defaults to 12,000, from 1,024 to 32,000. |
These tools read only the chat's project. Paths are relative to its root;
absolute paths and .. are refused. The tools also work for read-only
specialists. They write derived index data in the daemon's private state
directory without modifying project files.
The repository map uses a strict UTF-8 byte budget so its size does not
depend on a particular provider's tokenizer. All tools return bounded
results. more or a final message says when there are further definitions;
narrow the query to find them.
An outline is a navigation aid. It contains declaration signatures and locations, not the implementations an agent needs to read before changing behaviour. Search uses identifier and path words; it does not understand arbitrary natural-language questions. Import declarations are recorded as syntax. Calls, references and import targets are not resolved, and this version does not use PageRank.
Freshness and unsaved files #
Changed source files are reindexed individually. A directory that's created, deleted or moved has what's under it walked again, and nothing else. A change to ignore rules, or filesystem events the daemon missed, asks for the whole project to be walked again.
While every directory is watched, that's all: the project isn't walked on a timer. If some couldn't be watched (there are more than 8,192, the system has no watches left, or the project's own folder was removed), the whole project is checked every two minutes while it remains in use. A directory moved out of the project stops being watched; one made in its place is watched afresh. Unchanged files reuse their persistent records, and a walk writes to the index in batches. Changing the installed grammar or extraction version invalidates those records the next time the file is met.
Unsaved editor text replaces disk records in a query's results and is marked
unsaved. It is never written into the persistent source index. Each
unsaved file is parsed once for each version of its text, however many
queries read it. One that can't be parsed is left out, and the answer says
there is more than it gives. So is anything past 32 unsaved files or 16 MiB
of them.
If the unsaved text a query read changes while it runs, or the file it was asked about does, the agent is asked to retry rather than being given an outline of the earlier text. An edit anywhere else in the project doesn't make an answer stale.
Coverage reports whether reconciliation is complete, which work is in
progress, how many files were indexed or unsupported, cache hits, skipped
files and errors. It also counts the indexed files that aren't whole:
truncated ones, which have more than 4,096 definitions and keep the
first, and failed ones, which can't be parsed as they are: their grammar
doesn't load.
Complete reconciliation means the configured source set has been visited; it does not mean every language or generated file was indexed. A file that fails doesn't leave the index incomplete: it's recorded as failed, counted each time, and not parsed again until it or its grammar changes. A file that only ran out of its parsing budget, as on a busy machine, is left out and counted as skipped, and tried again on the next whole walk or when its own outline is asked for. A folder that couldn't be read leaves the index incomplete until a whole walk can read it, as something in it may be missing; the project is then checked on the two-minute timer too. Filesystem contents can change after any query's snapshot.
Cancelling indexing leaves its existing cache available as partial data. Another query can restart indexing after cancellation completes. A daemon restart reuses the on-disk index and reconciles it before claiming it is current. Recent activity history is separate from the persistent index.
Languages and limits #
Indexing uses installed Tree-sitter language packs. It never starts language servers or installs grammars automatically. Common function, method, type, class, module and constant constructs are recognised; coverage varies with each language's syntax. A file without an installed grammar is counted as unsupported.
The index respects .gitignore and .ignore, excludes source symlinks,
and skips .git, node_modules, target, vendor, dist, build,
__pycache__ and minified JavaScript/CSS. Files over 4 MiB are excluded.
Extraction has a 500 ms parsing budget and at most 4,096 definitions per
file. Traversal stops at one million eligible files. Errors and truncated
coverage are reported rather than silently presented as a complete map.
In C, a struct or enum counts where it's defined with a body, not where
its name is used.
Up to four projects retain live index state; unused projects release it after ten minutes. Syntax trees are discarded after extraction, and symbol records stay in a disk database with a small page cache. Each background worker reuses at most four grammars, avoiding repeated compilation for warm file updates without retaining whole-project syntax trees. Directory watches are bounded at 8,192 per project; coverage says when watches are incomplete, and metadata reconciliation still checks for changes. A database is capped at 512 MiB.
Cached databases remain available for later sessions, but not for ever. Each time a project's index is loaded, the daemon clears out the indexes whose project folder no longer exists, those not written to for 30 days, and then the least recently written until all of them together take no more than 2 GiB. Loading a project writes to its index, so that's the one loaded longest ago. An index in use is never removed, even one loaded while the clear-out runs. Indexes from before this layout are built again and the old ones removed.
The File Explorer
clackatoo / Reference
A file explorer is a pane showing a folder, its root, as a tree. The daemon lists each folder when you open it in the tree, and watches it while it's open, so a file made in a terminal, or by an agent, shows straight away. Nothing is read until it's shown: a project with a hundred thousand files costs only what you open. When an open folder changes, the window is sent only what changed in it, not the whole folder again, so a build writing into a folder of thousands of files costs little to show. What git says of the files is sent the same way: only the marks that changed, not every mark again.
Opening it #
| Key or command | Does |
|---|---|
<Space>e | Opens an explorer down the left of the tab, goes to it if there's one, or closes it if it has the focus. |
:Explore, :Ex | Opens one, or goes to it. |
:Explore DIR | The same, with DIR as its root. A relative DIR is from the root, and ~/ is your home directory. |
:e | With nothing after it: opens one at the folder you're in, or roots the tab's there, beside an empty file with no name yet (see the editor). |
clackatoo files [DIR] | From a shell: opens one at DIR, or the current directory, in a new tab (see the clackatoo command). |
Its root is the project the focused pane is in: the git repository of an
editor's file or of the folder a terminal is in, or else that folder. Opened
from an editor, the tree opens down to the editor's file, with the cursor on
it. :e alone roots it at the folder you're in, not the project.
It opens 30 columns wide, or a quarter of the tab if that's narrower, but
never under 10 (explorerwidth), and keeps that share of the tab as the
window resizes.
The tree #
The top line is the root. Below it is .., the way up: Enter on
it, or a double click, makes the folder above the root the root, with the
cursor on the folder you came from, as - does. The cursor moves onto it as
onto any line, and gg goes to it. There's none when the root is /. It's
drawn as a folder is. A heading too long for the pane is cut from its start,
as …/tutor/explorer. It names no file, and nothing is read of the folder
above until you go up. A root you can't read shows .. alone, so you can
still go up; it isn't asked for again until R.
Folders have ▸ when closed and ▾ when open, and the guides down the left
show what each line is in. Folders are blue, programs green, links cyan.
Beside each file is what git says of it: M changed, A added, ? new and
untracked, D deleted, ! in conflict. A folder shows the mark of what
matters most inside it. What .gitignore leaves out is dimmed, with
everything inside it, and so is what a worktree's repository excludes. A
repository inside another has its own status. A .gitignore, or a
repository's info/exclude, is read only if it's a regular file, never
through a link, as git won't follow a linked .gitignore either, and only the
lines in its first MiB count; the finder and language servers' watches read
theirs, .ignore files too, the same way, so a folder from anyone can't have
them read a pipe, a device or a huge file. No command a repository's own
config names ever runs for it: not an fsmonitor, not its hooks, and not its
filter drivers, which git would otherwise run to compare a changed file. The
same goes for an editor's git signs and for reviews. Git LFS's driver is the
exception, exactly as git lfs install writes it, though files Git LFS keeps
get no git signs. To change this, set CLACKATOO_GITFILTERS in the daemon's
environment: lfs (the default), all to let every driver run, or none to
run none, your own included. It's read when the daemon first runs git.
clackatoo needs git 2.38 or newer for git status, signs and reviews; with an
older git, or none, the explorer says so and shows no marks. A git directory
found on its own, such as one committed inside a clone, isn't treated as a
repository, and git never fetches anything: a partial clone's missing files
get no signs. Files whose names start with . are hidden until you press ..
Which folders are open, where the cursor is and what's scrolled to belong to the window: two windows can show one explorer differently. When you close an explorer and open one on the same root again in the same window, it's as you left it.
Keys #
| Key | Does |
|---|---|
j k, gg G, H M L, Ctrl+D Ctrl+U Ctrl+F Ctrl+E Ctrl+Y, zt zz zb | Moves, with a count, as every list does |
l, Enter | Opens a file; opens a folder (Enter closes an open one); on .., goes up |
h | Closes a folder, or goes to the one it's in |
- | Goes up: the folder above the root becomes the root, as Enter on .. does |
g? | Lists these keys at the explorer's foot, or hides them; the bar says g? keys until then |
zo zc za | Opens, closes, or toggles the folder at the cursor |
zR zM | Opens every folder shown, one level a press; closes them all |
/ ? n N | Searches the names shown, with the editor's patterns, shown as you type and lit as every list's search is |
., g. | Shows hidden files, or hides them |
R | Lists everything shown again |
Q | Closes the explorer |
A click puts the cursor on a line, a double click opens it, or goes up from
.., and the wheel scrolls.
Dragging with the mouse #
Press on a file or folder and move the mouse half a line away, holding the button, to drag it. Until then it's a click. While you drag, the bar says what letting go would do, and the folder it would go into is lit. Esc stops the drag without doing anything.
| Let go on | Does |
|---|---|
| A folder, in this explorer or another | Moves it into that folder. Hold Ctrl as you let go to copy it instead. |
| A file | Moves it into the folder that file is in. |
.. | Moves it into the folder above the root, out of what the explorer shows: the bar asks first, move a.txt out of ~/p, into ~? (y/n), and only y, pressed then, does it: not one a macro types, as for a link. |
| The explorer's heading, or below the tree | Moves it into the root. |
| An editor | Opens it there, as :e would. |
| A terminal | Types its path for the program there, quoted so bash, zsh and fish each read it as one word, with a space after. Nothing runs. |
| A chat | Types its path in the message box. |
Every drop focuses the pane you let go on. A move or copy works like x or
y then p: nothing is written over unless you say so, and if something's
already there, that explorer asks first, in the bar. Nothing can be dropped
into itself, or into the folder it's already in, and a lesson's explorer moves
nothing into or out of the lesson's folder. A path belongs to its machine, so
a file can't be dropped on a pane of another machine. A path with a control
character in it, such as a line break, is never typed into a terminal or a
chat. The path goes to the terminal's program, or the chat's box, even while
the command line or a search is open.
Opening files #
Enter or l opens a file in the editor of the tab you were last
in, in place of its file, as :e would, and moves the focus there. With no
editor in the tab, the file opens in a new one beside the explorer.
Ctrl+V and Ctrl+S open it in a
split beside or below that editor, and Ctrl+T in a new
tab.
An image file (PNG, JPEG, GIF or WebP) opens the same ways, in an image pane rather than the editor.
Making and moving files #
| Key | Does |
|---|---|
a | Makes a file in the folder at the cursor, or the one its line is in. A name ending in / makes a folder; a/b/c.txt makes the folders too. |
r | Renames what's at the cursor. A name with / moves it. |
d | Deletes what's at the cursor, after asking, to the trash. |
x y, then p | Cuts or copies what's at the cursor, then moves or copies it into the folder at the cursor. |
.. names no file: r, d, x, y, Ctrl+V,
Ctrl+S and Ctrl+T say so and do
nothing, and a, p and e act on the root, never the folder above.
Nothing is written over unless you say so. If a file is already there, the bar names it, such as "a file of 3 KB", and asks; if it changes before you answer, you're asked again. A folder is never written over, and a file open with unsaved changes can't be. Nothing can be moved or copied into itself, or over a folder it's in.
Deleting moves to the desktop's trash, so your file manager can put it back. A file on a disk with no trash can only be deleted for good, and the bar asks again first, saying when a folder goes with everything in it. A mount point, or a folder with another disk mounted inside it, is never deleted.
A file you move or rename that's open in an editor goes with it: the editor shows its new name, and its changes and undo history stay. A move to another disk copies first, then deletes from the old place only what was copied and hasn't changed since, and cleans up after itself if it fails. What it deletes it finds through the folders it copied, never by name: a folder swapped for a link in the meantime is left where it is, and so is whatever the link leads to. A mount point, or a folder with another disk mounted inside it, can't be moved to another disk, and a folder holding pipes, sockets or devices can't be moved or copied.
The daemon doesn't upgrade in the middle of a copy, move or delete. It waits
up to 3 seconds for it to finish; past that, clackatoo upgrade says a file
operation is still running, and to try again when it's done. While it waits,
new copies, moves and deletes are turned down, and the bar says why.
Editing a folder as text #
e on a folder, or :Explore!, shows that folder in an editor in the
explorer's pane, as oil.nvim does: a line for each entry, folders ending in
/. Edit it as any text, with every motion, :s, macros and undo:
- Change a line to rename what it names. Give it a path, such as
../old/notes.txt, to move it. - Delete a line to delete what it names.
- Add a line to make a file, or a folder if it ends in
/.a/b/c.txtmakes the folders too. - Copy a line, and change the copy's name, to copy what it names.
Enter on a folder's line shows that folder's listing, and - the
folder above's, so a line cut in one folder and put in another moves what it
names there. Folders' lines are colored as in the tree, and a folder with
nothing in it shows empty folder: o makes a file under its ... Every
listing but /'s starts with a .. line: Enter or a double click
on it goes up, as - does, with the cursor on the folder you came from. ..
names nothing, so deleting it, moving it or putting it in another listing
changes nothing, and :w leaves any line that's .. or ../ alone. A path
through .., such as ../notes.txt, still means the folder above, and a
change that leads outside the folder shown is listed with its full path. A
:%s that adds to the start of every line reaches .. too and is refused at
:w; use :2,$s. Your edits to each listing are kept until you write or
throw them away.
:w works out what your edits come to and lists every step in the pane, under
"Changes to" and the folder, then asks right under them, "Apply 3 changes? y
yes · n no", naming the keys only while the pane has the focus (otherwise
"(focus to answer)"); the bottom bar asks only if the pane has no room. The
steps: copies first, then renames and moves, each name freed before it's
taken, swaps and rings through a name set aside, and deletes last. y does
them, one at a time, through the same file operations as the keys above:
nothing is written over, and deletes go to the trash. The first step that
fails stops the rest, and the bar says what was and wasn't done, naming
anything left set aside, such as a.txt.moving, to put back. n, q, or
Esc goes back to the text. :q! throws your edits away.
Each step checks the disk first: if a file has changed since it was listed, or
something else is there now, that step is refused and the rest stop. A folder
that changed while you edited is refused at y: :q!, then e again, shows
it as it is.
Some edits can't be done in one write, and :w refuses them at their line,
saying why: putting something where a folder is being moved or copied to,
keeping a file in a folder you've deleted, or a line pasted from another
listing session, which can't be known to name what it seems to. Do those in
writes of their own, or type the name on a new line.
Each line starts with a hidden mark naming its entry, so what it named is known whatever you change of the rest. A name with a line break in it, or bytes that aren't UTF-8, can't be a line: it's left out of the listing, and left alone, and the bar says how many were.
Options #
| Option | Default | Does |
|---|---|---|
explorerwidth (ew) | 0 | How wide an explorer opens, in columns: 0 is 30, or a quarter of the tab if that's narrower, but never under 10; otherwise 10 to 200. |
explorerhidden (eh) | off | Explorers show hidden files when they open. |
Known limits #
- You can't drag files in from other programs, or out to them.
- Only 4096 folders are watched at once; past that,
Rshows what's changed. - The daemon watches everything (explorers, open files, what language servers
ask for, git's index and the display) on one of your inotify instances, of
which Linux gives each user 128 by default
(
fs.inotify.max_user_instances), shared with every other program. If none is free, its log says so, as do the explorer's bar and the bar of a file you open then, naming the limit to raise, and changes aren't seen until one is: it tries again, every minute at most, then watches everything and looks at what changed meanwhile. If your inotify watches are all in use (fs.inotify.max_user_watches), its log and those bars say so too, and folders past them aren't watched, as past 4096. - Names that aren't UTF-8 are shown as near as they can be, and can't be renamed, moved or deleted here.
Boards
clackatoo / Reference
A board is a list of entries that you and your agents share. An agent working on part of a job can see what others have taken, take a piece itself, and leave what it found for the next.
Opening a board #
| Command | Does |
|---|---|
:Board NAME | Opens the board called NAME in a new tab, making it if there's none. |
:|Board NAME, :-Board NAME… | The same, beside the focused pane. |
:Board, :Boards | Picks a board in the finder: the workspace's and every workspace's, archived ones last. |
:Board@desk | Picks one of desk's boards in the finder, and opens it on desk, beside the focused pane. |
A board you make belongs to the workspace shown. One an agent makes belongs to its chat's workspace, or to every workspace if it asks.
Select an entry with the mouse; double-click it to edit its text, as e does.
Escape cancels the draft. While a draft or search is open, the
mouse leaves it alone. The wheel moves by visible rows, including within
entries taller than the pane.
Entries #
Each entry says what it is, who wrote it and how long ago, then what it says, and what it points to: a file and line, or a chat's turn. The newest is at the bottom, and the cursor follows it until you move it.
- A note is something to know.
- A claim is a piece of work someone has taken. It shows who holds it and for how long.
- A result is what came of a piece of work.
| Key | Does |
|---|---|
j k, gg G, H M L, Ctrl+D Ctrl+U Ctrl+F Ctrl+E Ctrl+Y, zt zz zb | Move between entries, with a count, as every list does. |
/ ? n N | Search the entries, shown as you type, the text they match lit, as every list's search is. |
i, o, a, Enter | Post a note, typed in the bar. |
r | Post a result. |
e | Edit the entry at the cursor. What it said is kept, the last 20 edits of it. |
x | Release the claim at the cursor, whoever holds it. |
A | Archive the board, or unarchive it. |
Q | Close the pane. The board stays. |
Claims #
Only agents make claims. While a claim is held, no other chat can claim the same thing, whatever its capitals. A claim lasts 2 hours unless the agent asks for another time, 24 at most. Claiming again renews it. Its holder or you can release it, and once it expires anyone can take it.
What agents can do #
| Tool | Does |
|---|---|
board_list | Lists the boards the chat's workspace sees. |
board_create | Makes a board, for the workspace or every workspace. |
board_post, board_edit | Post a note or result, with links. Edit its own. |
board_read | Reads a board, or what changed since a cursor an earlier read gave, by kind. |
board_claim, board_release | Claim a piece of work, and release it. |
board_archive | Archives a board, or unarchives it. |
A chat's agent is told the names of the boards there are when its chat starts.
Archiving #
An archived board can be read but not written on until it's unarchived. Archived boards aren't listed unless asked for. A full board can still be archived.
Where boards are kept #
Each board is a file in ~/.local/share/clackatoo/boards: JSON, one line per
change, readable with any text tool. Boards last through upgrades, the daemon
stopping, and reboots: an upgrade waits until every change is written before
it goes ahead. If the machine stops mid-write, the half-written last line is
dropped. A damaged file is moved to quarantine/ in that folder, and the
others carry on. Only one daemon at a time keeps the boards in a folder: a
second one has none. CLACKATOO_BOARDS sets another folder for the daemon, or
off for none.
A board holds at most 10,000 changes or 8 MB, and there are at most 200 boards. A board's name is at most 64 characters, an entry's text 16 KB, and an entry links to 32 places at most. Remote windows see the same boards through the daemon.
Known limits #
- Links in an entry can't be opened from the pane.
- A board can't be renamed or deleted from clackatoo, and entries can't be removed.
- Boards belong to a workspace by its name: rename the workspace, and its boards stay with the old name.
Terminal Emulation
clackatoo / Reference
clackatoo emulates enough of xterm for shells, ncurses programs such as htop,
and vim, under TERM=xterm-256color, with the extensions modern terminals
such as kitty, foot, WezTerm and Ghostty share: the kitty keyboard protocol,
synchronized output, styled and colored underlines, a program's progress
shown on its tab, the notifications programs ask for, and
images: kitty's graphics protocol, sixel and iTerm2's. Sequences it doesn't support are ignored, as xterm ignores
ones it doesn't know.
The environment #
A program started in a clackatoo terminal gets the daemon's environment, with these changes:
| Variable | Value |
|---|---|
TERM | xterm-256color |
COLORTERM | truecolor |
TERM_PROGRAM | clackatoo |
TERM_PROGRAM_VERSION | The clackatoo version. |
Variables describing whatever terminal the daemon was started in are removed,
so programs don't think they're inside it. These include TMUX, TMUX_PANE,
STY, VTE_VERSION, KITTY_WINDOW_ID, WEZTERM_PANE,
ALACRITTY_WINDOW_ID, ITERM_SESSION_ID, WT_SESSION, COLUMNS, and
LINES.
The program runs in its own session, with the terminal as its controlling terminal, so job control and Ctrl-C work as usual.
The display #
The variables that say which desktop a program opens its windows on follow the
desktop's logon, not the daemon's environment. A daemon started over ssh,
before anyone signed in to the machine, has no WAYLAND_DISPLAY, but a
terminal opened after you sign in there still gets one. The variables are
WAYLAND_DISPLAY, DISPLAY, XAUTHORITY, XDG_SESSION_TYPE,
XDG_CURRENT_DESKTOP, XDG_SESSION_DESKTOP, DESKTOP_SESSION, SWAYSOCK,
I3SOCK, HYPRLAND_INSTANCE_SIGNATURE, and NIRI_SOCKET. They come from the
first of these that has a display whose socket is still there
(WAYLAND_DISPLAY's in $XDG_RUNTIME_DIR, or where it names, and
/tmp/.X11-unix/XN for a DISPLAY of :N):
- The systemd user manager's environment, as
systemctl --user show-environmentprints it. GNOME, KDE, and sway or Hyprland with their usual config put their display there as you sign in; GNOME takes it out as you sign out, while sway and Hyprland leave it, which is why its socket must still be there. All of the variables are then systemd's, and one systemd hasn't got is removed, but forXDG_SESSION_TYPE. With neither of its displays' sockets there, none of systemd's variables are taken. - The daemon's own environment. A desktop that tells systemd nothing, as sway started by hand, keeps working this way for a daemon started inside it, while it lasts.
- None: all of the variables are removed, but
XDG_SESSION_TYPE.
A display whose socket has gone is removed. A display on another host, as
ssh's X forwarding gives (localhost:10.0), can't be checked, so one the
daemon was started with is kept for as long as it runs: only a desktop on this
machine that has gone is dropped.
XDG_SESSION_TYPE says what kind of session a program runs in, and toolkits
read it to choose between Wayland and X: Qt, Chromium, and Electron choose
Wayland only when it's wayland. A daemon started over ssh has tty, which
beside a WAYLAND_DISPLAY would send them to X. GNOME tells systemd wayland
as you sign in, so it comes with the display. Beside a display, a session type
that's missing or tty, as sway and Hyprland leave it, becomes wayland, or
x11 with only an X display. With no display, the daemon's own tty is still
true, so it stays.
The daemon reads systemd's environment as it starts, waiting up to 300 ms for
it so the terminals it makes again after a restart have the display. It reads
it again whenever a Wayland socket (wayland-N in $XDG_RUNTIME_DIR) or an X
socket (in /tmp/.X11-unix) appears or goes, and 0.5, 2 and 5 seconds after
that, as a desktop tells systemd a moment after making its socket; and as each
terminal is made, as systemd's can change with no socket coming or going,
which the terminal's shell takes at its first prompt. Nothing waits for these
reads, and only one runs at a time. It never checks on a timer. Where it can't
watch for sockets, it says so in its log, and tries again a while later,
waiting twice as long each time up to a minute, as when $XDG_RUNTIME_DIR is
removed as your last session ends and made again as you sign in. Each change
is logged, as
display: from systemd's user manager: WAYLAND_DISPLAY=wayland-0 ….
Every program the daemon starts from then on gets the display as it is: a terminal's program, an agent, a language server. The daemon never changes its own environment. A program already running keeps the environment it started with, as on any Unix, so an agent or language server started before you signed in has no display until it's started again.
Shells already open follow before the next command they run, or bash at
its next prompt. bash, zsh and fish, started as your shell with clackatoo's
integration, read shell/display in the daemon's
runtime directory at each prompt, and fish
and zsh again right before each command you type runs, and set or unset the
variables to match. So in fish or zsh, a command typed at a prompt drawn hours
before you signed in still gets the display. The daemon writes the file whole,
readable by you alone, whenever the display changes. A shell changes a
variable only while it has the value the shell started with, or the value the
shell last gave it, so one you set yourself, in your startup files or at the
prompt, stays yours. The file is read with the shell's own builtins, starting
nothing, and its few lines are only looked at when they've changed: about 20
to 30 µs a prompt or command.
fish reads it in its fish_preexec event, and zsh before your hooks in
preexec_functions (a plain preexec function of yours runs before those).
bash follows at its next prompt only, so in bash the command typed at a prompt
drawn before you signed in runs with the old display, and the one after it has
the new. What bash shows before running a command, PS0, runs its $(…) in a
subshell, which can't change the shell's variables. What could run in the
shell itself would get in the way of a DEBUG trap of your own: bash 5.3's
${| …; } in PS0 sets it off on clackatoo's call before your command, and a
DEBUG trap of clackatoo's would have to share it. Either breaks tools built
on it, as bash-preexec is.
A program you started from a shell is no different from one the daemon started: once running, it keeps the environment it started with. A shell following the display changes what the commands it runs from then on get, never what's already running, so an agent you started before you signed in has no display until you start it again.
clackatoo display shows the display
programs get now, and where it came from. CLACKATOO_DISPLAY=off in the
daemon's environment turns all of this off: programs get the daemon's own
environment, and shells change nothing. Each machine's daemon follows its own
desktop; nothing about it passes between machines.
Screen behavior #
- Scrollback: the primary screen keeps the last 10,000 lines that scroll
off its top. Lines only enter scrollback when the whole screen scrolls.
Scrolling inside a region an app has narrowed (as vim does) discards them.
Scrollback is stored as compact text, typically under 100 bytes a line, and
remembers which lines were wrapped, so they can be rewrapped to another
width. Compacting a line takes about as long as printing it did, so by
default the daemon waits until a terminal's output has paused for 100 ms.
Lines that scroll away during a flood (
catof a huge file) are never compacted at all. Until then, history keeps lines as they were on screen, about 8 bytes per column, capped at 16 MiB per terminal. The daemon's--scrollback-compactionoption changes this:eagercompacts each line as it scrolls off, which is the smallest but the slowest, andoffnever compacts, which is the fastest but the largest. - Floods: a terminal printing without end never holds up another you're typing in. The daemon reads it last in each turn, after updates have gone out, and stops as soon as anything else is ready. Output a program prints at once, such as a full-screen redraw, is still shown whole, and a program's last output always reaches its pane before the pane closes.
- Resizing: lines on the primary screen are rewrapped to the new width, and the cursor stays on the same character. A line that started in scrollback is rewrapped whole, as if it had been printed at the new width, so its part on screen still lines up with its part above. Only the last few screens' worth of a very long line is rewrapped, and older scrollback is left as it is. When the screen gets shorter, blank lines below the cursor go first, then lines above it move into scrollback. Erasing the top line or scrolling it away ends a line continuing from scrollback, so a resize never joins what's printed next onto it. The alternate screen is cut off or extended instead, because the full-screen programs that use it redraw after a resize.
- Alternate screen: full-screen programs switch to a second screen with no scrollback. Leaving it restores the primary screen and cursor exactly.
- Wrapping: printing in the last column leaves the cursor there, and the line wraps only when the next character arrives.
- Background color erase: clearing part of the screen fills it with the current background color.
- Wide characters take two columns. A wide character that doesn't fit at the end of a line wraps to the next one.
- Combining characters (accents, variation selectors) join the character before them. So do characters after a zero-width joiner, so emoji sequences such as 👩💻 stay one character.
- Variation selector 16 (U+FE0F), after a character that has an emoji
form one column wide, as ❤ or ✔ has, makes it two columns wide, as kitty
and Ghostty draw it: the cursor moves on a column more, over what was
there. In the last column, or at the right margin, with no room for it, the
selector is left out, and the character stays one column wide.
daemon.terminals.vs16 = falsein the daemon's config keeps it one column, for programs that count it so; each terminal keeps the rule it started with, through upgrades too, and one carried over from a build before the rule keeps the old one. A window older than protocol 147 gets each widened emoji's second column as a space, so what follows it stays in its column, whether the terminal is this machine's or one another machine's daemon passes on: a daemon makes the lines it passes on again for such a window, its history's too.
Supported sequences #
| Kind | Supported |
|---|---|
| Control characters | BS, HT, LF, VT, FF, CR, SO, SI. BEL is accepted and ignored. |
ESC | 7 8 (save/restore cursor), D (index), E (next line), H (set tab stop), M (reverse index), c (full reset), #8 (screen alignment test), ( and ) with B (ASCII) or 0 (DEC line drawing) |
CSI cursor | A B C D E F G H I Z ` a d e f, and s u without parameters (but s while DECLRMM is set: see margins) |
CSI editing | @ J (including 3J to clear scrollback) K L M P S T X b (repeat) |
CSI other | g (clear tab stops), r (scroll region), s with DECLRMM set (left and right margins), m (SGR), !p (soft reset), q (cursor shape: 0 the user's default, 1 and 2 block, 3 and 4 underline, 5 and 6 bar; blinking isn't drawn), t (window operations: 22 and 23 push and pop the title, with a second parameter of 0 or 2, ten titles deep, each kept to 4096 bytes; see queries for 18), >u <u =u (the kitty keyboard protocol) |
ESC keypad | = and > (application and numeric keypad) |
ANSI modes (CSI h/l) | 4 (insert), 20 (line feed is newline) |
DEC modes (CSI ? h/l) | 1 (application cursor keys), 6 (origin), 7 (autowrap), 25 (show cursor), 47, 1047 and 1049 (alternate screen), 66 (application keypad), 1048 (save cursor), 69 (left and right margins), 2004 (bracketed paste), 9, 1000, 1002 and 1003 (mouse tracking), 1005, 1006 and 1015 (mouse encodings), 1016 (the mouse in pixels, as 1006 but where the pointer is in pixels from the text area's top left; a drag is told at every pixel it moves, and the wheel at its cell's top left), 1004 (focus events), 2026 (synchronized output), 2027 (grapheme clusters), 2048 (resize reports) |
| SGR | Bold, dim, italic, blink, inverse, hidden, strikethrough, overline (53, drawn along the cell's top; a window older than protocol 147 draws none), and their resets (55 for the overline). Underlines: single, double (21 or 4:2), curly (4:3), dotted (4:4), dashed (4:5). 8, 16, 256 and 24-bit colors for text, background and underline (58), in both the ; and : spellings. |
OSC | 0 and 2 (window title, which names the tab and the window without control characters or those that show nothing but change what's around them, as the marks that turn text round and the line separators do; in the window's title, only its first 256 characters, set apart from the machine's name and anything clackatoo adds), 7 (working directory, as a file:// URL, which names a tab with no title; a path over 4096 bytes is ignored), 8 (hyperlinks, with id=; kept in history and through upgrades), 52 (clipboard: text a program copies goes to the window's clipboard or primary selection, as the window's osc52 option allows; reading it is refused unless allowed, with an empty answer), 133 (shell integration: A prompt, B where typing starts, C output, with an optional cmdline_url= (a command over 1024 bytes isn't kept) and clackatoo=, the secret clackatoo's own shell integration adds, which is checked and dropped, and D exit status, which marks a failed command's prompt line; see commands; the marks also say whether a background tab is running, and which signed command a terminal kept running runs again), 9;4 (progress), 9, 777 and 99 (notifications), 22 (pointer shapes), 46373 (secret regions: what a program marks hidden, never to be saved, or kept from agents) |
Queries answered #
| Query | Reply |
|---|---|
CSI c (primary device attributes) | CSI ? 62 ; 4 ; 22 c: a VT220 with sixel graphics and color |
CSI ? 1 ; 1 S, CSI ? 2 ; 1 S (XTSMGRAPHICS) | CSI ? 1 ; 0 ; 1024 S: 1024 sixel color registers; CSI ? 2 ; 0 ; 16384 ; 16384 S: the largest sixel image, in pixels. Setting them isn't supported (CSI ? Pi ; 3 ; 0 S). |
kitty graphics commands with an i or I (see images) | APC G i=<id> ; OK ST, with I=<number> and p=<placement> if the command had them, or APC G i=<id> ; <error> ST with one of a few fixed errors, such as ENOENT:no such image |
CSI 5 n (status) | CSI 0 n |
OSC 52 ; c ; ? (clipboard) | OSC 52 ; c ; <base64> ST, empty if refused or unanswered within 2 s, ended with BEL if the query was |
CSI 6 n and CSI ? 6 n (cursor position) | CSI <line> ; <col> R, with ? for the second form. Relative to the scroll region in origin mode. |
CSI > q (terminal version) | DCS > | clackatoo <version> ST |
CSI > c (secondary device attributes) | CSI > 1 ; <version> ; 0 c: a VT220, its version clackatoo's year and month, as 202611, as foot answers with its own. vim reads a number this high as a modern terminal's, not an old xterm's. |
CSI ? Ps $ p and CSI Ps $ p (DECRQM, is a mode set?) | CSI ? Ps ; Pm $ y, without the ? for an ANSI mode: Pm is 1 for set, 2 for reset, and 0 for a mode clackatoo doesn't know. Every mode in supported sequences is known, 2026 and 2027 included; 2027 is answered 4, can't be set, in a terminal carried over from a build before it, whose rows are laid out the old way. |
OSC 10 ; ?, OSC 11 ; ?, OSC 12 ; ? (the text's, background's, and cursor's colors) | OSC 11 ; rgb:1d1d/1f1f/2121 ST, ended with BEL if the question was. Several at once, as OSC 10 ; ? ; ?, are answered in turn. Neovim asks for the background as it starts, to choose its light or dark colors, as vim, bat and delta do. |
OSC 4 ; <index> ; ? (a palette entry, several pairs at once) | OSC 4 ; <index> ; rgb:… ST for each |
OSC 22 ; ? <names> ST (pointer shapes) | OSC 22 ; 1,0,… ST: whether each shape is known, and for __current__ the shape shown. Ended as asked. |
CSI ? u (kitty keyboard flags) | CSI ? <flags> u, the flags in effect |
CSI 18 t (text area size) | CSI 8 ; <lines> ; <columns> t. The sizes in pixels, the text area's (14t, as CSI 4 ; <height> ; <width> t) and a cell's (16t, as CSI 6 ; <height> ; <width> t), are answered once a window has said how big it draws a cell, as it does when it sizes the terminal; until then, not at all. Nor is the title read back (21t), which would let a program type what it set. |
DCS + q <names> ST (XTGETTCAP) | For each name, in hex: DCS 1 + r <name> = <value> ST, the value in hex, or without = for a boolean; DCS 0 + r <name> ST for one clackatoo doesn't say, the name said back only if it's hex, and DCS 0 + r ST otherwise: no answer ever says back what a program printed, which could have it type anything into the shell. It says xterm-256color's name (TN) and colors (Co), 24-bit color (RGB, Tc, setrgbf, setrgbb), styled and colored underlines (Su, Smulx, Setulc), overlines (Smol, Rmol), the clipboard (Ms), the cursor's shape (Ss, Se), synchronized output (Sync), bracketed paste (BE, BD, PS, PE), focus events (fe, fd, kxIN, kxOUT) and XT. At most 64 names a request, and a request over 1024 bytes isn't answered. |
DCS $ q <setting> ST (DECRQSS) | DCS 1 $ r <sequence> ST, the sequence that sets the setting as it is, for the pen (m, as 0;1;38:5:1m), the cursor's shape ( q, steady, or 0 for your own), the scroll region (r) and the left and right margins (s); DCS 0 $ r ST for any other. |
The colors are those the window draws terminals in, which it tells the daemon as it connects, so the daemon answers at once, as programs wait only a moment. Every terminal answers with those of the window that told it last, and the daemon tells those on other machines it's connected to. Until a window has told it, as with a window older than protocol 139, these questions aren't answered, and programs keep their defaults.
A program that asks faster than it reads the answers, as one at the far end of an ssh connection that has stopped reading can, gets no more once 64 KiB of answers and input wait for it. Answers are dropped whole, never cut, and what you type still goes in. The clipboard's answers go the same way, and so do answers to a program still reading a long paste: it gets none until it has read most of it.
Keyboard #
Keys are sent as xterm sends them, which nearly every program understands, until a program asks for the kitty keyboard protocol (https://sw.kovidgoyal.net/kitty/keyboard-protocol/), as fish 4, Neovim, Helix and Kakoune do. xterm's encoding can't tell some keys apart: Esc from the start of a sequence, Ctrl+I from Tab, Shift+Enter from Enter. The protocol sends those as sequences of their own.
A program asks a flag at a time:
| Flag | What changes |
|---|---|
| 1 (disambiguate) | Esc, and keys with Ctrl, Alt or Super, are sent as CSI <key> ; <modifiers> u. Enter, Tab and Backspace with no modifiers are sent as they are without the flag, so a shell a program left with the flag on can still be typed reset into. Text typed with or without Shift is text. |
| 2 (key events) | A key held down is sent again as a repeat, and one let go as a release: CSI <key> ; <modifiers>:2 u and :3, or in the key's own form, as CSI 1;1:3A for Up let go. Only for keys sent as sequences: text typed is sent again as it repeats, and says nothing as it's let go, and so do Enter, Tab and Backspace without flag 8. A key whose press the program heard is told as it comes up, whatever the pane's mode by then, and as the window loses the focus; a key held repeats only into the pane it went down in, and one a macro or a binding types is a press alone. |
| 4 (alternate keys) | Those sequences also say the key Shift made, and the key in a US layout, as CSI 97:65;2u. |
| 8 (all keys) | Every key is a sequence, text and all. |
| 16 (text) | With 8, each sequence also says the text its key types. |
Super is a modifier, 8, as the protocol numbers it. Hyper and Meta aren't sent: the window can't tell them from the others, nor are Caps Lock and Num Lock, or modifier keys pressed alone. The keypad's keys have numbers of their own, but type their text without Ctrl, Alt or Super. A window older than protocol 147 sends no repeats or releases, and the program is told flag 2 isn't set.
A program pushes the flags it wants (CSI > flags u) and pops them as it ends
(CSI < count u), leaving what was there before; CSI = flags ; mode u sets
(1), adds (2) or takes away (3) flags in effect. Each screen keeps a stack of
its own, sixteen deep, so a full-screen program leaves the shell's alone, and
a full reset (ESC c) ends them all. A program switching to the alternate
screen starts with none, whatever one before it left there, and the shell's
next prompt (OSC 133 A) drops what a program left on the primary screen, so
a program that dies with the protocol on doesn't leave
Ctrl+C reaching the shell as CSI 99;5u: a shell that
wants it, as fish 4 does, asks again after its prompt. They, the titles
pushed, and a program's progress go on through an upgrade in place. The window
encodes keys this way; the web app on your phone sends xterm's encoding still.
A window older than protocol 139 does too, which programs that ask still
understand.
Pointer shapes #
A program can choose the mouse pointer's shape over its terminal with kitty's
OSC 22 (https://sw.kovidgoyal.net/kitty/pointer-shapes/), as a link or a
divider in it would want: OSC 22 ; pointer ST sets it, by its CSS name
(text, pointer, crosshair, grab, ew-resize and the rest) or an X11
one kitty reads (xterm, hand2, left_ptr…); OSC 22 ; > name,fallback ST pushes the first known of a list, and OSC 22 ; < ST pops it. A name
clackatoo doesn't know changes nothing, and none shows the arrow, as a
program can't hide the pointer. The window shows it while the pointer is over
the terminal's live screen, ahead of the arrow a program that takes the mouse
gets; scrolled back, the pointer is clackatoo's again. Each screen keeps its
own, so a full-screen program's goes with it, and the shell's next prompt
(OSC 133 A) or a reset takes back what a program left. An upgrade in place
forgets it; a window older than protocol 147 shows its own.
Left and right margins #
A program that sets DECLRMM (CSI ? 69 h), as some editors and multiplexers
do to scroll part of a screen, can set left and right margins with DECSLRM,
CSI <left> ; <right> s, columns counted from 1. While it's set, CSI s
sets the margins rather than saving the cursor, as in xterm. Within them:
- Text wraps at the right margin to the left one, and a carriage return goes to the left one.
- The cursor stops at a margin moving across it, as at the scroll region's top and bottom.
- Scrolling, a line feed at the bottom of the scroll region, and inserting or deleting lines and characters move only what's between the margins, in the scroll region's lines; never into history. Outside the margins, a line feed moves the cursor on without scrolling, and editing does nothing.
- In origin mode, columns count from the left margin, as lines count from the scroll region's top.
Setting margins puts the cursor home. Resetting DECLRMM, a soft or full reset, and a resize put them back at the screen's edges. They go on through an upgrade in place.
Grapheme clusters #
By default, as in xterm, each character takes its own columns, and only a
zero-width one, or one after a zero-width joiner, joins the cell before it, as
programs counting widths with wcwidth expect. A program that counts by
grapheme clusters, what Unicode's segmentation (UAX #29) says reads as one
character, asks for mode 2027 (CSI ? 2027 h), as in Contour, WezTerm and
Ghostty. Then a cluster takes one cell: a letter and its spacing mark (कि), an
emoji and its skin tone (☝🏽), a flag's two halves (🇬🇧), a Hangul syllable
written in jamo. A cluster is as wide as its first character, but a flag, an
emoji with a skin tone, or one with variation selector 16
takes two columns. CSI ? 2027 $ p says whether it's on. A reset, soft or
full, turns it off.
What's printed either way stays as it was printed: rows are laid out again, in history, after a resize, through an upgrade and in every window, by the same rules, with what was printed side by side with the mode off kept apart. Selecting, searching and copying go by cells, so a cluster is one character to them. A cluster that would widen in the last column, or at the right margin, with no room there, is cut where it would widen: its next character starts a cell of its own.
Resize reports #
A program that asks with mode 2048 (CSI ? 2048 h), as Neovim and
notcurses can, is told the terminal's size in-band, in its input, as soon as
it asks and after every resize: CSI 48 ; <lines> ; <columns> ; <height> ; <width> t, the last two the text area in pixels, or 0 while no window has
said how big it draws a cell. It needn't wait for SIGWINCH, which can come
before the terminal is redrawn at its new size. The window sizing the terminal
says how big it draws a cell, so a bigger font is a resize too, in pixels;
the kernel's window size has the pixels too, as TIOCGWINSZ reads it. A
phone fitting a terminal leaves the pixels as the window said them. The mode
goes on through an upgrade in place; the size in pixels comes back with the
window's next resize.
Synchronized output #
A program that draws its screen in pieces can say it's drawing a frame
(CSI ? 2026 h) and that it's done (CSI ? 2026 l), as Neovim, Helix, tmux
and programs built on crossterm do. Meanwhile, the daemon sends windows
nothing of that terminal, and what changed goes out whole once the frame is
drawn, so you never see half a redraw. A frame that takes longer than 150 ms
is shown as far as it got, and nothing more is held back until the program
starts another, so a program that never says it's done only looks slow.
Progress #
A program can say how far a long task has got with
OSC 9 ; 4 ; <state> ; <percent> ST, as ConEmu began it and Windows Terminal,
Ghostty, kitty and WezTerm show it: state 1 is under way at a percent, 2
failed, 3 busy with no telling how far, 4 paused, and 0 done. The tab it's in
ends its name with 42%, ✗ (and the percent, if given) failed, … busy,
or ‖ paused: the focused pane's, or else the first of the tab's panes to
say, in a tab shown or not. It goes once the program says it's done (state 0),
or once the shell's next prompt shows the program has ended (OSC 133 A). Any
other OSC 9 is iTerm2's notification.
Notifications #
A program can ask for a desktop notification, as a build or a long command does when it ends, in any of the three ways terminals read:
| Sequence | What it says |
|---|---|
OSC 9 ; <text> ST | iTerm2's: a line, with no title. ConEmu's numbered commands, whose first part is a number, aren't notifications. |
OSC 777 ; notify ; <title> ; <body> ST | urxvt's, as foot and Ghostty read it. |
OSC 99 ; <metadata> ; <payload> ST | kitty's (https://sw.kovidgoyal.net/kitty/desktop-notifications/). The metadata is key=value pairs separated by :: p=title (as when it's left out) or p=body says which the payload is, d=0 that more of it comes in the next, e=1 that it's base64, u=0, 1 or 2 how urgent it is, and i=<id> names it, so that p=close with the same id takes it back. Buttons, icons, sounds and the rest are left out. |
A window shows it while you aren't looking at the program's pane: it's in a
tab not shown, or the window doesn't have the focus. Its title always starts
with what the terminal is called, so a program can't pass for another: the
tab's name if you gave it one, or else the pane's (the title its program set,
or its folder), as cargo — Build done; with no title of its own, it's that
name alone. The phone titles it the same way. It goes once you look, as
the program asks, or as the program ends, and clicking it goes to the pane. It
isn't sent at all while someone whose window has the focus, or whose phone
shows the terminal, is looking at it. A low urgency (u=0) is shown as such;
a critical one (u=2) as a normal one, since critical ones break through Do
Not Disturb. :set notify=off turns them off with chats', as the
notify option says.
:notify phone marks the focused terminal to have its notifications reach the
phone too, and :notify nophone
takes the mark away. A tab with a terminal so marked ends its name with
📱. The mark goes on through an upgrade in place and a restart, as :keep
does.
What a program says is cleaned as tab names are: control characters become
spaces, what shows nothing but changes what's around it goes, runs of spaces
become one, and a title is cut to 120 characters, a line to 300. A terminal
shows three at once, then one every ten seconds; one asking more often is
heard only as often, and so is one on another machine, whatever its daemon
passes on. However many terminals ask, at most ten notifications are shown in
a minute; the rest are told together as the minute ends, as 4 more notifications, and reach the phone if one of them would have. Nothing is ever said back to the program: kitty's
questions about what's supported (p=?), and its reports of a notification
clicked or closed, get no answer.
Long commands #
A command that ran for 10 seconds or more says so as it ends, in the same way
and to the same places as a program's notifications, while no one is looking
at its terminal: the command, how it ended, and how long it took, as
cargo build and failed (exit 101) after 2m14s. The command is named only
when clackatoo's own shell integration said it, signed; otherwise it's
A command. Its end is believed only once the shell has the terminal to
itself again, as with an agent's wait for a command, so a program printing
the marks of an end (OSC 133 D) while it runs on says nothing. Terminals an
agent started, and those showing what an agent's command printed, never say.
daemon.terminals.notify_after
in the daemon's config changes the 10 seconds, or with 0, turns it off.
Images #
Programs show images in a terminal in three ways, all of them kept and drawn through clackatoo's one image layer, the same as the images in chats, Markdown and image panes:
- kitty's graphics protocol (
APC G … ST), askitten icat, yazi, ranger, timg and chafa use it: transmitting an image by an ID or a number (i,I), in parts (m=1) or whole, as RGB, RGBA or PNG (f=24,32,100), compressed with zlib or not (o=z); showing it (a=T,a=p) at the cursor, all of it or a part (x,y,w,h), over some columns and rows (c,r), from a point in its first cell (X,Y), above the text or below it (z), the cursor moving past it or staying (C=1); deleting what's shown and kept (a=d, everyd=but animation frames'), and answering, unless told to keep quiet (q=1,q=2). Asking whether an image could be shown (a=q) is answered too, so programs find out images work. - kitty's Unicode placeholders: a virtual placement (
U=1), then U+10EEEE printed where the image goes, its colour naming the image, its underline's colour the placement, and its marks the row and column. They're text, so they scroll, wrap, split and go through tmux as text does. - sixel (
DCS q … ST), as img2sixel, chafa and notcurses send it, answering4among the device attributes. Its pixels nothing paints are see-through, and its pixels are square, as every encoder in use sends them. An image whose data paints its pixels more than 16 times over, as data cheap to send and slow to draw would, isn't shown. - iTerm2's inline images (
OSC 1337 ; File=… : <base64> ST), asimgcatsends them: PNG, JPEG, GIF and WebP,inline=1, at awidthandheightin cells, pixels (px), a share of the terminal (%) orauto, in proportion unlesspreserveAspectRatio=0, anddoNotMoveCursor=1.
An image sits on the rows it covers: it scrolls with them into history and
back, is kept with them through an upgrade, and
goes once they leave history. Text printed over it doesn't take it away, as in
kitty; clearing the screen (CSI 2 J, as clear does), a reset and
switching screens do. Each cell takes the image's part that covers it, so
copying text over an image, and what an agent reads of the terminal, says it
once, as [image 640×480], where it starts, and a placeholder's cells give no
text. A selection shows over an image. The cursor goes after a kitty or iTerm2
image, on its last row; after a sixel image, to the line below it, where it
started. Until a window has said how big it draws a cell, a cell is taken as
10 by 20 pixels.
A terminal waits while its image is kept, which a big image or a slow file
can take a moment for: its output is held, and read again once it's kept.
It waits 10 seconds at most, a file's wait for its turn to be read included,
then goes on without the image. Terminals' images are kept on threads of
their own, so one slow to keep holds up neither chats' images nor what
windows and phones fetch. While an image is being sent, what's come of it
counts against the limit for all images, and one sent in parts whose last
part hasn't come in 30 seconds is given up on. An
image is kept by the daemon of the terminal's machine, as sent: a PNG stays a
PNG, and pixels sent bare are kept as one. Each terminal keeps its images
within the limits: past them, the image
shown least lately that isn't on the screen is let go, and its place says
[image dropped: over the 64 MB limit]; an image over the limit by itself
isn't kept, and kitty's command is answered EFBIG. An image on the screen,
or one a Unicode placeholder on the screen shows, is never let go, so a
program whose screen shows more than the limit can't show another until some
scroll off.
Files and shared memory #
kitty's commands may name where the image is instead of sending it: a file
(t=f), a temporary file (t=t), or POSIX shared memory (t=s). The
daemon whose terminal it is reads it, so a terminal on another machine reads
that machine's files, off its loop and in time (10 seconds), through a link
at the path's end as kitty does, but never a pipe, a device, or anything under
/proc, /sys or /dev (shared memory, under /dev/shm, aside), and never
more than the limit for an image. Every failure says the same,
EBADF:Failed to read image file, so a program can't find out what files
there are, though one could still tell whether a file is an image clackatoo
shows. A temporary file is taken away once it's read only if its name holds
tty-graphics-protocol and it's in /tmp, /dev/shm or the daemon's own
folder for temporary files, reached through no link; it's read and taken away
through that folder, so they're the same file. Shared memory is taken away
once read, as kitty does, whoever made it. Either is left where it is if what
was read doesn't look like the image it's said to be: a PNG that doesn't start
as one, say, or too few pixels.
Since a program anywhere you ssh to can ask for a file on your own machine,
as in kitty, only the image is ever shown, to you, and never its bytes said
back.
Answers #
Answers are made of fixed words and numbers clackatoo read itself, never
anything a program sent, so a file that's cat-ed can't type into the shell
with them. A command with neither i nor I gets no answer, and a command
that looks like an answer, as one a program prints back without reading it,
is never one, so it can't answer itself for ever.
Not done #
- Animation (
a=f,a=a,a=c): an animated image shows its first frame, and animation commands are answeredEINVAL. - A placement relative to another (
P,Q), answeredEINVAL. - iTerm2's
MultipartFile, and files that aren'tinline=1, which iTerm2 downloads. - Sixel's display mode (DECSDM, mode 80), and pixels that aren't square.
- Images in a terminal kept across a restart: its history comes back, each image its size in words where it was.
- Recordings keep what was printed, byte for byte, so an image sent in the terminal's output plays back, and one named by a file or shared memory plays back as unreadable.
- Images are drawn only by windows and phones of protocol 150 or later: an older one, or one through an older daemon, shows what's under them.
Not supported #
These are ignored:
- Setting colors:
OSC 4,10,11,12,104, and the others. Asking about them is answered. - Hyper and Meta as modifiers.
Secret Regions
clackatoo / Reference
A program can mark part of what it prints as private: a password a tool shows once, a token, a key. The terminal is told with an escape sequence before and after it, and treats what's between by the hints the program gives. Each hint only ever adds protection. Nothing a program prints can take one away, or uncover what another marked.
This page is the sequence's specification, written so other terminals can adopt it, and what clackatoo does with it.
The sequence #
OSC 46373 ; region ; start ; ID ; FLAGS ST
OSC 46373 ; region ; end ; ID ST
OSC 46373 ; forget ST
OSC is ESC ] and ST is ESC \; BEL ends it too, as for any OSC.
startopens a region. Every line printed on while it's open gets its hints.endcloses the newest open region whose ID isID.forgetasks the terminal to forget what it has kept of itself on disk, and what it shows now: what's printed after is kept as before. Any program can ask it, so any program can wipe what's kept of the terminal it runs in; it only ever keeps less.
ID is 1 to 64 letters, digits, -, _ or .. Whoever opens a region
picks it at random, at least 16 random bytes in hex, and never shows it. Only
the same ID ends the region, so nothing printed inside it, which never sees
the ID, can end it early.
FLAGS is a list of hints, split by commas:
| Flag | Means |
|---|---|
hide | Masked on screen until the user asks to see it. |
nosave | Never written to disk. |
noagent | Never shown to AI agents reading the terminal. |
secret | All three. |
private | nosave and noagent: shown, but kept nowhere and from no one but the user. |
A flag a terminal doesn't know is ignored, so the list can grow. A region
with no flag the terminal knows, empty flags or none at all
(OSC 46373 ; region ; start ; ID ST), fails closed: it's secret.
There's no flag to keep something: a program can never weaken a choice the
user made about what's kept.
The terminal answers none of these, and nothing is echoed back.
No other terminal or program we know of uses OSC 46373. clackatoo
v2026.11.36 alone used OSC 3008 for these; that's systemd's context
signalling (OSC 3008 ; start=…), so it moved, and clackatoo no longer
reads OSC 3008 at all.
Rules a terminal keeps #
-
Hints go by line. A line printed on while a region is open gets the hints of every open region, and keeps them for as long as it's kept: in history, through rewrapping on a resize, across an upgrade. Text a later program moves onto another line, as scrolling within margins or inserting lines does, takes them there too. A line written over later keeps them, until it's cleared.
-
An end must carry its start's ID. Regions nest: an end closes the newest open one with its ID, and leaves the others open.
-
The shell's next prompt closes every region, so a program can't leave one open over the user's later commands. Only the shell's own prompt counts, never one a program prints, so a terminal must be sure of it. clackatoo's shell integration signs it: it prints
OSC 46373 ; prompt ; clackatoo=SECRET STwith each prompt, with a secret only the shell and clackatoo know, never in its environment. Nothing else closes a region at a prompt: not OSC 133's marks, which any program, or a shell nested in one, as overssh, can print. The shell's next command, signed the same way, closes them too.The secret is the shell's, so anything running in the shell itself can read it: its startup files, its functions, whatever it sources. In fish, which runs clackatoo's integration after its startup files, so can a program
config.fishstarts, while the file that hands fish the secret is still there. A program the shell runs never can. -
Without shell integration, a region closes after 1,000 lines, each counted once however often it's printed on. No prompt will. With it, after 100,000, for a shell that never prompts again, as one replaced by
execor nested in another. -
A start is never dropped. Past 16 regions open at once, or with an ID that isn't one, a start's hints still apply, until the prompt or the cap.
-
Nothing else closes a region: not a reset (
ESC c), nor the alternate screen.
A region closed early only leaves out what's printed after. What was printed in it keeps its hints.
- Inside a region kept from agents (
noagent), a program's title and working directory (OSC 0, 2 and 7), its notifications and its progress (OSC 9, 777 and 99) are ignored: they go where agents and the phone see them.
In clackatoo #
hide: masked #
A hidden line is shown as ●●●●, dim, whatever it held. Each row of a
long line hidden is a row of the mask, so how many rows it took still
shows, but not where its text ends; while the cursor is on one, it's
hidden. The daemon masks it in everything it sends: the window, a window
on another machine, the
phone, and windows from before this release
alike; a daemon relaying masks it for its own clients the same way (see
through :connect). So what you copy or yank of it is the mask too, and a search (/,
?, n) never goes to it, nor lights it. A picture a program shows on a
hidden line (images) is never sent, nor is
its image, until you ask to see the line: then it's shown with the text,
in that window alone, and masked again with it. On a line kept from
agents, it's sent only where agents can't see it, whatever you ask to see,
and copies and agents' reads say nothing of it.
To see it, put the cursor on it in normal mode and press zv, or
Ctrl+click it. The run of hidden lines around it is shown as it is
in that window, and copies and searches there see it, for 30 seconds; zv
again masks it at once, and a line printed on afresh is masked again. A
window through :connect can too: see through
:connect. The phone can't, nor can an agent driving a
window (:agentaccess). In a window an agent can see, what you ask to see
is only what's hidden, never what's kept from agents too.
nosave: never on disk #
A nosave line is never written to the history kept across a
restart: a run
of them comes back as one line, [secret output not kept]. forget does
what :forget
does.
Recordings are a byte-for-byte copy of what a program printed, regions and all: a recorded terminal keeps everything, as you asked.
nosave is about the disk only: a nosave line is shown to agents unless
it's noagent too, as secret and private are.
noagent: kept from agents #
What an agent reads of a terminal, with read_terminal, by waiting for a
command, or in what a command it ran printed, has [secret] in place of
each run of noagent lines. A window that has given an agent control of
itself (:agentaccess) masks them too, as the agent sees what it draws.
Anything else that asks the daemon for a terminal without showing it, such
as clackatoo capture, which a command an agent runs could run, is sent
noagent lines masked; clackatoo capture --include-private asks for them
as a window showing the terminal does. That's a guard, not a boundary: any
program running as you can reach the daemon's socket, as a window does.
Through :connect #
When your daemon shows another machine's terminals, after
:connect, the daemon there treats
yours as a window of yours: both are your machines. It sends it every line
as it is, with its hints, and your daemon masks them for each of its own
clients, by its own config, as it masks its own terminals:
| Client of the daemon relaying | hide lines | noagent lines |
|---|---|---|
| A window | Masked until you ask to see them | Shown |
| A window that has given an agent control of itself | Masked until you ask | Masked |
| The phone | Masked, and can't ask to see them | Shown, as it's you too |
Anything not showing the terminal, as clackatoo capture | Masked | Masked |
| Another daemon relaying through it | Passed on with their hints, to mask the same way |
So a password prompt on your desktop shows as it is in your laptop's
window. zv there asks the desktop's daemon only which lines the run is,
and the laptop's shows them to that window alone, as it would its own: no
other window, phone or daemon relaying sees them. What a window copies,
searches, fetches of history and asks of a picture is asked of the desktop
masked as that window has it.
What's nosave is the terminal's own machine's
business: the daemon relaying keeps nothing of another machine's terminal
on its disk. A machine you keep out with
--no-share is never relayed at all.
If either daemon is from before this release, the one relaying is sent every
line with a hint masked, noagent ones too, and nothing can be shown
through it.
Passwords typed unseen #
A line you type a password on, at a prompt that doesn't show it (sudo,
ssh, read -s: anything reading a line with echo off), is marked
nosave and noagent by itself, as is one an agent types on. Nothing typed
there shows, but a program may show stars, or what it was told.
It's told by the terminal's settings as you type, so it misses:
- prompts drawn by a full-screen program, or any reading keys one at a time (raw mode), which draws what's typed itself;
sudoon a machine yousshinto, or insidetmuxorscreen, where the terminal clackatoo sees isssh's or theirs, which reads keys raw;- what you type before the prompt has turned echo off (typing ahead).
Config #
In the daemon's config (see config):
| Option | Default | What it does |
|---|---|---|
daemon.hints.hide | "mask" | "show" sends hidden lines as they are. |
daemon.hints.nosave | true | false writes nosave lines to disk too. |
daemon.hints.noagent | "hide" | "show" lets agents read noagent lines. |
daemon.hints.shown_for | 30 | How many seconds lines you asked to see stay shown. |
Using it #
clackatoo secret runs a command with what it prints in a region, its
output and its errors, with a fresh random ID, closed as the command ends,
even by Ctrl+C, a hangup or kill, after which it
ends by that signal too. Stopped with Ctrl+Z and
brought back with fg, it opens a fresh region; but the command carries on
at the same moment, so what it prints before then lands outside it. Its
output piped, or sent to a file, it marks nothing, as nothing it prints
reaches the terminal; its errors, if they do, still are. Killed outright
(kill -9), it closes nothing: the shell's next prompt does, or without
shell integration, the cap.
Where clackatoo isn't installed, as on a machine you ssh into, a shell
function does the same:
# bash or zsh
A terminal that doesn't know OSC 46373 ignores it, as it ignores any OSC it doesn't know, so these are safe anywhere.
Recordings
clackatoo / Reference
clackatoo new --record <FILE> saves everything the terminal's program
prints. Replaying a recording through clackatoo's emulator, at the recorded
size, rebuilds the same screen every time, however the bytes are split up.
clackatoo's tests are built on recordings of real programs, and its throughput
benchmarks replay one too.
Format #
A single header line, then the program's output, byte for byte:
clackatoo-recording v1 cols=80 rows=24
<raw output…>
The header is UTF-8 text ending in a newline. It starts with
clackatoo-recording v1, followed by space-separated key=value fields:
| Field | |
|---|---|
cols | The terminal's width. Required. |
rows | The terminal's height. Required. |
Readers ignore fields they don't know, so later versions can add fields without breaking v1 readers. Everything after the header's newline is output, including any further newlines.
The output is written as it arrives, so a recording can be read while the program is still running. Input typed into the terminal is not recorded. A recording has one size, so resizing the terminal stops it.
Privacy #
A recording contains everything the program displayed: paths, hostnames, file contents, and anything else that appeared on screen. Check a recording before sharing it.