Skip to content

Conversation

@dkundel-openai
Copy link
Contributor

No description provided.

Copy link

@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 +1991 to +2003
def _coerce_shell_call(tool_call: Any) -> ShellCallData:
call_id = _extract_shell_call_id(tool_call)
action_payload = _get_mapping_or_attr(tool_call, "action")
if action_payload is None:
raise ModelBehaviorError("Shell call is missing an action payload.")

commands_value = _get_mapping_or_attr(action_payload, "commands")
if not isinstance(commands_value, Sequence):
raise ModelBehaviorError("Shell call action is missing commands.")
commands: list[str] = []
for entry in commands_value:
if entry is None:
continue

Choose a reason for hiding this comment

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

P1 Badge Shell tool rejects legacy LocalShellCall payloads

When a ShellTool is registered, _process_response now routes both the new shell_call items and the legacy LocalShellCall items through ShellAction. However, _coerce_shell_call only looks for an action.commands sequence. LocalShellCallAction produced by today’s models exposes the field as command, so commands_value is always None and this code raises ModelBehaviorError("Shell call action is missing commands."). That means any agent that enables the new shell tool immediately crashes as soon as a legacy local_shell_call is emitted (the current behavior for GPT‑4/5), making the feature unusable. The parser must accept both command and commands (and coerce a single list into the new structure) to keep backward compatibility.

Useful? React with 👍 / 👎.

@dkundel-openai dkundel-openai merged commit 767cc00 into main Nov 13, 2025
9 checks passed
@dkundel-openai dkundel-openai deleted the dkundel/shell-apply-patch branch November 13, 2025 17:55
@seratch seratch added enhancement New feature or request feature:core labels Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants