Skip to content

Polish Cursor native tool replay parity#8

Closed
fitchmultz wants to merge 4 commits into
mainfrom
cursor/native-replay-visual-audit
Closed

Polish Cursor native tool replay parity#8
fitchmultz wants to merge 4 commits into
mainfrom
cursor/native-replay-visual-audit

Conversation

@fitchmultz
Copy link
Copy Markdown
Owner

Summary

  • Replay Cursor glob activity through native pi find cards instead of fake bash-style glob cards.
  • Render empty Cursor grep/glob results as native, readable no-result text instead of raw Cursor JSON.
  • Replay recorded Cursor shell failures and timeout-backgrounded commands as native pi tool errors.
  • Add maintainer docs for native replay behavior and the offscreen visual audit workflow.

Supersedes closed #7 with a narrower, per-tool audited change set.

Visual + JSONL evidence

Captured offscreen with node-pty + xterm.js + Playwright, no focused Terminal/screencapture.

Gallery:

  • /tmp/pi-visual-harness/review-current/review-gallery.png
  • /tmp/pi-visual-harness/review-current/review-gallery.html

Per-case evidence:

Case Before PNG After PNG Before JSONL After JSONL
glob/file-search native card /tmp/pi-visual-harness/review-current/before-glob-single.png /tmp/pi-visual-harness/review-current/after-glob-single.png /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-28-13-846Z_019e45c9-7f95-706f-b198-0bfbfe69ac9f.jsonl /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-30-22-408Z_019e45cb-75c8-769a-a43b-d947c62bd6f2.jsonl
empty glob /tmp/pi-visual-harness/review-current/before-empty-glob.png /tmp/pi-visual-harness/review-current/after-empty-glob.png /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-24-24-635Z_019e45c6-003b-7023-8b17-748ac1db1417.jsonl /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-24-43-564Z_019e45c6-4a2c-7875-8548-2e9810f125e3.jsonl
empty grep /tmp/pi-visual-harness/review-current/before-empty-grep.png /tmp/pi-visual-harness/review-current/after-empty-grep.png /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-25-02-753Z_019e45c6-9521-768c-917e-9226322e5c55.jsonl /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-25-21-664Z_019e45c6-df00-705f-955f-29dd0ed2621a.jsonl
shell nonzero /tmp/pi-visual-harness/review-current/before-shell-nonzero.png /tmp/pi-visual-harness/review-current/after-shell-nonzero.png /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-25-40-589Z_019e45c7-28ed-7888-a51d-b687b56eafdd.jsonl /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-30-43-364Z_019e45cb-c7a4-7871-9344-96be77a85ce1.jsonl
shell timeout/background /tmp/pi-visual-harness/review-current/before-shell-timeout.png /tmp/pi-visual-harness/review-current/after-shell-timeout.png /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-26-18-488Z_019e45c7-bcf8-72d5-8d59-411e4eae1dc9.jsonl /Users/mitchfultz/.pi/agent/sessions/--Users-mitchfultz-Projects-AI-pi-semantic-code-intelligence--/2026-05-20T14-26-39-407Z_019e45c8-0eaf-7d43-9ff1-f652e79228e3.jsonl

JSONL spot-checks:

  • glob-single: before toolCall.name=bash with command: glob ...; after toolCall.name=find with pattern: src/tools/reindex.ts.
  • empty-glob: before raw { files: [], totalFiles: 0 }; after No files found matching pattern.
  • empty-grep: before raw nested workspaceResults; after (no matches).
  • shell-nonzero: before toolResult.isError=false; after toolResult.isError=true.
  • shell-timeout: after first shell replay is toolResult.isError=true with Command backgrounded after 1 second timeout.

Validation

  • npm test — 154 passed
  • npm run typecheck
  • git diff --check

fitchmultz and others added 4 commits May 20, 2026 09:00
Inherited env from pi sessions caused false failures when asserting Agent.create local options.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fitchmultz fitchmultz closed this May 21, 2026
@fitchmultz fitchmultz deleted the cursor/native-replay-visual-audit branch May 22, 2026 18:35
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.

1 participant