Skip to main content

A managed agent is more than a terminal

A managed agent combines three identities:
  • a provider conversation,
  • a Dure pane and agent record,
  • a Git worktree and branch.
Hmux owns the provider process and PTY. Dure attaches as a client over a versioned protocol. This process boundary is why closing the app window does not terminate a managed local agent.

Reattachment

When Dure reconnects, the host sends a canonical screen snapshot plus subsequent output. The client does not need to replay the entire terminal log just to paint the current screen. A generation-fenced controller lease decides which client may write. Additional clients can observe without silently stealing the keyboard from the current controller.

Worktree ownership

Each worktree-backed agent receives its own working directory and branch. This isolates Git indexes and file edits, but it does not isolate operating-system resources such as ports, processes, credentials, or network access.
A worktree is not a security sandbox. Provider approval settings and the permissions of your user account still determine what an agent can do.

Three different recovery cases

Managed versus ordinary panes

Run an agent CLI manually inside an ordinary terminal and Dure still recognizes the provider and its activity from the real process tree and terminal evidence. You can keep using the terminal normally without adding or registering the agent first. Automatic recognition is not the same as managed promotion. Start a managed provider session through the add-agent flow, or use the conversion action shown for a reviewed terminal state. Conversion runs only at a safe boundary because it must preserve the exact provider conversation and pane identity. See current limits before relying on the same behavior for SSH projects.