Skip to content

entire configure to remove agent#851

Open
peyton-alt wants to merge 5 commits intomainfrom
configure-remove-agent
Open

entire configure to remove agent#851
peyton-alt wants to merge 5 commits intomainfrom
configure-remove-agent

Conversation

@peyton-alt
Copy link
Copy Markdown
Contributor

@peyton-alt peyton-alt commented Apr 3, 2026

Note

Medium Risk
Moderate risk because entire configure now uninstalls hooks for deselected agents and supports removing all agents, which directly modifies repo hook/config files and could leave partial state on error.

Overview
entire configure re-runs now open a Manage agents prompt that supports both adding and removing agents; deselecting an installed agent uninstalls its hooks, and selecting nothing removes all agent hooks and prints guidance to re-add via --agent.

Hook changes are applied via a new applyAgentChanges flow that computes added/removed sets, performs installs/uninstalls with aggregated errors, and prints a success summary; newly added external agents still auto-enable external_agents. Tests were expanded to cover deselect/removal scenarios (including deselect-all, no-op selections, add+remove) and to ensure configure --remove continues to work.

Written by Cursor Bugbot for commit f4e028b. Configure here.

Copilot AI review requested due to automatic review settings April 3, 2026 18:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds interactive “manage agents” behavior to entire configure so users can both add and remove agent hooks in a single multi-select flow.

Changes:

  • Replaces the previous “add agents” flow with a “manage agents” flow that supports uninstalling hooks when agents are deselected.
  • Introduces applyAgentChanges to compute added/removed sets and apply hook installs/uninstalls, plus a summary output.
  • Adds tests covering deselect/remove behaviors, deselect-all guidance, no-op selection, add+remove in one run, and --remove flag regression.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
cmd/entire/cli/setup.go Implements interactive agent add/remove management and applies hook install/uninstall changes with user-facing summaries.
cmd/entire/cli/setup_test.go Adds test coverage for interactive manage-agent scenarios and verifies configure --remove still works.

@peyton-alt
Copy link
Copy Markdown
Contributor Author

@BugBot review

peyton-alt and others added 4 commits April 3, 2026 12:13
Rename runAddAgents to runManageAgents and allow users to deselect
installed agents in the interactive multi-select. Deselecting removes
hooks; the summary now shows both added and removed agents.

- Remove validation that blocked deselection of installed agents
- Remove "all agents installed" early exit (users may want to remove)
- Extract applyAgentChanges helper for post-selection processing
- Add selectFn parameter for testability
- Update command description to reflect add/remove capability

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 5db1ec6fe024
Remove the "at least one agent" constraint from the configure
multi-select. When all agents are deselected, remove all hooks and
show guidance on how to re-add agents.

Also adds tests for the full manage agents flow: deselect removes,
deselect all with guidance, no changes, add+remove, --remove regression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d8018fc09ed9
Address PR review feedback: don't silently skip agent.Get() failures
when computing agents to remove. Return errors instead of continuing,
so users aren't told "All agents have been removed" when some failed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 63e9ba99d0bd
Address review feedback:
- Collect errors in applyAgentChanges instead of returning on first
  failure, so partial successes are reported to the user
- Log warning when installed agent unexpectedly lacks hook support
- Surface external_agents setting save errors in error collection
- Verify Gemini hooks on disk in AddAndRemove test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: ba3cd61139fd
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

@peyton-alt peyton-alt force-pushed the configure-remove-agent branch from f4e028b to c4b4f7e Compare April 3, 2026 19:24
When no agents are installed and user confirms empty selection, show
"No changes made." instead of "All agents have been removed."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 7778bc92e289
@peyton-alt peyton-alt marked this pull request as ready for review April 3, 2026 19:27
@peyton-alt peyton-alt requested a review from a team as a code owner April 3, 2026 19:27
@peyton-alt peyton-alt changed the title Configure remove agent entire configure to remove agent Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants