Conversation
When sessionData.FilesTouched is empty, condensation falls back to the committed-files set. The previous filter only stripped .entire/ and the metadata dir, so agent config that gets staged by 'git add .' (.cursor/ hooks.json, .claude/settings.json, opencode.json) leaked into the checkpoint's files_touched. Use the strategy's existing isProtectedPath plus agent.AllProtectedFiles() so the fallback respects every registered agent's ProtectedDirs/ProtectedFiles. Entire-Checkpoint: 47e92cbead89
The WaitFor pattern 'Add a follow-up' matches Cursor's input placeholder, which renders while the agent is still editing — alongside a busy-state hint 'ctrl+c to stop' and an 'Editing N tokens' spinner. When this returned mid-turn, the caller's defer s.Close() killed tmux before cursor's stop hook fired, so SaveStep never recorded FilesTouched and the resulting checkpoint relied on a fallback that swept up .cursor/hooks.json. Add a second wait for the busy hint to disappear so the stop hook gets a chance to fire. Entire-Checkpoint: a03dcbad0304
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves Cursor CLI E2E reliability and attribution accuracy by (1) making Cursor E2E prompts wait for the agent to become idle before tearing down tmux, and (2) expanding the fallback “committed files” filter to exclude agent-managed config dirs/files so files_touched doesn’t get polluted by agent infrastructure.
Changes:
- Cursor E2E
RunPromptnow waits for the “ctrl+c to stop” busy hint to disappear after the “Add a follow-up” marker appears. committedFilesExcludingMetadatanow excludes agentProtectedDirs(viaisProtectedPath) and agentProtectedFiles(viaagent.AllProtectedFiles()), not just.entire/.- Unit test updated to cover
.cursor/andopencode.jsonexclusions (and to exclude.claude/as an agent-protected dir).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
e2e/agents/cursor_cli.go |
Adds an idle/wait loop after the “Add a follow-up” marker to prevent tmux teardown mid-turn so Cursor’s stop hook can fire. |
cmd/entire/cli/strategy/manual_commit_condensation.go |
Expands fallback committed-file filtering to exclude agent-protected dirs/files from attribution files_touched. |
cmd/entire/cli/strategy/manual_commit_test.go |
Updates tests to assert agent-protected paths/files are excluded from the committed-file fallback result. |
The previous busy-hint poll started its own time.Now().Add(timeout) after WaitFor had already potentially consumed the full timeout, so the call could block for up to ~2x the caller's budget. It also ignored ctx cancellation while sleeping. Track a single absolute deadline that covers both stages, pass the remaining budget to WaitFor, and use a select on ctx.Done() so cancellation interrupts the busy-wait. Entire-Checkpoint: f9a1b68793d5
dipree
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/entireio/cli/trails/282
Two fixes:
Note
Medium Risk
Medium risk because it changes how
files_touchedis derived during fallback condensation, which can affect checkpoint attribution/metadata; the Cursor E2E wait logic also changes timing and could introduce new timeouts.Overview
Fixes checkpoint
files_touchedfallback to exclude all agent-owned paths, not just.entire/, by filtering protected dirs (e.g..cursor/,.claude/,.git/) and registered protected files (e.g.opencode.json) fromcommittedFilesExcludingMetadata.Stabilizes Cursor CLI E2E runs by waiting for Cursor to become truly idle (the "ctrl+c to stop" busy hint disappears) before tearing down tmux, ensuring the
stophook fires andSaveSteppopulatesFilesTouched; updates the related unit test expectations accordingly.Reviewed by Cursor Bugbot for commit 7f7db0b. Configure here.