Introduction¶
When an agent has to deal with tens of thousands of small files, the default path is “one file per tool call.” Each call means one round-trip plus one system call—so tens of thousands of files means tens of thousands of round-trips. A single node_modules-sized copy can occupy the conversation for dozens of minutes, during which the model can’t do anything. Watching performance degrade, the model starts to “figure things out on its own”—guessing paths, bypassing tools, running rm -rf on a directory it never even counted. If it accidentally deletes something, there’s no recycle bin and not a single log line explaining what it deleted.
The DeepSeek Harness (DSH) plugin “Bulk I/O Optimization for Large Numbers of Small Files” solves exactly this problem: one call handles tens of thousands of files, reads and writes go through a hot thread pool, copies take the cheapest available path, and deletions are reversible by default.
Core Features¶
The plugin provides six bulk tools:
- bulk_write: Write thousands of files in a single call. Automatically creates directories and reports per-file failures instead of stopping at the first error.
- bulk_read: Batch read by file list or glob pattern. Output is capped at a byte limit, and each file is marked whether it was truncated.
- bulk_scan: Counts only, no enumeration: file count, total bytes, extension distribution, largest member.
- bulk_transfer: Copy / move / sync, taking the cheapest available path (a same-volume move is a single
rename). - bulk_delete: By default, moves files into
<root>/.dsh-trash/with a manifest so they can be restored;permanentsplits work across parallel deletions. - bulk_job: Background task progress;
settle:truelets you quietly wait until completion.
Three things keep it from stalling the conversation:
- One call processes the entire batch; system calls run in a hot thread pool, and the model waits for a single result.
- Work projected to exceed 15 seconds is automatically promoted to a background job: it becomes a job ID, and the model is released immediately.
- Reversible by default: deletions are renames first, so an accidental delete can be undone with a single rename.
Installation & Activation¶
Install from GitHub:
dsh plugin --profile desktop add github:Knot-chord/dsh-bulk-io
Pin a version:
dsh plugin --profile desktop add "github:Knot-chord/dsh-bulk-io#v0.1.0"
For development, link a local directory directly (changes take effect on reload, no copy is created):
dsh plugin --profile desktop add link:D:/path/to/dsh-bulk-io
Prerequisites: DSH >=0.2.1-rc.5, Node >=20, Windows 11 + NTFS. After installing, reload the profile or restart DSH. You should see bulk_write and the other tools appear in the tool list.
Typical Usage¶
Write a batch of files
bulk_write --root ./output --files file1.txt,file2.txt,file3.txt
Batch read them back
bulk_read --root ./output --files file1.txt,file2.txt,file3.txt
Scan a directory
bulk_scan --root ./output
Move a large number of files on the same volume
bulk_transfer --src ./source --dst ./dest --mode move
A same-volume move of a directory with thousands of files can complete in milliseconds. The result will explicitly state by rename and no file data was copied.
Delete while preserving reversibility
bulk_delete --root ./to-delete
Deletion moves files into <root>/.dsh-trash/<timestamp>/. To undo an accidental delete, a single rename restores them.
Wait in the background for a job to finish
bulk_job --jobId <jobId> --settle:true
Use Cases & Caveats¶
Well suited for repositories that regularly handle tens of thousands of small files: node_modules, build artifacts, crawl results, asset libraries. Ideal for moving or cleaning up large directory trees within a single turn without freezing the conversation. A good fit when you want one more step of undo before anything is truly gone.
Caveats:
- Permanent deletion:
permanent:trueis a true delete—no recycle bin. Running abulk_scanfirst to check the count, or doing adryRunpass, is a cheaper form of insurance. - Reload to take effect: After modifying
index.js, you must reload the plugin entry (close and reopen it). Hot-reload does not cover server-side modules; environment variables are read once per process, so changing them requires a DSH restart. - Platform limitation: Only Windows 11 + NTFS is supported. There is no OS-specific configuration: at runtime it probes for
robocopy,tar, whether the volume supports clone, and security software in the filter chain. If a tool is not detected, it falls back. It may work on other systems, but that is not a support commitment. - Cancellation takes effect at unit boundaries:
rmSyncis not interruptible—a large directory currently being deleted will finish before the operation stops. - Reads are not policy-constrained: Consistent with the host’s read tool, reads follow the filesystem rather than sandbox arbitration.
Ecosystem Context¶
DSH’s philosophy is “everything is a plugin.” The community catalog is an independent site with no official affiliation with DeepSeek or High-Flyer. This plugin is a third-party contribution; review the source code and license before installing.
Conclusion¶
Through bulk interfaces, background jobs, and reversible deletion, this plugin turns tens of thousands of file operations from “dozens of minutes of conversation blockage” into “results returned in a few seconds.” It is well suited for agent development scenarios that require high-frequency processing of large numbers of small files.
Catalog page: https://www.skillhub.cn/plugins/Knot-chord/dsh-bulk-io
GitHub: https://github.com/Knot-chord/dsh-bulk-io