Skip to content

Conversation

@gtrrz-victor
Copy link
Contributor

@gtrrz-victor gtrrz-victor commented Jan 29, 2026

Note

Medium Risk
Medium risk because this removes GetAgent auto-detection/fallback paths and changes several workflows (rewind, debug, hook execution) to require an explicit agent type from session state, which can introduce new errors for older/missing metadata.

Overview
Removes agent-related configuration from .entire/settings*.json (drops agent, agent_auto_detect, and agent_options) and deletes the associated resolution helpers/tests (GetAgent, GetAgentOptions). enable no longer persists an agent choice into settings.

Updates agent selection to come from runtime context instead of settings: rewind now requires an AgentType on rewind points (manual-commit points now populate RewindPoint.Agent from session state), and debug transcript auto-detection now errors if the session lacks an agent type rather than falling back to detection.

Telemetry reporting switches from a single configured agent to a comma-separated list of agents with hooks currently installed (GetAgentsWithHooksInstalled + JoinAgentNames). Hook handling also tightens GetCurrentHookAgent to error when not running in a hook context (no fallback).

Written by Cursor Bugbot for commit 320315c. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings January 29, 2026 04:12
@gtrrz-victor gtrrz-victor requested a review from a team as a code owner January 29, 2026 04:12
Copy link
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

This PR removes agent-specific configuration (agent name, auto-detect flag, and agent options) from the global settings, and shifts agent resolution to be driven by session/checkpoint metadata and installed hooks instead of config files.

Changes:

  • Removed agent, agent_auto_detect, and agent_options from EntireSettings, including their merge logic, accessors (GetAgent, GetAgentOptions), and associated tests.
  • Updated telemetry and setup flows to derive agent information from installed hooks rather than persisted settings, and to stop persisting a chosen agent in settings.json.
  • Tightened agent resolution in rewind, hooks, and debug paths to rely on per-checkpoint agent type and hook context instead of config-based auto-detection, while adding helper utilities for listing installed agents.

Reviewed changes

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

Show a summary per file
File Description
cmd/entire/cli/setup_test.go Removed expectations around agent_options preservation in enable/setup tests now that agent options are no longer part of settings.
cmd/entire/cli/setup.go Stopped writing settings.Agent during non-interactive setup; setup now only persists strategy and strategy options.
cmd/entire/cli/root.go Changed telemetry wiring to compute the agent string from GetAgentsWithHooksInstalled + JoinAgentNames instead of settings.Agent.
cmd/entire/cli/rewind.go Replaced getAgentWithFallback with a stricter getAgent that always uses the checkpoint’s AgentType, and updated all rewind paths (interactive, non-interactive, logs-only, reset) to use it.
cmd/entire/cli/hook_registry.go Modified GetCurrentHookAgent to require a hook context (no more fallback to GetAgent), returning an error when currentHookAgentName is unset.
cmd/entire/cli/debug.go Simplified findTranscriptForSession to require a non-empty AgentType from session state instead of falling back to a detected/default agent.
cmd/entire/cli/config_test.go Removed tests exercising GetAgent, GetAgentOptions, and agent-related settings fields; cleaned up the now-unused agent import.
cmd/entire/cli/config.go Removed agent-related fields and merge logic from EntireSettings, dropped GetAgent/GetAgentOptions, and added GetAgentsWithHooksInstalled and JoinAgentNames helpers used by telemetry.

Copy link
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@gtrrz-victor gtrrz-victor force-pushed the gtrrz-victor/cleanup-config branch from a6c9c43 to 74c5f00 Compare January 29, 2026 04:46
Copy link

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
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

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

Comment on lines +298 to +320
// GetAgentsWithHooksInstalled returns names of agents that have hooks installed.
func GetAgentsWithHooksInstalled() []agent.AgentName {
var installed []agent.AgentName
for _, name := range agent.List() {
ag, err := agent.Get(name)
if err != nil {
continue
}
if hs, ok := ag.(agent.HookSupport); ok && hs.AreHooksInstalled() {
installed = append(installed, name)
}
}
return installed
}

// JoinAgentNames joins agent names into a comma-separated string.
func JoinAgentNames(names []agent.AgentName) string {
strs := make([]string, len(names))
for i, n := range names {
strs[i] = string(n)
}
return strings.Join(strs, ",")
}
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

GetAgentsWithHooksInstalled and JoinAgentNames are new helpers that are used to drive telemetry but currently have no direct tests in config_test.go, whereas other configuration helpers in this file are covered. Consider adding unit tests that exercise these functions (e.g., with a small set of registered test agents, with and without HookSupport) to ensure the reported agent list and joined string stay correct as agents evolve.

Copilot uses AI. Check for mistakes.
@gtrrz-victor gtrrz-victor merged commit 5b1cc26 into main Jan 29, 2026
10 checks passed
@gtrrz-victor gtrrz-victor deleted the gtrrz-victor/cleanup-config branch January 29, 2026 23:05
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.

3 participants