Skip to content

fix: recognize Cursor session-not-found error format#195

Merged
osolmaz merged 3 commits intomainfrom
codex/land-pr-162
Mar 29, 2026
Merged

fix: recognize Cursor session-not-found error format#195
osolmaz merged 3 commits intomainfrom
codex/land-pr-162

Conversation

@osolmaz
Copy link
Copy Markdown
Contributor

@osolmaz osolmaz commented Mar 29, 2026

Supersedes #162 to land the same change from an origin-hosted branch after maintainer updates on the contributor fork left the original PR in a bad merge-state loop.

This replacement keeps the original fix, adds the required changelog entry, and preserves credit to @log-li.

Original contribution:

Behavior is unchanged relative to the contributor branch: Cursor's Session "..." not found session/load error format is now recognized so reconnect logic falls back to session/new instead of failing.

Follow-up after merge:

Logan-On and others added 3 commits March 29, 2026 11:44
Cursor CLI returns error code -32602 with message 'Session "xxx" not found'
when session/load fails. This format was not recognized by isSessionNotFoundText(),
preventing fallback to session/new.

Added regex pattern to match 'Session "xxx" not found' format:
- /session\s+["'\w\-]+\s+not found/i

Fixes #161
@osolmaz osolmaz merged commit 9cbf451 into main Mar 29, 2026
8 checks passed
@osolmaz osolmaz deleted the codex/land-pr-162 branch March 29, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants