Cursor CLI stopped corrupting its own config under concurrent agents

Running more than one agent process against the same project — a second terminal, a parallel subagent, a background session — used to risk a corrupted config file. The July 6, 2026 Cursor CLI release fixes it.

The bug

From the changelog: "Fixed config corruption when running several agents at once. Concurrent CLI processes could interleave writes to cli-config.json and block later startups."

Two processes writing to cli-config.json at the same time could interleave their writes into the same file. The result wasn't just a bad value — a mangled config could block the CLI from starting at all on the next launch.

The fix

"Each write now stages to its own temp file before an atomic rename." Instead of writing new config data directly into cli-config.json in place, Cursor CLI now writes to a temporary file first and renames it over the original once the write completes. A rename is atomic at the filesystem level, so a reader never sees a half-written file, and two concurrent writers can no longer interleave into the same one.

Why it matters

This lands in the same release as agent's workspace-wide session resume and subagent context persistence — both push toward running more agent processes against one project at once. Config corruption from concurrent writes was a real risk under that pattern before this fix; it isn't anymore. See the Cursor CLI sheet for current config and session behavior.