RCA-2026-05-18-001: Neovim Auto-Session Oil Buffer Restore Failure

Executive Summary

On 2026-05-18, Neovim failed to start cleanly when opening directories with previously saved sessions. The auto-session plugin attempted to restore a session containing oil:// URI buffers from the oil.nvim file explorer. Vim’s :file command cannot handle URI-scheme buffer names during session restore, producing E325 (swap file conflict) and "No lines in buffer" errors. The root cause was that oil was missing from auto-session’s bypass_session_save_file_types list, allowing non-restorable buffer types to be serialized into session files. Five stale swap files — including one for an oil:// pseudo-buffer — compounded the problem by triggering interactive prompts in a non-interactive restore context.

Timeline

Time Event

Unknown (prior session)

User opened domus-captures directory in Neovim with oil.nvim as the file explorer. Navigated to data/d000/ via oil. Edited C source files. Session auto-saved with oil buffer in buffer list.

Unknown

Neovim process killed (not cleanly exited). Swap files for open buffers not cleaned up.

2026-05-18

User launches Neovim in domus-captures directory. Auto-session attempts restore.

+0s

Session file sources %2Fhome%2F…​%2Fdomus-captures.vim. Line 22 attempts to open the oil buffer via :file. Vim hits E325 on a stale swap file — interactive prompt in non-interactive context.

+0s

Auto-session catches the error, disables auto-save, surfaces error to user.

+0s

Second error: oil buffer restored as empty regular buffer — "No lines in buffer" prompt.

+5m

Investigation: find locates 5 stale swap files under ~/.local/state/domus-nvim/swap/, including oil:%%%home%…​%d000%.swp.

+5m

Root cause identified: oil filetype absent from bypass_session_save_file_types in domus-nvim config.

Problem Statement

Symptoms

  • E325: ATTENTION error on every Neovim launch in the domus-captures directory

  • Auto-session disables auto-save due to restore failure

  • "No lines in buffer" prompt for oil:// pseudo-buffer

  • Errors persist even after killing and restarting Neovim

Expected Behavior

  • Neovim launches cleanly with session restored

  • Non-file buffers (oil, neo-tree, alpha) are excluded from session saves

  • No swap file conflicts after process termination

Actual Behavior

  • Session restore fails immediately at VimEnter

  • oil:// URIs serialized into session .vim file as literal buffer names

  • Stale swap files from killed process trigger interactive prompts during non-interactive restore

Metadata

Field Value

RCA ID

RCA-2026-05-18-001

Author

Evan Rosado

Date Created

2026-05-18

Status

Final

Severity

P3 — Workflow disruption, no data loss

Duration

~10 minutes (identification + fix)

Systems Affected

domus-nvim (Neovim configuration), domus-captures workspace sessions

Data Loss

None