Repository navigation
docs: correct the persistent-terminal takeover rule and CreateClient's identity rule - #958
Merged
Merged
Conversation
… is not downgraded - `packages/process-daemon/src/service.rs:1454-1455`: the Attach arm bails "terminal already has controller" for a Controller attach without takeover. - `packages/core/src/persistent-pty/index.ts`, `attach`: the daemon failure maps to `UnavailableError`. - `packages/server/src/handlers/persistent-pty.ts:185-191`: the server then closes the socket with 4404 "terminal unavailable".
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
What does this PR do?
It corrects two rule statements that were wrong: in XML summaries that ship in the package, in two exception messages, and in the docs. No rule changes; only the text that describes the rules.
A persistent-terminal Controller attach without Takeover fails. It is not downgraded to an observer. At the pinned upstream:
packages/process-daemon/src/service.rs:1454-1455);UnavailableError(packages/core/src/persistent-pty/index.ts,attach);packages/server/src/handlers/persistent-pty.ts:185-191).The SDK surfaces that from
ConnectAsyncasOpenCodeTransportException. Corrected in:PersistentPtyConnectOptions.Takeoversummary;PersistentPtyClient.ConnectAsyncsummary, and the 4404 exception message and its policy's summary, which named only a missing terminal or an absent daemon;client-runtime.md, where the persistent family's Close bullet now names the three causes 4404 carries (GLOSSARY.mdalready said it);docs/guide/terminals.md.CreateClient's identity rule is on final values.EndpointandPasswordmust stay null andUsernamemust stayopencode. SettingUsername = "opencode"is therefore accepted, and every other option, headers and the handler included, is carried into the client. Corrected in:OpenCodeServer.CreateClientandOpenCodeServerConnection.CreateClientsummaries;Related Issue(s):
Closes #949
Closes #950
🔄 Type of Change
🎯 Protocol & API Surface
spec/) is untouchedexternal/was hand-edited🧪 Testing
OpenCodeServerConnectionTests.CreateClient_Should_Refuse_Identity_Members_In_Every_Mode. The persistent 4404 tests assert only that the message contains4404, so they are unchanged.✅ Completion Gate
quality-gates.mdon this head (rebased ontomaster) did not finish green. Both local runs went red on tests this change does not touch:LoopbackUpgradeListenerTests.Listener_Should_Skip_A_PreRegistered_Conflict_And_Start_On_The_Next_Portfailed on net11.0 withHttpListenerExceptionerror 32, because a plain TCP socket took the reserved port between reserve and bind. That handling lives only in a test helper, and the flake is tracked in Flaky on Windows net11.0: the loopback upgrade listener fails with error 32 when a TCP socket takes its reserved port #956. Every gate step before the SDK tests passed in this run.TaskkillTreeKillTestsrows on net10.0, net11.0 and net472 reportedTimedOut, and one fixture's dispose timed out after its tree kill. The workstation was heavily loaded at the time. This is tracked in Flaky on a loaded Windows machine: TaskkillTreeKillTests report TimedOut on all three runtimes #959.📚 Documentation
docs/guide/terminals.md) updatedCHANGELOG.md: no entry. Neither rule changes, only the wording that describes it.✅ Code Quality Checklist
🔍 Additional Notes
Breaking Changes: none. Dependencies: none.