Fix external agents detection - #893
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts agent detection/selection during initial setup so external agents don’t get auto-selected just because they’re the only detected agent.
Changes:
- Only auto-select a single detected agent on first run when it’s a built-in agent.
- Pre-select only detected built-in agents on first run (external agents remain opt-in via prompt).
- Add unit tests covering “external-only detected” prompting behavior and built-in/external classification.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
cmd/entire/cli/setup.go |
Updates first-run auto-selection/preselection logic to exclude external agents; adds isBuiltInAgent helper. |
cmd/entire/cli/setup_test.go |
Adds test helpers for external agent binaries and new tests validating prompting/classification behavior. |
cmd/entire/cli/global_test.go |
Filters PATH in TestMain to avoid picking up real external agents during unit tests. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Test uses
git.PlainInitinstead oftestutil.InitRepo- Replaced
git.PlainInitinsetupTestRepowithtestutil.InitRepoand updated imports so all tests using this helper now get the required git test configuration.
- Replaced
Or push these changes by commenting:
@cursor push 079746b217
Preview (079746b217)
diff --git a/cmd/entire/cli/setup_test.go b/cmd/entire/cli/setup_test.go
--- a/cmd/entire/cli/setup_test.go
+++ b/cmd/entire/cli/setup_test.go
@@ -21,7 +21,7 @@
"github.com/entireio/cli/cmd/entire/cli/session"
"github.com/entireio/cli/cmd/entire/cli/settings"
"github.com/entireio/cli/cmd/entire/cli/strategy"
- "github.com/go-git/go-git/v6"
+ "github.com/entireio/cli/cmd/entire/cli/testutil"
)
// Note: Tests for hook manipulation functions (addHookToMatcher, hookCommandExists, etc.)
@@ -44,9 +44,7 @@
func setupTestRepo(t *testing.T) {
t.Helper()
tmpDir := setupTestDir(t)
- if _, err := git.PlainInit(tmpDir, false); err != nil {
- t.Fatalf("Failed to init repo: %v", err)
- }
+ testutil.InitRepo(t, tmpDir)
}
// writeSettings writes settings content to the settings file.This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 68db6dd. Configure here.
Contributor
Author
nodo
force-pushed
the
nodo/ext-agents-detection
branch
from
April 9, 2026 12:47
308204a to
9b80f5e
Compare
Entire-Checkpoint: e9b7d181b850
Applied via @cursor push command
Entire-Checkpoint: 7e76e12bc745
Entire-Checkpoint: 4a0d4e692d5a
nodo
force-pushed
the
nodo/ext-agents-detection
branch
from
April 9, 2026 12:57
9b80f5e to
32fbf07
Compare
pjbgf
reviewed
Apr 9, 2026
pjbgf
previously approved these changes
Apr 9, 2026
Entire-Checkpoint: 02acec3af4db
gtrrz-victor
approved these changes
Apr 9, 2026
nodo
enabled auto-merge
April 9, 2026 16:00
peyton-alt
added a commit
that referenced
this pull request
Aug 28, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 of 7 tasks
peyton-alt
added a commit
that referenced
this pull request
Sep 21, 2026
agy executes .agents/hooks.json hooks in Gemini API-key mode from 1.1.25 on (bisected across the mac release binaries with a probe hook in an isolated HOME: 1.1.22–1.1.24 fire nothing, 1.1.25/1.2.0/1.2.7 fire PreInvocation + Stop; upstream google-antigravity/antigravity-cli#893 is still open and the release notes never mention it). CI installs releases/latest, so the leg no longer needs the dispatch-only exclusion. agy 1.2.x dropped gemini-3.5-flash-low from `agy models` in both auth modes and rejects it with "invalid model selection"; the harness default moves to gemini-3.8-flash-low and its test follows the constant. Rewrite the #893 caveats in AGENT.md, agent-guide.md and e2e/README.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Entire-Checkpoint: 01M32SCKS6B1QYRNZY80FNQDFS
peyton-alt
added a commit
that referenced
this pull request
Sep 22, 2026
…kflow e2e.yml gates every PR, and its antigravity leg fetched agy's `latest` release, so a third-party regression in hook execution (the class #893 was) would redden PRs that never touched Antigravity and burn the shared GEMINI_API_KEY quota. Pin the version there and bump it deliberately after a green dispatch; nightly-e2e.yml keeps `latest`, so an agy change under us still surfaces in the job built to report it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Entire-Checkpoint: 01M34XPM7VX9KWVFXMW748CVT1
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.


This PR fixes a bug when running
entire enablehaving an external agents on the PATH.Note
Medium Risk
Changes first-run agent auto-detection/preselection behavior to treat external agents differently, which can alter interactive setup outcomes and defaults for users with external binaries on PATH.
Overview
Adjusts
detectOrSelectAgentso first-run auto-selection and default pre-selection only apply to built-in agents; if the only detected agent is external, the flow now falls through to the interactive selector instead of auto-accepting it.Strengthens test isolation from host-installed external agents by filtering
PATHinTestMain/test setup, and adds new tests with a mockentire-agent-*binary to validate external-only detection prompts andisBuiltInAgentbehavior.Reviewed by Cursor Bugbot for commit 68db6dd. Configure here.