You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cursor preset ignores model_id and preserves empty model values #2489
Cursor agent CLI / ACP sessions can be recorded as cursor::unknown in git-ai stats --json; an empty hook model produces a separate cursor:: bucket.
In an aggregate sample of 2,000 commits, all 54 Cursor sessions with CLI-style agent-<uuid> IDs had model unknown, while all 53 sessions with IDE-style UUID IDs had populated models. The inspected CLI JSONL transcripts contained no model field. This was observed with Git AI 1.7.5; the same parser remains on main at 1.7.7.
Root cause:src/commands/checkpoint_agent/presets/cursor.rs reads only model, defaults a missing value to unknown, and preserves an empty string. Cursor documents an optional model_id field, which the preset ignores.
Synthetic reproduction: In a throwaway repository, pass this JSON to git-ai checkpoint cursor --hook-input stdin, first with hook_event_name set to preToolUse, then write example.txt, then repeat with postToolUse:
Commit the file, wait for processing, and inspect git-ai stats --json. With no model, the bucket is cursor::unknown; adding "model":"" produces cursor::; adding "model":"composer-2.5" produces cursor::composer-2.5. A payload with only a valid model_id is also currently ignored.
Expected: Preserve a nonblank model, otherwise use a nonblank payload model_id, and normalize unavailable/blank values to unknown. Global last-selected CLI/ACP config is not reliable evidence of the model used by a particular session.
Verification limit: A live authenticated Cursor CLI/ACP hook payload has not been captured. The documented fallback fixes payloads that supply model_id; it cannot recover a model if both fields are absent. The CLI-session symptom may therefore also require a Cursor-side change.
Activity