Command reference

oko-cli pty broker-adopt-external

Resumes a discovered external Claude/Codex session inside an Oko broker PTY.

Invocation

oko-cli pty broker-adopt-external [--target latest|latest_codex|PID|SESSION] [--text TEXT] [--no-submit] [--socket PATH]

Inputs and options

  • --target (also accepted as --pid, --session, or --session-id) defaults to latest.
  • --text sends text after readiness; --no-submit omits the carriage return.

Output and state effect

  • Starts a local authenticated model proxy, creates a resumed broker session, optionally sends text, and prints an adoption receipt.

Refusals and safe exits

  • Refuses unresolved/ambiguous targets, missing router/proxy identity configuration, unsupported external processes, and broker or send failures.