feat: auto-discover external agents during enable, rewind, and resume#724
Open
alishakawaguchi wants to merge 4 commits intomainfrom
Open
feat: auto-discover external agents during enable, rewind, and resume#724alishakawaguchi wants to merge 4 commits intomainfrom
alishakawaguchi wants to merge 4 commits intomainfrom
Conversation
External agent discovery was gated behind the `external_agents` setting, creating a chicken-and-egg problem: the setting doesn't exist until after `entire enable` writes it, so external agents never appeared in first-time setup. This replaces the gated discovery with unconditional discovery in setup flows, auto-enables the setting when an external agent is selected, and adds a 10s overall timeout to prevent PATH scanning from blocking setup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
External agents (e.g., Kiro) registered via discovery were not found during `entire rewind` or `entire resume` because DiscoverAndRegister only ran during enable/hooks flows, not these commands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 3eec0a039143
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 66ac4e0c436b
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
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
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves support for external (PATH-discovered) agent plugins across initial setup and session-management commands, so external-agent checkpoints and hook flows can work without manual preconfiguration.
Changes:
- Add
DiscoverAndRegisterAlways()to allow external agent discovery during interactive setup even beforeexternal_agentsexists in settings. - Auto-enable
external_agentsin settings when an external agent is selected during interactive enable. - Run external agent discovery in
entire rewindandentire resume, and add a 10s discovery timeout to prevent long PATH scans.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/setup.go | Uses always-discovery in interactive setup/add flows; auto-enables external_agents; updates --agent help text. |
| cmd/entire/cli/rewind.go | Discovers external agents before resolving checkpoint agents. |
| cmd/entire/cli/resume.go | Discovers external agents before resolving checkpoint agents. |
| cmd/entire/cli/agent/external/discovery.go | Adds DiscoverAndRegisterAlways() and introduces a 10s discovery timeout. |
| cmd/entire/cli/agent/external/capabilities.go | Adds IsExternal() helper for detecting wrapped external agents. |
| cmd/entire/cli/agent/external/discovery_test.go | Adds unit tests for always-discovery and IsExternal(). |
| cmd/entire/cli/strategy/rewind_test.go | Adds a unit test covering resolving dynamically registered agents by type. |
…up commands Address PR #724 review comments: - runAddAgents now persists external_agents: true after installing hooks - Move PATH discovery after interactivity check to avoid unnecessary scan - configure/enable --agent use DiscoverAndRegisterAlways for fresh repos - setupAgentHooksNonInteractive sets ExternalAgents when agent is external Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: fd6189edccc6
5 tasks
pfleidi
approved these changes
Mar 18, 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.

Summary
external_agentssetting, which doesn't exist until afterentire enablewrites it. AddedDiscoverAndRegisterAlways()that bypasses the settings check for interactive setup flows, so external agents appear in first-time agent selection.external_agentssetting: When a user selects an external agent during setup, theexternal_agentssetting is automatically enabled in the written config.entire rewindandentire resumenow callDiscoverAndRegister()so checkpoints from external agents can be resolved.Test plan
DiscoverAndRegisterAlways(finds agents without settings)IsExternal(true for wrapped agents, false for built-ins)ResolveAgentForRewindentire enablewith anentire-agent-*binary on PATH — verify it appears in agent selectionexternal_agents: truein settingsentire rewind --list— verify checkpoints show🤖 Generated with Claude Code
Note
Cursor Bugbot is generating a summary for commit 609fc3b. Configure here.