Skip to content

Slash copy osc52 wsl support#13201

Merged
won-openai merged 9 commits intomainfrom
slash-copy-osc52-wsl-support
Mar 13, 2026
Merged

Slash copy osc52 wsl support#13201
won-openai merged 9 commits intomainfrom
slash-copy-osc52-wsl-support

Conversation

@won-openai
Copy link
Collaborator

This PR is a followup to the /copy feature to support WSL and SSH!

Copy link
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: e123ccd0aa

ℹ️ 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".

});

match stdin_result.and_then(|()| {
child.wait_with_output().map_err(|e| {
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge Call wait_with_output on owned Child instance

In the Ok(child) arm, child comes from child.as_mut(), so its type is &mut std::process::Child. wait_with_output consumes self, which cannot be called on a mutable reference. This causes a Linux compile error (E0507: cannot move out of *child) in the new WSL fallback path.

Useful? React with 👍 / 👎.

@won-openai won-openai force-pushed the slash-copy-osc52-wsl-support branch from 296a62c to 7f13c2b Compare March 9, 2026 20:59
@won-openai
Copy link
Collaborator Author

@codex review

Copy link
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: 7f13c2b57f

ℹ️ 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".

Comment on lines +100 to +105
child
.stdin
.take()
.ok_or_else(|| "clipboard unavailable: failed to open powershell.exe stdin".to_string())?
.write_all(text.as_bytes())
.map_err(|e| format!("clipboard unavailable: failed to write to powershell.exe: {e}"))?;
Copy link
Contributor

Choose a reason for hiding this comment

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

P2 Badge Reap spawned PowerShell process on stdin write errors

copy_via_wsl_clipboard spawns powershell.exe before writing to its stdin, but failures from stdin.take()/write_all return early. On those paths the Child is dropped without any wait* call, and dropped children are not reaped automatically, so repeated failures can accumulate zombies in WSL/Linux sessions.

Useful? React with 👍 / 👎.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is likely worth investigating more.

Copy link
Collaborator

@joshka-oai joshka-oai left a comment

Choose a reason for hiding this comment

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

General approval. I'd suggest throwing codex at the nits / refactoring ideas I put here.
I'd also want to make sure the powershell issue is covered.

Comment on lines +100 to +105
child
.stdin
.take()
.ok_or_else(|| "clipboard unavailable: failed to open powershell.exe stdin".to_string())?
.write_all(text.as_bytes())
.map_err(|e| format!("clipboard unavailable: failed to write to powershell.exe: {e}"))?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is likely worth investigating more.

@won-openai won-openai merged commit 6720caf into main Mar 13, 2026
32 checks passed
@won-openai won-openai deleted the slash-copy-osc52-wsl-support branch March 13, 2026 21:01
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants