Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
Persistent session state is created under a hardcoded path /tmp/cursor-agent-persist-, and TMUX_TMPDIR is forced to /tmp. Environments where /tmp is not writable (or where TMPDIR points elsewhere) get EACCES on mkdir. Node’s os.tmpdir() already respects $TMPDIR, but the persist path does not use it. agent resume then fails with “could not verify its persistent session” even when no persistent session exists.
Steps to Reproduce
- Run Agent CLI where $TMPDIR is writable but creating directories under /tmp fails with EACCES
- CLI version 2026.10.16-e3cb207 (or current)
- Run: agent resume
- Observe: EACCES: permission denied, mkdir ‘/tmp/cursor-agent-persist-’
Expected Behavior
Persist/tmux state root should use os.tmpdir() (respect $TMPDIR) instead of a hardcoded /tmp, consistent with other CLI temp directories.
Operating System
Windows 10/11
MacOS
Linux
iOS
Other
Version Information
CLI:
Version: 2026.10.16-e3cb207
Additional Information
In the bundled CLI, persist state uses a constant “/tmp” for the state root and TMUX_TMPDIR. Other CLI code paths already use os.tmpdir(). Suggested fix: use os.tmpdir() for the persist root so $TMPDIR is respected. Repro is any environment where mkdir under /tmp fails with EACCES while $TMPDIR is writable.
Does this stop you from using Cursor
Yes - Cursor is unusable