Layouts and panes

A Corral layout puts the agent, the script, the console and the variables in one herdr tab. There are two arrangements, and you can expand or swap panes without losing anything, because every session keeps running in its herdr pane.

The two layouts

WhereFocused on the agent (ctrl+b a)Focused on the code (ctrl+b shift+a)
Left, 52 % of the widthClaude CodeScript
Right, topScriptClaude Code
Right, middleConsoleConsole
Right, bottomVariablesVariables

On the right, the two upper panes share 73 % of the height, 57/43, and the variables take the other 27 %. The editor opens with the file explorer in view.

ctrl+b a is the default: the agent gets the big pane. Use ctrl+b shift+a when you spend more time in the code; it needs the editor (Fresh). Each one opens a new tab, and both are in the palette (ctrl+b space), in the «Layouts» group.

From the command line

$ corral layout
$ corral layout --focus code
$ corral layout --shell
$ corral layout --ratio 0.6

--focus code opens the layout focused on the code. --shell adds a shell next to the variables. --ratio changes the width of the left pane (0.516 by default). --editor '' leaves out the script and --agent '' leaves a shell where Claude would be. Commands has the rest of the options.

Another agent

The agent pane runs Claude Code. To run another agent there every time, set its command:

$ corral config agent codex

--agent and the CORRAL_AGENT variable win over this setting.

Expand the script or the console

ctrl+b t expands the pane you are in (the script or the console) to the whole area they share, above the variables. In the layout focused on the code, it expands Claude or the console. ctrl+b t again brings both back, with the same proportion as before.

herdr doesn't shrink a pane below 10 %, so the pane that makes room moves to a tab of its own, "corral (hidden)", where it keeps running. Ctrl+R and Claude keep running code in the console even while you can't see it.

$ corral toggle script
$ corral toggle console
$ corral toggle both

From the command line, say what you want to see: script, console or both. In the layout focused on the code, use agent instead of script. Without an argument, corral toggle does what the shortcut does.

Switch between R and Python

ctrl+b y switches the console spot between R and Python. The first time, it starts Python. The console you are not using waits in the hidden tab and keeps its variables; if you go to that tab, you can use it there as well.

$ corral switch python
$ corral switch r

Running code switches too: Ctrl+R or F5 in a .py file brings the Python console, and in a .R file, the R one. The variables pane, Mirador and View() follow the console in view. Consoles has the details.

The hidden tab

Each workspace has at most one hidden tab, named "corral (oculto)". It holds the pane that ctrl+b t moved out of the way and the console of the language you are not using. Everything there keeps running, and Corral brings each pane back to its place when you need it.

Close Corral

ctrl+b shift+c (corral close) closes the script, the console and the variables, including the panes in the hidden tab, and leaves the tab with Claude, like any herdr tab. Closing the console ends that R session, and the unsaved draft is discarded. Mirador stays open until you close its window; corral mirador --stop stops its server.

Add panes to a layout you already have

If you set up your own tab and marked a pane as the R console (ctrl+b m), you can add the other panes to it:

$ corral script
$ corral vars --split

corral script adds the editor over the console, with a new draft or with the file you name. corral vars --split adds the variables pane under the R console. Both need an R console in the workspace.

Corral finds its panes by their herdr labels: corral:script, corral:r, corral:python, corral:vars and corral:shell. A workspace has one of each; a new layout takes the labels away from older panes.

Sessions live in herdr panes

Everything with state lives in a herdr pane: the R and Python sessions and the agents. The viewers (the variables window, tables, Mirador) read from those sessions each time they open, so you can close them at any time and lose nothing. Closing the terminal window loses nothing either, because herdr keeps the panes running.

If the herdr server itself stops (a Windows restart, wsl --shutdown), the R and Python sessions are lost. herdr restores the panes, but not their memory.

When Corral acts

Corral changes nothing until you ask: