Several code paths added for the drive/mounts surfaces have no resource ceilings, so a large or pathological (but agent-constructable) mount can drive unbounded memory, connection, or time cost. None of these is a correctness bug; each is a missing bound.
Note: streaming very large individual files is explicitly out of scope for "download all" (product decision, 2026-07-20). This issue is about bounding breadth and duplication, not redesigning per-file reads into a streaming API.
The goal is to put ceilings on the new work so a big drive degrades predictably instead of exhausting the worker.
Follow-up from the #5400 backend review. Cited findings: 3.4 (the archive concurrency knob bounds file count, not bytes; the gitignore cap is soft; promote knobs to env.py), 4.5 (unbounded/duplicable archive mounts list), 4.6 (unbounded .gitignore size, unbounded per-batch concurrency, soft cap), 4.7 (synchronous regex/rollup on the event loop). The review report is not in the repo, so this summary stands alone.
Several code paths added for the drive/mounts surfaces have no resource ceilings, so a large or pathological (but agent-constructable) mount can drive unbounded memory, connection, or time cost. None of these is a correctness bug; each is a missing bound.
Note: streaming very large individual files is explicitly out of scope for "download all" (product decision, 2026-07-20). This issue is about bounding breadth and duplication, not redesigning per-file reads into a streaming API.
The goal is to put ceilings on the new work so a big drive degrades predictably instead of exhausting the worker.
mountslist (each entry is a DB fetch plus a full recursive listing; today the list is unbounded and duplicable)..gitignorehandling: add a per-file size ceiling (~1 MB) before parsing, truncate a level's batch to the remaining_MAX_GITIGNORE_FILESbudget instead of only checking the cap between batches, and put the batch reads under the existing_LIST_CONCURRENCYsemaphore._LIST_CONCURRENCYand_ARCHIVE_READ_CONCURRENCYtoenv.py, matching the repo's env-config convention (precedent:AGENTA_RUNNER_CONCURRENCY_LIMIT). The two algorithmic backstops can stay module constants..gitignore, which the recency path fully enumerates.to_threador memoized per-directory verdicts) so big trees don't stall the worker.Follow-up from the #5400 backend review. Cited findings: 3.4 (the archive concurrency knob bounds file count, not bytes; the gitignore cap is soft; promote knobs to
env.py), 4.5 (unbounded/duplicable archivemountslist), 4.6 (unbounded.gitignoresize, unbounded per-batch concurrency, soft cap), 4.7 (synchronous regex/rollup on the event loop). The review report is not in the repo, so this summary stands alone.