Skip to content

fix: reject string-like shell commands#3092

Merged
seratch merged 1 commit intoopenai:mainfrom
Aphroq:fix/shell-call-command-normalization
May 4, 2026
Merged

fix: reject string-like shell commands#3092
seratch merged 1 commit intoopenai:mainfrom
Aphroq:fix/shell-call-command-normalization

Conversation

@Aphroq
Copy link
Copy Markdown
Contributor

@Aphroq Aphroq commented May 2, 2026

Summary

This pull request fixes shell call command normalization when the model returns a string-like action.commands payload.

  • reject top-level str, bytes, and bytearray values in coerce_shell_call() instead of treating them as generic sequences
  • raise a clear ModelBehaviorError before malformed payloads can be split into character-by-character commands
  • add regression coverage for string-like commands payloads while keeping valid list-based shell calls unchanged

Test plan

  • uv run pytest tests/test_shell_call_serialization.py
  • bash .agents/skills/code-change-verification/scripts/run.sh

Issue number

Closes #3091

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@github-actions github-actions Bot added bug Something isn't working feature:core labels May 2, 2026
@seratch
Copy link
Copy Markdown
Member

seratch commented May 4, 2026

@codex review

@seratch seratch added this to the 0.15.x milestone May 4, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ 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".

@seratch seratch merged commit 4b5a0b8 into openai:main May 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coerce_shell_call splits string commands into character lists

2 participants