Skip to content

refactor: unify zsh fork shell tool with fd-based bridge#12533

Closed
bolinfest wants to merge 1 commit intomainfrom
pr12533
Closed

refactor: unify zsh fork shell tool with fd-based bridge#12533
bolinfest wants to merge 1 commit intomainfrom
pr12533

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Feb 23, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4cfc116d7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ZSH_EXEC_BRIDGE_WRAPPER_SOCKET_ENV_VAR,
wrapper_socket_path.to_string_lossy().to_string(),
);
cmd.env(ZSH_EXEC_BRIDGE_SOCKET_ENV_VAR, fd);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Isolate wrapper IPC instead of reusing one stream socket FD

This stores a single inherited socket FD in the shell environment for the entire zsh session, so every EXEC_WRAPPER invocation in that process tree talks over the same AsyncSocket stream. When commands trigger concurrent execve calls (for example pipelines or backgrounded subcommands), multiple wrapper processes can race on one stream endpoint: frames/responses can be consumed by the wrong process or interleaved, leading to request_id mismatches and spurious command failures. The previous per-connection Unix listener model avoided cross-process response mix-ups.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't requests sent as framed messages to ensure they do not overlap? Do you have a recommended encoding scheme for messages to ensure they are handled by the correct process?

@bolinfest
Copy link
Copy Markdown
Collaborator Author

Abandoning in favor of #12584

@bolinfest bolinfest closed this Feb 23, 2026
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