AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(copilot): detect truncated write_workspace_file and guide LLM to source_path
When the LLM tries to inline a very large file as content in
write_workspace_file, the SDK silently truncates the tool call
arguments to {}. The tool then returns a generic 'filename required'
error, which the LLM doesn't understand and retries the same way
(wasting 500s+ per attempt, as seen in session c465eff9).
Now: when ALL parameters are missing (likely truncation), return an
actionable error explaining what happened and how to fix it — write
the file to disk with bash_exec first, then use source_path to copy
it to workspace. This gives the LLM a clear recovery path instead
of a retry loop. Z
Zamil Majdy committed
8ae344863e3c713fdde0e4e0bbbc04bca7a67859
Parent: cbd3ebc