hangar connect
Join a Hangar's terminal session.
Joins the Hangar's terminal, the same session the console shows. Each agent has a
window of its own, and in the console each window is a tab. Ctrl-b w lists the
windows and switches between them, clicking + new in the list along the bottom
opens another one with a shell, and Ctrl-b d leaves. If your own terminal already
uses Ctrl-b, press it twice: Ctrl-b Ctrl-b d.
Leaving stops nothing. What runs in the session keeps running with nobody connected, and connecting again finds it as it was. When an agent exits, its window stays open on a shell.
It needs a real terminal at both ends, so it cannot run from a script, a pipeline or a
coding agent's harness. An agent asked to open one checks with hangar get that the
Hangar is ready, then gives the person this command to run in their own terminal.
Usage
outplane hangar connect <HANGAR>Arguments
| Argument | Type | Description |
|---|---|---|
HANGAR | string | Hangar name or id. Required. |
Output
| Field | Type | Description |
|---|---|---|
hangar | string | |
hangarId | string | |
status | string | The Hangar's state as last recorded, as app list reports an application's: paused outranks the rest. |
connected | bool | Always false: only --dry-run produces these fields. |
Examples
Join a Hangar's session
outplane hangar connect myhangarJoin one in another team
outplane hangar connect myhangar --team acmeCheck which Hangar a name reaches and its state, without joining
outplane hangar connect myhangar --dry-run --json{
"connected": false,
"hangar": "myhangar",
"status": "ready"
}What to Know
- This command requires a terminal on both standard input and standard output. Behind a pipe, a redirect or an agent harness it exits 2 with shell.not_interactive and joins nothing. --dry-run is the only form that runs anywhere.
- The session belongs to the Hangar. Detaching, closing the terminal and losing the connection all leave everything in it running, and connecting again rejoins it as it is.
- A Hangar that is not running is refused with exit 6 and hangar.not_running before anything opens; the error is retryable only while it is starting. status under --dry-run is the state as last recorded and promises neither.
- Everyone joined with connect shares one screen and one current window. A console tab shows a window of its own and does not follow a switch made here. A window takes the size of whichever terminal used it last.
- There is no exit status. Detaching and a session the Hangar ended both exit 0; a connection that dropped exits 8 with shell.disconnected.
- Output is the far end's own bytes, including escape sequences and colour. It is not records, and --json and --fields do not apply to a live session.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
1 | internal | An unexpected failure in the CLI itself. |
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
6 | conflict | The resource already exists, or a concurrent change won. |
8 | upstream | The Out Plane API returned a server error. |
130 | interrupted | Cancelled by the user. |
The code on the error object is one of shell.not_interactive, shell.disconnected, hangar.not_found, hangar.ambiguous, hangar.not_running, usage.missing_argument, usage.empty_argument. Branch on that, or on the exit status. The message is prose and changes.