Skip to content

P1: add process_resize and advertise runner-owned process lifetime - #62

Merged
novelKR merged 1 commit into
mainfrom
cursor/p1-pty-resize-disconnect
Sep 20, 2026
Merged

novelKR merged 1 commit into
mainfrom
cursor/p1-pty-resize-disconnect

Conversation

@novelKR

@novelKR novelKR commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add MCP process_resize for running PTY processes. Spawn stays 24×80; exec_command does not gain tty_size.
  • Advertise resize_supported: true and execution.process.capabilities.lifetime (owner=runner, client disconnect keeps running, UDS/gateway death terminates, no restart recovery).
  • Bump UDS WIRE_PROTOCOL to 5. Pipe resize is PROCESS_NOT_TTY; exited handles are PROCESS_NOT_RUNNING.

Test plan

  • cargo test -p codespace-domain --offline
  • cargo test --manifest-path crates/pty/Cargo.toml --offline
  • cargo test -p codespace-runner --offline (resize + UDS)
  • cargo test -p codespace-server --offline --lib -- mcp::tests
  • cargo test -p codespace-server --offline --test process -- process_resize exec_command_schema exec_tty http_disconnect
  • cargo test -p codespace-server --offline --test protocol_compat --test http_contract --test stdio_contract --test transport_contract
  • cargo test --offline --test e2e
  • cargo test --manifest-path crates/codex-runtime/Cargo.toml --offline --test runtime_binary
  • cargo clippy -p codespace-domain -p codespace-runner -p codespace-server --all-targets --offline -- -D warnings
  • python3 scripts/check_docs.py check
  • CI on this PR

Out of scope

  • exec_command.tty_size, per-command kill_on_disconnect
  • Durable reconnect / process discovery after a lost spawn response
  • File range/pagination, scheduler, process_find, hooks/skills

Made with Cursor

MCP/HTTP disconnect keeps managed processes running; UDS worker loss and
gateway shutdown still terminate the owned subtree. Spawn size stays 24x80.

Co-authored-by: Cursor <cursoragent@cursor.com>
@novelKR
novelKR merged commit 75d28d7 into main Sep 20, 2026
17 checks passed
@novelKR
novelKR deleted the cursor/p1-pty-resize-disconnect branch September 20, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant