Skip to content

fix: reject string-like shell commands#3092

Open
Aphroq wants to merge 1 commit intoopenai:mainfrom
Aphroq:fix/shell-call-command-normalization
Open

fix: reject string-like shell commands#3092
Aphroq wants to merge 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
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

1 participant