Skip to content

fix: sanitize empty Read pages arguments#572

Open
icebear0828 wants to merge 3 commits into
devfrom
fix/issue-558-read-pages-sanitize
Open

fix: sanitize empty Read pages arguments#572
icebear0828 wants to merge 3 commits into
devfrom
fix/issue-558-read-pages-sanitize

Conversation

@icebear0828
Copy link
Copy Markdown
Owner

Summary

  • Strip empty or whitespace-only pages from Claude Code Read tool calls during Codex -> Anthropic translation.
  • Preserve non-empty PDF page ranges and all non-Read tool arguments.
  • Add regression coverage for streamed and collected tool-call responses.

Verification

  • npm test -- --run tests/unit/translation/codex-to-anthropic-read-pages.test.ts tests/unit/translation/codex-to-anthropic.test.ts
  • npx vitest run tests/unit/translation/codex-to-anthropic.test.ts tests/unit/translation/tool-format.test.ts tests/unit/translation/anthropic-to-codex.test.ts
  • npm run build
  • npm test
  • Device A real Claude Code worktree smoke: 3/3 successful with gpt-5.5-xhigh, no Read tool validation error

Fixes #558

@icebear0828 icebear0828 reopened this May 17, 2026
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.

GPT5.5在claude code中反复尝试创建隔离工作树并反复失败

1 participant