Describe the bug
When creating output files for tasks there is a regular but hard to replicate bug where the create file tool call returns a null or invalid response and then Copilot CLI tries to create the file unsuccessfully in an infinite loop.
✗ create create file
└ Multiple validation errors:
- "path": Required
- "file_text": Required
✗ create create file
└ Multiple validation errors:
- "path": Required
- "file_text": Required
... (repeats indefinitely)
Using copilot to investigate itself it returned a diagnosis that tool calls had null values set but the root cause seemed to be the size of the content for the new file. By intervening directly and telling Copilot CLI to break the file into smaller sub-files the issue was immediately resolved. Starting new sessions and attempting the same task resulted in consistent errors and there was no apparent workaround except after telling copilot to use smaller file sizes.
Expected behaviour would be the tool call itself would correctly identify the content size is over the limit and give copilot a useful error message saying the same (instead of generic null or invalid responses) so it can gracefully handle this situation without manual intervention.
Affected version
1.0.80
Steps to reproduce the behavior
Difficult but in general:
- Ask copilot to review and collect a large amount of information
- Have it try to output all of that info into a single file. The number of files is irrelevant, it must be a single, large output like a large implementation plan or very large research document.
Expected behavior
Instead of a generic tool failure there should be a specific error indicating the issue is file content size which allows the agent to recover gracefully
✗ create create file
└ Multiple validation errors:
- "content": Must be less than 200 chars
Oh, I see the file is too large, let me break it down into smaller files.
✓ create create file
└ Created ./path/my-file-a.md
✓ create create file
└ Created ./path/my-file-b.md
✓ create create file
└ Created ./path/my-file-c.md
Additional context
No response
Describe the bug
When creating output files for tasks there is a regular but hard to replicate bug where the create file tool call returns a null or invalid response and then Copilot CLI tries to create the file unsuccessfully in an infinite loop.
Using copilot to investigate itself it returned a diagnosis that tool calls had null values set but the root cause seemed to be the size of the content for the new file. By intervening directly and telling Copilot CLI to break the file into smaller sub-files the issue was immediately resolved. Starting new sessions and attempting the same task resulted in consistent errors and there was no apparent workaround except after telling copilot to use smaller file sizes.
Expected behaviour would be the tool call itself would correctly identify the content size is over the limit and give copilot a useful error message saying the same (instead of generic null or invalid responses) so it can gracefully handle this situation without manual intervention.
Affected version
1.0.80
Steps to reproduce the behavior
Difficult but in general:
Expected behavior
Instead of a generic tool failure there should be a specific error indicating the issue is file content size which allows the agent to recover gracefully
Additional context
No response