code-yeongyu / code-yeongyu/senpi

cursor: conversation-id rotation can re-request already-executed tools

Open
#1,027 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
429
Forks
98
Avg merge
4h 57m
Merged PRs (30d)
540

Description

On zero-token resource_exhausted, senpi rotates the Cursor conversation id and migrates caches (packages/ai/src/api/cursor-agent.ts:676-694). Server-side pending exec state is discarded, so tools already executed in the poisoned conversation can be re-requested on the fresh one (double side effects). Proposal: suppress duplicate exec dispatch for exec ids already answered pre-rotation, or annotate rebuilt history so the server does not re-issue them. Found during the 2026-08-20 cursor provider audit (hyperdebate lane arch-binary D5).

Contributor guide

Open the contributing guide

Research direction

Start in packages/ai/src/api/cursor-agent.ts:676-694 and trace the zero-token resource_exhausted path, conversation-id rotation, and cache migration. Verify how exec ids answered before rotation are dispatched on the rebuilt conversation; done means already-executed tools are not requested again after rotation, without losing legitimate pending executions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai-infra-agents
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.