Skip to content

fix(tui): reject malformed tool arguments#3714

Merged
Hmbown merged 1 commit into
Hmbown:mainfrom
cyq1017:codex/codewhale-2886-malformed-tool-args
Jun 28, 2026
Merged

fix(tui): reject malformed tool arguments#3714
Hmbown merged 1 commit into
Hmbown:mainfrom
cyq1017:codex/codewhale-2886-malformed-tool-args

Conversation

@cyq1017

@cyq1017 cyq1017 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Refs #2886

Problem

Tool argument repair fell back to {} for unrecoverable model output, so malformed tool arguments could continue into normal dispatch.

Change

  • Return an argument repair error when raw arguments cannot be repaired into JSON.
  • Preserve raw malformed arguments in the public tool-use event.
  • Block execution with an invalid-input tool result and cover the flow in the tool lifecycle acceptance harness.

Verification

  • cargo test -p codewhale-tui --test tool_lifecycle_acceptance --locked -- --nocapture
  • cargo test -p codewhale-tui arg_repair --locked
  • cargo test -p codewhale-tui final_tool_input --locked
  • cargo fmt --all --check
  • git diff --check HEAD~1..HEAD

@cyq1017 cyq1017 marked this pull request as ready for review June 28, 2026 11:02
@cyq1017 cyq1017 requested a review from Hmbown as a code owner June 28, 2026 11:02
@Hmbown Hmbown merged commit a8a1cf8 into Hmbown:main Jun 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants