[BUG] GitHub Action Error: Expected first content item to be text or thinking, but got undefined

Resolved 💬 4 comments Opened Jun 19, 2025 by szl97 Closed Jan 4, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • Other: <!-- specify -->
  • Claude CLI version: <!-- output of claude --version -->
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: <!-- e.g. iTerm2, Terminal App -->

Bug Description

<!-- A clear and concise description of the bug -->
I use Claude Code for CR. And use the api with the LLM openapi in my company. And the business service is provided by AWS.
I meet a error in the code review situation, I want to know if it is bacause the my company openapi has something wrong. Because I can use it with AWS Bedrock perfectly. Could you help me find the bugs?
The comment is finished.
<img width="864" alt="Image" src="https://github.com/user-attachments/assets/6e1f110e-7698-480c-9f1a-4b009ca83881" />

But the GitHub actions run with error:

<img width="1236" alt="Image" src="https://github.com/user-attachments/assets/3ea04e0e-f157-4837-9a45-8bb9be8bb2f6" />

Error: Expected first content item to be text or thinking, but got undefined
    at $y2 (file:///opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/@anthropic-ai/claude-code/cli.js:2456:5160)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async E (file:///opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/@anthropic-ai/claude-code/cli.js:2461:459)

I test the last request, like this:

<img width="1032" alt="Image" src="https://github.com/user-attachments/assets/4d97f43d-8d50-45eb-aabe-5df055d39a8d" />

Steps to Reproduce

  1. <!-- First step -->
  2. <!-- Second step -->
  3. <!-- And so on... -->

Expected Behavior

<!-- What you expected to happen -->

Actual Behavior

<!-- What actually happened -->

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗