-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Add exec/run one-off turn API to app-server #9869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@codex review this |
There was a problem hiding this 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: f56757fee5
ℹ️ 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".
|
@codex review this |
There was a problem hiding this 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: 12453ee442
ℹ️ 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".
|
@codex review this |
There was a problem hiding this 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: 56f1f54241
ℹ️ 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 response_result { | ||
| Ok(response) => { | ||
| self.outgoing.send_response(request_id, response).await; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shut down exec/run threads after the turn finishes
exec_run creates a new thread via thread_manager.start_thread(config) but never removes or shuts it down once response_result is ready. I checked core/src/thread_manager.rs:398-400 and start_thread registers the thread in the manager’s internal map, so each exec/run call will leave an idle CodexThread and its background resources alive. In a client that uses exec/run repeatedly (e.g., title generation), this can accumulate threads unboundedly and degrade performance or exhaust resources. Consider calling thread_manager.remove_thread(&thread_id) and submitting Op::Shutdown after run_exec_turn_to_completion returns (on both success and error paths).
Useful? React with 👍 / 👎.
Summary
exec/runthat runs a single turn to completion and returns the final status/message inline (no streaming required).codex exec.Changes
codex-rs/app-server-protocol/src/protocol/common.rscodex-rs/app-server-protocol/src/protocol/v2.rscodex-rs/app-server/src/codex_message_processor.rscodex-rs/app-server/tests/suite/v2/exec_run.rscodex-rs/app-server/README.md