> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usesynth.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cockpit controls

> Keyboard controls, Agent Bridge modes, and the Stack TUI layout.

<Note>
  Documents Stack **`0.2.0-dev.20260701.1`**. Expanded in the
  [2026-07-01 changelog entry](/stack/changelog) — keyboard map, Agent Bridge, ops panels.
</Note>

Stack is a terminal cockpit: Agent input on the bottom, status rails on the sides,
and a center pane that switches between goal views, transcripts, and ops panels.

## Launch

```bash theme={null}
stack          # open the cockpit
stack doctor   # verify harness, stackd, and config before a long session
```

Stack auto-starts **`stackd`** on `127.0.0.1:8792` when healthy. See [stackd](/stack/stackd).

## Agent input

| Key          | Action                                                                                                                     |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- |
| `Enter`      | Send the prompt to Codex (or steer during an active turn)                                                                  |
| `Ctrl+Enter` | Queue the current input for the next turn                                                                                  |
| `Esc`        | Interrupt the active turn, or clear input when idle                                                                        |
| `Tab`        | Move focus: Agent input → model → effort → environment → Local Research → hosted optimizers → remote SMR → session history |
| `/exit`      | Quit Stack explicitly                                                                                                      |

Codex is the default harness. Configure it in [Quickstart § Configure with Codex](/stack/quickstart#configure-with-codex).

## Agent Bridge (`x`)

Press **`x`** to toggle **local-only** vs **remote-only** bridge mode.

| Mode       | Left rail shows                                                     |
| ---------- | ------------------------------------------------------------------- |
| **Local**  | Local GEPA / optimizer jobs and local research state                |
| **Remote** | Auth, hosted optimizers, live SMR runs, Factories, mediation target |

Keep modes separate so Codex does not mix local service actions with remote owner-route actions. Start remote ops with the **`stack_status`** MCP tool (see [Stack MCP](/stack/mcp)).

## Environment (dev / staging / prod)

When the environment control is focused:

| Key       | Action                                                      |
| --------- | ----------------------------------------------------------- |
| `j` / `k` | Move across dev, staging, and prod                          |
| `r`       | Refresh account, hosted optimizers, and remote SMR snapshot |

Set API keys per environment in [Configuration](/stack/configuration).

## Local Research (GEPA)

When Local Research is focused:

| Key       | Action                                      |
| --------- | ------------------------------------------- |
| `Enter`   | Start the local GEPA service (if installed) |
| `r`       | Refresh job list                            |
| `j` / `k` | Move through recent optimizer jobs          |

See [Optimizers](/stack/optimizers) for task setup.

## Hosted optimizers

When hosted optimizers are focused:

| Key             | Action                                     |
| --------------- | ------------------------------------------ |
| `r`             | Refresh jobs from the selected environment |
| `j` / `k`       | Select a job                               |
| `o`             | Cycle artifact names for the selected job  |
| `v` / `d` / `c` | Stage preview, download, or cancel         |
| `Enter`         | Confirm the staged action                  |

## Remote SMR and Factory

When Remote SMR is focused:

| Key             | Action                                                    |
| --------------- | --------------------------------------------------------- |
| `r`             | Refresh remote jobs                                       |
| `j` / `k`       | Select a run                                              |
| `f`             | Cycle Factories                                           |
| `t`             | Cycle mediation target (run → Factory → hosted optimizer) |
| `m`             | Stage a message to the selected run or Factory project    |
| `o`             | Cycle WorkProduct / artifact outputs                      |
| `v` / `d` / `l` | Preview output, download, or preview last saved download  |
| `Enter`         | Confirm staged action                                     |

Downloads persist under `.stack/downloads/<environment>/<run-id>/` and survive TUI restarts.

## Ops panel modes

Press **`p`** on the ops panel to cycle **Actors → Local → Synth Hosted**.

**Actors** shows Codex subagent policy, primary actor state, and transcript-derived workers. Press **`enter`** in Actors mode to toggle subagents for the next launch (when `STACK_CODEX_ARGS` is not locked).

## Sessions and logs

Stack writes session logs under `.stack/sessions/`. Remote visibility includes SMR runs, WorkProducts, artifacts, Factories, and hosted optimizer jobs for the selected environment.

## Next

* [Goal mode & monitor](/stack/goal-mode) — long Codex runs with a sidecar feed
* [Stack MCP](/stack/mcp) — tools Codex uses for live ops
* [Configuration](/stack/configuration) — `stack.config.json` and env vars
