pw code attach
pw code attach
Attach the TUI to pw code sessions on a remote resource
Synopsis
Connect this terminal's TUI to the pw code daemon on a remote resource over SSH. Sessions run on the resource — its workspace, its tools, its transcripts — and this TUI renders and steers them.
With only a resource, the session picker lists the resource's sessions. Append /<session-id> to attach to one directly, or pass -w with a remote workspace path to start a new session there.
Needs SSH access to the resource (as for pw ssh) and a pw version with the code daemon on it; the daemon starts there automatically.
pw code attach [flags] <resource>[/<session-id>]Examples
pw code attach gcpv2
# Attach to one session directly
pw code attach gcpv2/20260819-101500-ab12cd34
# Start a new session in a remote workspace
pw code attach -w /home/user/project -m org:openai/gpt-5.2 gcpv2Options
--allocation string Budget allocation for a new session (required for org provider models)
--effort string Reasoning effort for a new session: default, none, minimal, low, medium, high, xhigh, or max
-h, --help help for attach
-m, --model string Model ID for a new session (run 'pw ai models ls' to list)
--permission-mode string Permission mode: read-only, accept-edits, auto, bypass-permissions, plan
-w, --workspace string Absolute workspace path on the resource for a new sessionOptions inherited from parent commands
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Overrides PW_PLATFORM_HOST environment variable and the current context's server.
-v, --verbose Enable verbose loggingSEE ALSO
- pw code - AI coding agent