Saved project scripts: before/after proof Original: https://github.com/pingdotgg/t3code/pull/8714 Bottom head: 0e49e3d53166f86f0f5cd615b83c3e816b3c09a9 Integrated head: 5ed59bd2fcf6ac0da03d7b4dba3396fa7e10ee1c Captured: 2026-10-20T01:56:21.587Z Clean tracked worktree: True BEFORE -> AFTER Queued-exit and authority mutation controls fail when their guards are removed, then pass after exact restoration. R1 ordinary output blocked behind lifecycle lock -> unchanged strengthened output regression passes. Continuous-output duplicate creation waited on history flush -> unchanged held-write regression passes. R3 startup held executor while waiting on workspace lease -> unchanged executor-under-lease regression passes. R4 stop held executor while waiting for terminal held by lease-waiting open -> RED two-second diagnostic, release-lease-first control PASS, unchanged test GREEN after terminal-first guarded operation. FINAL FOCUSED CHECKS: 255 passed; 296 unrelated registration cases unselected. 103 Manager + 23 project/contracts + 4 registration/Claude + 125 existing summary cases. Full client-runtime types, scoped server diagnostics, targeted lint/format and whitespace passed. REAL LINUX NODE-PTY SERVICE PROOF: - bounded discovery: {"threadId": "child", "projectId": "project:mcp-test", "scripts": [{"scriptId": "script-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "name": "Fixture 🚀 café", "icon": "play", "runOnWorktreeCreate": false, "previewUrl": "http://127.0.0.1:65534", "autoOpenPreview": true, "commandPreview": "node -e \"req", "commandCharacters": 292, "commandTruncated": true}], "total": 2, "nextCursor": 1} - read-only discovery and denied execution: {"readonly": "capability_denied", "plan": "capability_denied", "spawns": 0} - real PTY saved command and derived context: {"opened": {"threadId": "child", "projectId": "project:mcp-test", "scriptId": "script-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "terminalId": "owned", "outcome": "input_accepted", "terminal": {"threadId": "child", "terminalId": "owned", "cwd": "/tmp/t3-saved-scripts-live-v7G4G2/project/worktree", "worktreePath": "/tmp/t3-saved-scripts-live-v7G4G2/project/worktree", "status": "running", "pid": 1215615, "history": "", "exitCode": null, "exitSignal": null, "label": "owned", "updatedAt": "2026-10-20T01:56:21.786Z", "sequence": 1}, "inputAcceptance": {"accepted": true, "characters": 294}, "error": null, "previewUrl": "http://127.0.0.1:65534", "previewAutoOpened": false}, "execution": {"cwd": "/tmp/t3-saved-scripts-live-v7G4G2/project/worktree", "root": "/tmp/t3-saved-scripts-live-v7G4G2/project", "worktree": "/tmp/t3-saved-scripts-live-v7G4G2/project/worktree", "provider": "fixture-target"}, "duplicate": "terminal_already_exists"} - stop after saved definition removed: {"stopped": {"threadId": "child", "projectId": "project:mcp-test", "scriptId": "script-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "terminalId": "owned", "stopped": true}, "realPtyExited": true} - replacement remains live after stale stop: {"code": "script_run_not_found", "replacementPid": 1215633} - natural PTY exit invalidates ownership: {"code": "script_run_not_found"} - real PTY output streams while another terminal startup holds thread lock: {"streamingTerminal": "streaming", "slowTerminal": "slow-open", "outputObservedBeforeStartupReleased": true} - executor remains available while script startup waits on workspace lease: {"workspaceLeaseHeld": true, "targetExecutorAcquired": true} - executor remains available during three-lock contention: {"workspaceLeaseHeld": true, "ordinaryOpenWaitingOnLease": true, "stopRequested": true, "callerExecutorAcquiredBeforeLeaseReleased": true} - owned process cleanup: {"spawned": 8, "allRealPtysExited": true} Scope: actual TerminalManager, node-pty, ThreadCommandExecutor and withWorkspaceLease; fixture project/thread records and provider environment marker. Shared executor observer delegates to actual lock. The contention models rollback lease ordering; it does not execute CheckpointRollbackService. No browser/client UI, HTTP MCP/event-store replay, provider-account CLI, server restart, native OS/device, relay/tunnel or remote proof claimed. Three-lock source fix takes terminal lock before ordered caller/target executor locks; current authority remains held through exact write/close. No test changes in implementation fix. Test diff: original upper contribution 804 net lines; current five existing owners 747 net lines, 11 new behavior declarations across three owners. No new test files.