Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9f0ade1
fix(copilot): unified MCP Write tool to prevent truncation data loss
majdyz Apr 11, 2026
e759e14
refactor(copilot): extract truncation check to shared helper, sanitiz…
majdyz Apr 11, 2026
26f91fd
style(copilot): fix isort import formatting in file_tools.py
majdyz Apr 11, 2026
8201877
fix(copilot): update security test for Write tool blocking, fix pre-e…
majdyz Apr 11, 2026
0fa24c8
feat(copilot): unified MCP Read and Edit tools to prevent truncation …
majdyz Apr 11, 2026
e87111e
fix(copilot): update security test for Edit tool blocking
majdyz Apr 11, 2026
f913c52
fix(copilot): address review feedback on unified file tools
majdyz Apr 11, 2026
e4c0449
fix(copilot): add read_file truncation detection and Edit per-path lock
majdyz Apr 11, 2026
7bbfbda
fix(copilot): evict per-path edit locks after use to prevent memory leak
majdyz Apr 11, 2026
788c163
fix(copilot): restore required keys in Write and Read tool schemas
majdyz Apr 11, 2026
59ee9ef
fix(copilot): remove required from MCP schemas to fix truncation dete…
majdyz Apr 11, 2026
98f0ddd
fix(copilot): disallow built-in Read in non-E2B mode for consistency
majdyz Apr 12, 2026
d3a5bdb
refactor(copilot): consolidate file tools into single e2b_file_tools.py
majdyz Apr 12, 2026
c228b2c
fix(copilot): fix pyright bytes/bytearray type error in e2b read
majdyz Apr 12, 2026
ab07e55
fix(backend): allow Read tool for workspace-scoped paths (tool-result…
majdyz Apr 12, 2026
d7d9b5e
fix(backend): address review comments on unified file tools PR
majdyz Apr 12, 2026
ff32fa2
fix(backend): update test_read_builtin_blocked for workspace-scoped Read
majdyz Apr 12, 2026
4ccfec5
fix(backend): use mutating annotation for E2B write/edit tools and re…
majdyz Apr 12, 2026
ac0d939
fix(copilot): address round-5 review — path leaks, Read partial trunc…
majdyz Apr 13, 2026
ae1600a
fix(copilot): rename SDK read_tool_result tool and fix path leak in e…
majdyz Apr 13, 2026
90d8ae0
fix(copilot): map non-E2B file tools in permissions and fix lint form…
majdyz Apr 13, 2026
1a01bb0
fix(copilot): realpath in _resolve_and_validate + asyncio.sleep(0) fo…
majdyz Apr 13, 2026
53f0b39
fix(copilot): bound _edit_locks to 1000 entries with LRU eviction to …
majdyz Apr 14, 2026
7792d56
fix(backend): address coderabbitai review comments on unified write tool
majdyz Apr 14, 2026
318f7b8
fix(backend): update test_read_within_workspace to match current Read…
majdyz Apr 14, 2026
1168a7a
fix(copilot): use file_path in E2B Write/Edit success messages to avo…
majdyz Apr 14, 2026
48b9cac
fix(copilot): route relative paths to E2B sandbox in read_file, not h…
majdyz Apr 14, 2026
f6f72e9
fix(backend/copilot): tighten SDK tool-results access to current sess…
majdyz Apr 14, 2026
b6c7c49
fix(backend/copilot): update file_ref_integration test to reflect res…
majdyz Apr 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions autogpt_platform/backend/backend/copilot/prompting.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@
}}
```

### Writing large files — CRITICAL
**Never write an entire large document in a single tool call.** When the
content you want to write exceeds ~2000 words the tool call's output token
limit will silently truncate the arguments, producing an empty `{{}}` input
that fails repeatedly.
### Writing large files — CRITICAL (causes production failures)
**NEVER write an entire large document in a single tool call.** When the
content you want to write exceeds ~2000 words the API output-token limit
will silently truncate the tool call arguments mid-JSON, losing all content
and producing an opaque error. This is unrecoverable — the user's work is
lost and retrying with the same approach fails in an infinite loop.

**Preferred: compose from file references.** If the data is already in
files (tool outputs, workspace files), compose the report in one call
Expand Down
Loading
Loading