Increase repo-memory max-patch-size ceiling from 100KB to 1MB#32667
Merged
Conversation
The absolute maximum for the max-patch-size configuration field has been raised from 102400 (100KB) to 1048576 (1MB), allowing users to explicitly configure larger patch sizes for non-trivial agentic memory workflows. Default behavior is unchanged (10KB default, 100KB was formerly the cap). Users who need more than 100KB can now set max-patch-size up to 1MB. Updated: constant, schema, docs, scratchpad spec, and tests. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace repo-memory patch size limit with rate limit over time
Increase repo-memory max-patch-size ceiling from 100KB to 1MB
May 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Raises the repo-memory max-patch-size ceiling from 100KB to 1MB while preserving the existing 10KB default.
Changes:
- Updates Go validation constants and comments for the new 1MB maximum.
- Updates schema limits and repo-memory documentation/scratchpad references.
- Expands validation tests to cover newly allowed larger patch sizes.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/repo_memory.go |
Raises the runtime max-patch-size constant and related comments. |
pkg/workflow/repo_memory_test.go |
Updates boundary assertions and adds larger valid values. |
pkg/parser/schemas/main_workflow_schema.json |
Raises object and array schema maximums to 1MB. |
docs/src/content/docs/reference/repo-memory.md |
Updates repo-memory reference docs/examples for the 1MB limit. |
scratchpad/repo-memory.md |
Updates internal repo-memory scratchpad limit references. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 3
Comment on lines
+4556
to
+4557
| "maximum": 1048576, | ||
| "description": "Maximum total patch size in bytes (default: 10240 = 10KB, max: 1048576 = 1MB). The total size of the git diff must not exceed this value." |
|
|
||
| - **Minimum**: 1 byte | ||
| - **Maximum**: 102400 bytes (100 KB) | ||
| - **Maximum**: 1048576 bytes (1 MB) |
| **File Type Restrictions**: Use `allowed-extensions` to restrict which file types can be stored (default: empty/all files allowed). When specified, only files with listed extensions (e.g., `[".json", ".txt", ".md"]`) can be saved. Files with disallowed extensions will trigger validation failures. | ||
|
|
||
| **Patch Size Limit**: Use `max-patch-size` to limit the total size of changes in a single push (default: 10KB, max: 100KB). The total size of the git diff (all staged changes combined) must not exceed this value. If it does, the push is rejected with an error. Use this to prevent large unintentional memory updates. | ||
| **Patch Size Limit**: Use `max-patch-size` to limit the total size of changes in a single push (default: 10KB, max: 1MB). The total size of the git diff (all staged changes combined) must not exceed this value. If it does, the push is rejected with an error. Use this to prevent large unintentional memory updates. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
max-patch-sizefield inrepo-memorywas hard-capped at 100KB, blocking workflows that need to persist non-trivial data in a single push.Changes
repo_memory.go: RaisesmaxRepoMemoryPatchSizeconstant from102400→1048576maximumfor both object-style and array-stylerepo-memorymax-patch-sizeentries to1048576Default (
10KB) and overall behavior are unchanged — users explicitly opting in to larger values can now configure up to 1MB: