“Due to character-limit constraints…” message when using claude -p — CLI safeguard or model hallucination?

Resolved 💬 3 comments Opened Jul 25, 2025 by PastaPastaPasta Closed Nov 29, 2025

While running claude -p to iterate through a sequence of pull-request analyses, the model said:

"Due to character limit constraints, I need to continue with the remaining PRs in a batch process."

This appeared inside the model’s reply (not as a separate CLI log line) right after the fifth PR was processed, and the workflow then switched from the intended one-by-one verification to an alternative "process all remaining PRs in one Task" approach that obviously failed terribly.

Key Questions

  1. Source of the message

• Is the model made aware as it context limit or informed it is approaching a context limit, either when running with or without -p? Or is this simply a hallucination?

  1. Documentation gap

• Could the docs clarify whether the model is silently informed as it is approaching a context limit?

Why It Matters
• Debugging & reliability – If this is information injected by claude I need to adjust my CLAUDE.md files to instruct the agent how to handle this case. If it is not, I guess I need to add safe guards or additional prompting to avoid this hallucinated behavior.
• Documentation – Explicitly stating how/when the CLI handles context limits will improve UX and prevent false assumptions about model capabilities.

Thanks for clarifying this behaviour!

View original on GitHub ↗

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