feat(host-bash-proxy): resolve and validate target client; pass targetClientId through broadcast#29313
Conversation
…tClientId through broadcast
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7d81ca123
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } else if (capableClients.length > 1) { | ||
| return Promise.resolve({ | ||
| content: `Error: multiple clients support host_bash (${capableClients.length} connected). Specify which client to use with \`target_client_id\`. Run \`assistant clients list --capability host_bash\` to see client IDs and labels.`, | ||
| isError: true, | ||
| }); |
There was a problem hiding this comment.
Preserve host_bash execution when multiple clients connected
Returning an error whenever capableClients.length > 1 makes host_bash unusable in multi-client sessions, because no current caller can actually provide a target client: HostShellTool still defines no target_client_id input and its HostBashProxy.instance.request(...) calls never pass targetClientId (see assistant/src/tools/host-terminal/host-shell.ts). Before this change, commands still executed by routing to a recent capable client; after this commit they fail with an instruction users/LLM cannot satisfy through the existing tool interface.
Useful? React with 👍 / 👎.
5a4ec61
into
Credence/targeted-host-proxy
Summary
Part of plan: targeted-host-proxy.md (PR 4 of 8)