Skip to content

cortland-ctl

cortland-ctl talks to Cortland’s control socket at ~/.config/cortland/cortland.sock (or $CORTLAND_SOCKET_PATH). Scripts, agents, and anything else running as you can use it to list panes, split them, run commands, read output, and wait on agents. Run it with no arguments to see every command.

Inside a Cortland pane, $CORTLAND_PANE_ID holds the current pane’s id. Anywhere a command takes <pane>, you can pass a pane id, a short id like #482, a pane name, or the title of a tab with one pane.

Terminal window
cortland-ctl pane list
cortland-ctl pane current
cortland-ctl pane split <pane> [--direction right|down] [--name n] [--cwd dir]
[--worktree branch] [--no-focus] [--exec command args...]
cortland-ctl pane rename <pane> [name]
cortland-ctl pane focus|close <pane>
cortland-ctl pane send-text <pane> <text>
cortland-ctl pane send-key <pane> <key>
cortland-ctl pane run <pane> <command>
cortland-ctl pane read <pane> [--source visible|recent] [--lines n] [--since cursor] [--json]
cortland-ctl new-tab [cwd]

--source visible, the default, reads the screen, which is enough to check progress. --source recent reads the scrollback transcript. In a pane running a full-screen program such as an agent CLI or vim, that’s the scrollback from before the program started plus the screen as it is now.

pane split --worktree <branch> creates or reuses a worktree at <repo>.worktrees/<branch> and opens the new pane there.

Sandbox flags Linux only

Section titled “Sandbox flags ”
Terminal window
cortland-ctl pane split <pane> --sandbox # bubblewrap sandbox
cortland-ctl pane split <pane> --no-network # sandboxed and offline
cortland-ctl pane sandbox-info [pane]
Terminal window
cortland-ctl wait agent-status <pane> <idle|working|ready|done> [--timeout ms]
cortland-ctl wait output <pane> <text> [--timeout ms]
cortland-ctl wait event [--pane pane] [--type agent_state|command|diff|telemetry] [--timeout ms]
cortland-ctl events [--follow] [--pane pane] [--type agent_state|command|diff]

events --follow streams JSONL (agent state changes, command completions, and edit-approval decisions) and replays the current pane state when it connects.

Terminal window
cortland-ctl agent-list # fleet status as JSON
cortland-ctl agent-summary [pane] # title, repo, last message, open question
cortland-ctl status [--follow] # Waybar-style JSON: working / needing you
cortland-ctl attention # raise Cortland on the next agent needing you
Terminal window
cortland-ctl run [--name n] [--direction right|down] [--cwd dir] [--worktree branch] -- command...
cortland-ctl send <pane> <message>
cortland-ctl wait children [--timeout ms] [--pane pane]
cortland-ctl task new <request | -> [--title t]
cortland-ctl task spawn <task> [--role r] [--part text] [--done-when text] [--worktree branch] -- command...
cortland-ctl task status [task]
cortland-ctl task note <task> <text>
cortland-ctl task accept <worker> [message]
cortland-ctl task close <worker> [--force]
cortland-ctl task done <task> [--summary text] [--force]
cortland-ctl ask <question | -> # from a worker, to its lead
cortland-ctl report <report | ->

See Lead and worker agents.

Terminal window
cortland-ctl worktree list [--cwd dir]
cortland-ctl worktree remove <branch> [--cwd dir] [--force]
cortland-ctl worktree prune [--cwd dir]
cortland-ctl approval list [--pane pane]
cortland-ctl approval accept <id> [--remember file|folder|session]
cortland-ctl approval reject <id>
Terminal window
cortland-ctl extension validate <folder>
cortland-ctl extension install <url>
cortland-ctl extension update <id>

cortland-ctl, cortland-mcp, and the agent hooks all speak one JSON protocol over the socket, one request per connection. The protocol reference describes it in full, for anyone writing their own client.