---
title: "Console Agent Session Control"
---
import RepoFile from '../../../../components/RepoFile.astro'

**Status**: Partially implemented — instance discovery, console workspace tree-view (expandable instance rows, session pane, `N`/`X`/`P` instance-row actions), `hardline --shell`, tmux-backed primary session, secondary agent sessions via `hardline --new`, and console `a`/`x` keybindings are shipped. Phase 4 (live session reconciliation, agent runtime status, resource panel integration) remains open.

## Problem

Jackin's operator escape hatches still leak Docker details. When the operator wants a shell in a running environment, the practical path is a raw command such as:

```sh
docker exec -ti jackin-chainargos__agent-brown zsh
```

When the operator wants to reconnect to the original foreground agent, the path is `jackin hardline <container-name>`. That works for one primary process, but it does not give the console a first-class model of "this workspace or directory has one isolated container with multiple active agent sessions inside it."

The missing product model is a running container as an isolated collaboration environment, with one or more agent sessions inside it. The operator should be able to open `jackin console`, see all running instances for configured workspaces and ad-hoc directories, see each agent role and exact agent session inside those containers, attach to one, start another, open a shell, or hardline the original agent without remembering Docker names.

## Goals

- Operators can open a shell in a running jackin container from CLI and console without typing `docker exec`.
- Operators can see which configured workspaces and ad-hoc directories have running or preserved instances.
- Operators can see which agent sessions are running inside each instance.
- Operators can reconnect to the primary session through the console.
- Operators can start and reconnect to a secondary agent session inside the same container.
- Exiting one agent session does not stop the container or other concurrent sessions.
- Raw Docker container names are no longer required for normal shell, hardline, or session attach flows.

## Shipped

The workspace list is now an expandable tree. Workspace rows with active containers show a running indicator; pressing `→` reveals instance child rows showing instance ID, role, agent, and status. Selecting an instance row opens a session pane listing recorded tmux sessions, with `Enter` (reconnect), `N` (new session with agent picker), `X` (shell), and `P` (purge) actions. `←` collapses the tree and returns to the workspace row. The workspace detail pane shows a compact running-instances badge when the tree is collapsed.

The session substrate and CLI escape hatches are documented in [Container Supervisor and Session Model](/reference/architecture/) (internals) and in the [`jackin hardline` command reference](/commands/hardline/). The console tree-view is documented in [`jackin console`](/commands/console/).

## Phase 4 — Rich operator coordination *(open)*

- Per-session idle/busy indicator in the console Instances panel (requires integration with the [Agent Runtime Status](/reference/roadmap/agent-runtime-status/) roadmap item).
- Per-instance CPU/RAM usage in the console resource panel (requires integration with the [Console Resource Panel](/reference/roadmap/console-resource-panel/) roadmap item).
- Session reconciliation: query `tmux list-sessions` on console refresh and update the `sessions` field in the instance manifest so the Instances panel reflects live session state.
