-
-
Notifications
You must be signed in to change notification settings - Fork 557
Description
- Disable all other plugins besides Copilot (required)
- Screenshot of note + Copilot chat pane + dev console added (required)
Logs attached
Copilot version: 3.1.0
Bug Report – Copilot Plus & Smart Connections (Obsidian plugins)
Submitted by a user who has already sent the relevant log files.
1. Summary
When indexing a large Obsidian vault with Copilot Plus (and, to a lesser extent, Smart Connections) the application frequently hangs or crashes. The problem appears tied to:
- high‑frequency LLM calls for embedding generation,
- batch size and context window settings,
- long absolute file paths on Ubuntu,
- complex folder hierarchies / non‑alphanumeric characters, and
- interaction with other plugins or the Obsidian developer console.
Smart Connections is comparatively stable, but both plugins suffer from index corruption after a freeze.
2. Environment
| Item | Value (as reported) |
|---|---|
| OS | Ubuntu 22.04 (64‑bit) |
| Obsidian version | (user did not specify – logs contain the exact build) |
| Copilot Plus version | (see attached logs) |
| Smart Connections version | (see attached logs) |
| GPU | High‑end card with ample VRAM (able to process thousands of embedding batches) |
| Embedding model | quern-3-8b-embedding-16f (context window 40 k tokens, batch size set to 100/128) |
| Vault size | Tens of thousands of notes (some very small, many larger) |
| File‑system | Ext4, absolute paths used by the plugins |
3. Steps to Reproduce
-
Prepare a fresh environment
- Close all other applications.
- Disable every Obsidian plugin except Copilot Plus (or Smart Connections).
- Do not open the developer console – it dramatically raises the chance of a freeze.
-
Configure the vault
- Use only alphanumeric characters (letters & digits) in folder and file names.
- Keep paths as short as possible; avoid deep hierarchies.
- Ensure most notes are small (< few KB).
-
Set indexing parameters
- In Copilot Plus: batch size = 128 embeddings, embedding‑model context window = small (e.g., < 10 k tokens).
- In Smart Connections: default settings (no special changes needed).
-
Start the indexing process while the computer is idle – no mouse/keyboard activity, no other software running, and ideally after a full system reboot.
-
Observe the UI for hangs, freezes, or crashes. When they occur, note whether the plugin shows an error message or simply becomes unresponsive (white/black screen).
-
Repeat with different batch sizes (e.g., 100 vs 128) and with single‑folder indexing (index one folder at a time, restart Obsidian between folders).
4. Expected Behaviour
- The plugin should process all notes, build the embedding index, and finish without hanging or corrupting the index files, regardless of vault size or batch configuration.
- Opening the developer console must not interfere with indexing.
- Errors (if any) should be reported in the UI or console rather than causing a complete freeze.
5. Actual Behaviour
| Observation | Details |
|---|---|
| Frequent hangs / freezes | Copilot Plus becomes completely unresponsive (white/black screen) during indexing, especially when the developer console is open. |
| Index corruption | After a hang, the generated index files are sometimes left in an inconsistent state; subsequent attempts to re‑index fail until the entire index is deleted and rebuilt from scratch. |
| Batch size impact | Larger batch sizes (128) increase the probability of hangs, despite the GPU having sufficient VRAM. Small batches appear to overload internal logging mechanisms, leading to similar failures. |
| Path length issue | On Ubuntu the plugins resolve absolute paths; extremely long paths cause failures even when the relative path inside the vault is short. |
| Folder hierarchy sensitivity | Deep or complex hierarchies (many nested folders) and non‑alphanumeric characters in names dramatically raise failure rates. |
| Plugin interaction | Even with all other plugins disabled, Copilot Plus still crashes; however, having any additional plugin active raises the overall instability of both plugins. |
| Smart Connections stability | Generally stable – crashes are rare, but if the index is corrupted by Copilot Plus it can inherit the same problem. |
6. Workarounds Attempted (by the user)
- Full system reboot before each indexing run.
- Index one folder at a time (hundreds of files max) and restart Obsidian between folders.
- Keep all notes small and use very short, alphanumeric file/folder names.
- Delete the whole index and start from zero whenever a hang occurs.
- Avoid any mouse/keyboard activity during indexing; keep the cursor out of the Obsidian window.
These mitigations improve success probability but do not eliminate the underlying issue.
7. Logs & Attachments
The user has already sent the complete log files (see attached copilot_plus.log and smart_connections.log).
Key excerpts show repeated “Unhandled exception” messages followed by a silent UI freeze when the developer console is open.
8. Suggested Improvements for the Developers
| Area | Recommendation |
|---|---|
| Graceful error handling | Catch and surface any embedding‑generation failures instead of allowing them to block the main thread (especially when the dev console is active). |
| Batch‑size safety checks | Dynamically limit batch size based on available GPU memory and internal logging load; provide a “safe mode” that auto‑tunes these values. |
| Path handling | Normalize paths to relative vault roots before persisting index entries, or enforce a maximum absolute path length on Ubuntu. |
| File‑name validation | Reject or automatically sanitize non‑alphanumeric characters during indexing to avoid hidden parsing errors. |
| Index recovery | Implement an atomic write/commit strategy for the embedding index so that partial writes do not corrupt the whole database; add a “repair” command. |
| Developer console isolation | Ensure that opening the dev console does not block the UI thread of Copilot Plus; run indexing in a WebWorker or separate process. |
| Documentation of known limits | Clearly state in the README the recommended vault structure (short paths, small files, limited hierarchy) and the impact of batch size on stability. |
| Testing matrix expansion | Add automated tests that combine Copilot Plus with a handful of popular third‑party plugins to detect cross‑plugin deadlocks early. |
9. Conclusion
The current implementation of Copilot Plus (and, indirectly, Smart Connections) is highly sensitive to vault size, file‑system layout, batch configuration, and interaction with the Obsidian developer console. The user’s extensive manual testing demonstrates reproducible failure modes that lead to UI freezes and index corruption. Implementing the suggested safeguards would greatly increase robustness for power users who need to index large knowledge bases.
obsidian.md-1760869775478.log
obsidian.md-1760869753350.log
obsidian.md-1760869737365.log
obsidian.md-1760869673450.log
copilot-log.md