Skip to content

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Dec 9, 2025

No description provided.

@jif-oai
Copy link
Collaborator Author

jif-oai commented Dec 9, 2025

@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.

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


let open_call_id = "uexec-delayed-open";
let open_args = json!({
"cmd": "sleep 5 && echo MARKER1 && sleep 5 && echo MARKER2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

anything we can do to avoid a 15 second test?

Copy link
Collaborator

Choose a reason for hiding this comment

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

like start a tail -f and write to a file that's being tailed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we don't want it to be flaky, not easily. Would be cool to have a custom shell command that waits for a signal from us

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does mkfifo work?

/// events) can reference the exact PTY bytes corresponding to this tool call,
/// while the `output` field remains the human‑oriented, possibly truncated
/// representation used in tool responses.
pub raw_output: Vec<u8>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar question to above, do we need separate output on TerminalInteraction?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same answer. I would argue that yes because this can contain truncation or so

let yield_time_ms = clamp_yield_time(request.yield_time_ms);

let start = Instant::now();
// For the initial exec_command call, we both stream output to events
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we read from CommandTranscript ? So there is only one way for output to flow. Similarly with exit code, is it better to have a single thing watching for exit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We would beed a notify in there then...

Copy link
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

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

The flow of output/error codes feels a bit complicated with two paralel systems used to serve events and write_stdin.

@jif-oai
Copy link
Collaborator Author

jif-oai commented Dec 10, 2025

@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.

ℹ️ 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 +86 to +90
tokio::spawn(async move {
exit_token.cancelled().await;

let exit_code = session.exit_code().unwrap_or(-1);
let duration = Instant::now().saturating_duration_since(started_at);
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 Clean up unified exec sessions after exit watcher emits end

Long‑running unified exec sessions are inserted into the session store (and their process IDs reserved) but when the background exit watcher fires it only emits ExecCommandEnd and returns, never removing the session entry or releasing the process ID. If a command finishes without any subsequent write_stdin poll, the stale entry stays counted toward the session limits, causing unnecessary "Waiting for …" warnings and eventual pruning of newer sessions even though the completed PTY has already exited. The watcher here needs to clean up the store/reserved IDs once it sends the end event.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is on purpose

@jif-oai jif-oai merged commit 0ad5498 into main Dec 10, 2025
26 checks passed
@jif-oai jif-oai deleted the jif/unified-exec-events-2 branch December 10, 2025 10:30
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2025
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.

3 participants