Skip to content

Conversation

@charley-oai
Copy link
Collaborator

Summary

  • Adds a new JSON-RPC method exec/run that runs a single turn to completion and returns the final status/message inline (no streaming required).
  • Fixes titlegen for non-CLI clients that currently depend on codex exec.

Changes

  • Protocol:
    • codex-rs/app-server-protocol/src/protocol/common.rs
    • codex-rs/app-server-protocol/src/protocol/v2.rs
  • Server:
    • codex-rs/app-server/src/codex_message_processor.rs
  • Tests:
    • codex-rs/app-server/tests/suite/v2/exec_run.rs
  • Docs:
    • codex-rs/app-server/README.md

@charley-oai
Copy link
Collaborator Author

@codex review this

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: 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".

@charley-oai charley-oai marked this pull request as draft January 26, 2026 01:20
@charley-oai
Copy link
Collaborator Author

@codex review this

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: 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".

@charley-oai charley-oai marked this pull request as ready for review January 26, 2026 06:07
@charley-oai
Copy link
Collaborator Author

@codex review this

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: 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".

Comment on lines +1546 to +1549
match response_result {
Ok(response) => {
self.outgoing.send_response(request_id, response).await;
}
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 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 👍 / 👎.

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.

2 participants