# Saved Setups

Save a workspace once. Return to it, or open a fresh copy.

Canonical page: https://thebestterminal.com/docs/saved-setups

Harness 2.3.2 · Documentation reviewed 2026-10-13

## Save your current session

1. Arrange the tabs and splits you want to reuse.
2. Choose Session → Saved Setups… and select the host that owns the session.
3. Choose Save Current Session, give the setup a name, and review its recipe.

A setup captures tab names, split orientation and ratios, directories, and shell paths. It does not copy running command arguments or agent conversations. Add a startup command to an individual pane only when you deliberately want it in the recipe.

## Open or open a new copy

| Action | Behavior |
| --- | --- |
| Open | Returns to the most recently selected running session for this setup, or creates one when needed. |
| Open New Copy | Always creates a fresh session from the recipe. |
| Reconnect or return | Does not rerun startup commands. |

> **Startup commands run only on creation**
>
> A startup command can start a service or change files. Review every command and its host before opening a new setup session. Do not put credentials into exported recipes.

## Edit, share, and update

The editor supports changing the recipe, duplicating a setup, and importing or exporting JSON. Import opens the editor for review; it never executes commands. Update from Current previews the replacement recipe, and startup commands must be entered again.

Directories and shell paths are absolute paths on the selected host. A recipe from another machine may need edits before opening. Removing a setup definition does not close its running sessions.

## Handle a partial open safely

Harness preflights directories and shells. If a later spawn fails, it keeps the partial layout, runs no startup commands, and reports what needs repair. Inspect the existing result before attempting anything else; opening repeated copies is not a repair strategy.

The store supports up to 200 definitions, 32 tabs and 64 panes per definition, with a maximum layout nesting depth of 16.

## Use the workspace API

**Capture and inspect a setup**

```shell
harness-cli api call setup.capture --args '{"name":"Project"}'
harness-cli api call setup.list --args '{}'
```

**Replace SETUP_UUID with an ID from setup.list**

```shell
harness-cli api call setup.open --args '{"id":"SETUP_UUID","mode":"existing"}'
```

setup.open can create processes. Inspect the definition before calling it. Use the installed schemas for editing or deleting a recipe:

**Read method schemas**

```shell
harness-cli api describe setup.save
harness-cli api describe setup.delete
```

> **Different from legacy save-layout**
>
> The older save-layout command can save running command lines. Saved Setups deliberately does not infer those startup commands. Choose the mechanism whose behavior you need.

## Source references

- [docs/WORKSPACE-WORKFLOWS.md](https://github.com/robzilla1738/harness-terminal/blob/2f843e5625086fbd33e58a724c632e47bfe66d1d/docs/WORKSPACE-WORKFLOWS.md)

- [docs/COMMANDS.md](https://github.com/robzilla1738/harness-terminal/blob/2f843e5625086fbd33e58a724c632e47bfe66d1d/docs/COMMANDS.md)

## Related guides

- https://thebestterminal.com/docs/recently-closed

- https://thebestterminal.com/docs/sessions-and-panes

- https://thebestterminal.com/docs/automation-and-api

