Safe programmatic file/folder operations for agents & automation — non-blocking, transactional, link-safe

Use case or problem

I run a large vault (tens of thousands of notes + attachments) that serves as a shared knowledge base for both me and AI agents. Increasingly, automated agents need to reorganize files and folders — and today every option fails:

  • Moving/renaming a large folder freezes the UI for seconds-to-minutes. The rename path rewrites every backlink and re-parses the metadata cache synchronously on the main thread, so the work scales with files × backlinks and blocks the app. (Already reproduced by the team — e.g. “UI freezes when deleting or renaming large folders in large vaults”.)
  • No folder-level operation in the official CLI (only file move/rename; folder/folders are read-only), so automation has no supported, safe way to move or rename a folder.
  • Moving externally (filesystem) avoids the freeze but breaks links and desyncs the index/cache, because auto-update-links only runs for in-app moves.

So an agent — or a human reorganizing at scale — must choose between (a) freeze the app or (b) corrupt links and the index. Neither is fixable from the user side; it needs engine-level support.

Proposed solution

  1. Off-main-thread / chunked file operations so large moves/renames don’t freeze the UI (progress + cancel would be a bonus).
  2. A folder-level, link-safe move/rename primitive — with CLI parity — so reorganizing a whole subtree updates links and cache atomically.
  3. A transactional / batch file API that external tools and agents can call, so changes flow through Obsidian’s link-and-index machinery instead of around it — a supported “reorganize these N paths, keep links + cache consistent” operation.

Why now: vaults are increasingly shared between humans and AI agents. Agents are excellent at large-scale knowledge organization, but they can only do it safely if Obsidian exposes file/folder operations that preserve link and index integrity without freezing. A first-class, automation-safe file API would make Obsidian uniquely strong as the substrate for agentic knowledge work — and it’s something only the core team can build.

Current workaround (optional)

The only way to avoid the freeze today is to leave Obsidian’s live event loop: quit Obsidian → move the folder on disk → rewrite the links that actually break (path-qualified links + attachment embeds) while closed → relaunch (one clean re-index) → scan for new broken links. It works, but it’s fragile and re-implements link integrity that only the engine can do authoritatively — which is itself the argument for building this into the core. (I have a full write-up with root-cause analysis and reproduction I’m happy to share.)

Related feature requests (optional)

  • UI freezes when deleting or renaming large folders in large vaults
  • Obsidian UI freezes on rename (or move) in large vaults
  • Expand the file watcher capability to the whole vault instead of just the root