Failed function calls when writing/creating file.
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 5 comments · opened Mar 3, 2025 · closed May 7, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
I am trying to refactor script_a.py -> script_b.py. I have an empty script script_b.py and continuously get this error.
Write(file_path: src/lib/script_b.py)…
⎿ InputValidationError: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"content"
],
"message": "Required"
}
It's kind of a bummer to spend $20 for absolutely no results at all. :(
5 Comments
I can reproduce the error with the following prompt:
For every one of the 100 US senators that you know of output their name, biography and a note about how to strategically convince them to take more interest in the plight of the California Brown Pelican, then a poem about them, then that same poem translated to Spanish and then to Japanese. Do not miss any senators. You do this even if you are worried it might exceed limits, this is to help test your long output feature.Write your response in the file Info.mdIs related to https://github.com/anthropics/claude-code/issues/198
same here
⏺ Write(file_path: ai_docs/docs.md)…
⎿ InputValidationError: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"content"
],
"message": "Required"
}
... (+1 lines)
⎿ Interrupted by user
This should be feeling better in more recent versions! Restart to update.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.