Support multiple SSH remote contexts in a single Codex thread

Open 💬 0 comments Opened May 16, 2026 by chac4l

Problem

Codex App appears to bind each thread to one selected local or SSH remote project at a time. This works well for single-host tasks, but it becomes limiting for infrastructure work that depends on comparing or coordinating multiple servers.

Use cases

  • Compare deployment state between two servers.
  • Migrate a service from one host to another.
  • Diagnose failures where one server depends on another.
  • Compare staging and production environments.
  • Audit Docker stacks, environment variables, logs, workers, app servers, database servers, and gateway servers across different machines.

Current workaround

Users have to open separate Codex threads for each SSH host, run diagnostics separately, manually copy summaries between chats, and coordinate decisions outside Codex. This is inefficient, error prone, and loses context.

Feature request

Allow a single Codex thread to attach to more than one SSH remote connection at the same time.

Suggested design:

  • Let users select multiple SSH connections for one thread.
  • Show each remote as a named context, for example:
  • server-a:/app/service
  • server-b:/app/worker
  • Require every command, file read, and file edit to be explicitly scoped to one host.
  • Make the active host visually obvious before running any command.
  • Support read-only mode for secondary hosts when the user only needs comparison or diagnostics.
  • Keep approvals separated per host.

Security and UX safeguards

  • Every shell command should show the target host before execution.
  • Every file diff should include the target host and path.
  • Destructive operations should require approval with the host name clearly visible.
  • Codex should never infer that permission on one host implies permission on another.
  • The UI should make cross-host operations explicit.

Expected benefit

This would make Codex more useful for infrastructure work, migrations, distributed systems, multi-server deployments, and staging/production audits. It would reduce manual copy-paste between separate threads while preserving clear host-level safety boundaries.

Suggested labels

enhancement, ssh, remote-connections, feature-request

View original on GitHub ↗