Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
If you use the sessionStart hook to export env vars for the session to use but close out of cursor and resume the session later, the env vars are not present in the session in it’s resumed state.
Steps to Reproduce
Export an env var in sessionStart and use it in another hook such as preToolUse. Prompting the agent to use a tool will invoke preToolUse and the exported envvar will be in scope. Close cursor and resume the session. Prompting the agent to use a tool will invoke the preToolUse hook but the exported envvar will no longer be available to use.
Expected Behavior
The session is resumed and the previously exported env vars should still be available to the session.
Operating System
MacOS
Version Information
Version: 3.0.9 (Universal)
VSCode Version: 1.105.1
Commit: 93e276db8a03af947eafb2d10241e2de17806c20
Date: 2026-04-03T02:06:46.446Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0
Does this stop you from using Cursor
No - Cursor works, but with this issue