Update!
What I checked
-
Disk space/inodes are fine and
$HOMEis writable./tmphas correct perms (1777). -
SQLite integrity check on the DB returns
ok. -
My home lives on a shared filesystem:
home on /home/aiops type virtiofs (rw,relatime)
What happens
With the DB on virtiofs, cursor-agent throws SQLITE_IOERR: disk I/O error.
Workaround that fixes it
If I move the app data + temp dirs to a local ext4 volume, the error disappears. For example:
mkdir -p /var/tmp/$USER/{.local/share,.config,tmp}
export XDG_DATA_HOME=/var/tmp/$USER/.local/share
export XDG_CONFIG_HOME=/var/tmp/$USER/.config
export TMPDIR=/var/tmp/$USER/tmp
export SQLITE_TMPDIR=$TMPDIR
cursor-agent <my usual command>
After doing this, cursor-agent works normally. This strongly suggests the issue is with SQLite file locking/IO semantics on virtiofs rather than storage/permissions.
Thanks for your answer.