Add framed machine attach stream - #141
Merged
schickling-assistant merged 3 commits intoJul 31, 2026
Merged
Conversation
schickling-assistant
force-pushed
the
schickling-assistant/2026-07-31-machine-attach-stream
branch
from
July 31, 2026 11:47
835b025 to
edbcc7b
Compare
schickling
marked this pull request as ready for review
July 31, 2026 12:37
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
|
Thank you, Nathan — the push to preserve PTY’s existing responsibilities while exposing one ordered machine stream led to a much simpler boundary: one CLI process, one framed descriptor, and no duplicated socket client in Fractal. Posted on behalf of @schickling
|
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.

Builds on the ordered initial attach synchronization merged in #140; this branch is rebased onto that implementation rather than duplicating its server-side gating.
Why
Embedded terminal clients need effective geometry and terminal bytes on one ordered, machine-readable stream. Rendering raw bytes to stdout loses the GEOMETRY frame, while replacing stdout would also remove the controlling TTY used for input and resize negotiation.
What
Contract
The descriptor must be writable and at least 3. pty flushes but never closes it; the caller owns EOF. stderr and terminal status text never enter the framed stream. Machine mode implies attach-only behavior and does not execute retained restart metadata.
Validation
Tradeoffs
A dedicated inherited descriptor is more explicit than multiplexing stdout and retains normal terminal ownership. Loading the CLI in the launcher process removes the prior child/signal-forwarding layer and preserves arbitrary inherited descriptors without parsing CLI options twice. The versioned flag leaves room for a future incompatible stream contract. Initial snapshot gating remains owned by #140 rather than being duplicated in the client.
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile