Skip to content

app-server-test-client websocket client and thread tools#11755

Merged
maxj-oai merged 1 commit intomainfrom
maxj/app-server-test-client-updates
Feb 13, 2026
Merged

app-server-test-client websocket client and thread tools#11755
maxj-oai merged 1 commit intomainfrom
maxj/app-server-test-client-updates

Conversation

@maxj-oai
Copy link
Contributor

@maxj-oai maxj-oai commented Feb 13, 2026

  • add websocket endpoint mode with default ws://127.0.0.1:4222 while keeping stdio codex-bin path compatibility
  • add thread-resume (follow stream) and thread-list commands for manual thread lifecycle testing
  • quickstart docs

@maxj-oai maxj-oai requested a review from owenlin0 February 13, 2026 17:22
@maxj-oai maxj-oai changed the title codex-rs: improve app-server-test-client transport and thread tools app-server-test-client websocket client and thread tools Feb 13, 2026
@maxj-oai maxj-oai marked this pull request as ready for review February 13, 2026 17:23
@maxj-oai maxj-oai enabled auto-merge (squash) February 13, 2026 17:25
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: a4ace3d3de

ℹ️ 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 +357 to +360
let url = Url::parse(listen).with_context(|| format!("invalid --listen URL `{listen}`"))?;
let port = url
.port_or_known_default()
.with_context(|| format!("unable to infer port from --listen URL `{listen}`"))?;
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 Reject invalid listen URLs before killing listeners

When serve --kill is used, this code extracts a port via Url::port_or_known_default() and kills all listeners on that port before the app-server validates --listen; for malformed/unsupported values like ws://127.0.0.1 or http://127.0.0.1:4222, this can terminate unrelated services (for example port 80/443 defaults) and then fail to start anyway. The app-server transport only accepts ws://IP:PORT (AppServerTransport::from_listen_url), so kill should run only after that stricter validation succeeds.

Useful? React with 👍 / 👎.

Comment on lines +797 to +801
fn connect(endpoint: &Endpoint, config_overrides: &[String]) -> Result<Self> {
match endpoint {
Endpoint::SpawnCodex(codex_bin) => Self::spawn_stdio(codex_bin, config_overrides),
Endpoint::ConnectWs(url) => Self::connect_websocket(url),
}
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 Fail when --config is used with websocket endpoint

In websocket mode, --config values are silently dropped because connect() forwards config_overrides only to stdio spawn and ignores them for Endpoint::ConnectWs; this makes CLI runs look configured while they are actually testing the remote server’s existing config, which can invalidate manual experiments. Since the CLI still advertises --config as a global forwarding option, this path should error or explicitly handle overrides instead of accepting a no-op.

Useful? React with 👍 / 👎.

@maxj-oai maxj-oai merged commit f687b07 into main Feb 13, 2026
33 checks passed
@maxj-oai maxj-oai deleted the maxj/app-server-test-client-updates branch February 13, 2026 17:34
@github-actions github-actions bot locked and limited conversation to collaborators Feb 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