Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`entire enable --force` exits 0 and refreshes nothing without a TTY, though doctor and status prescribe it

Aperta
#2,535 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

Start in setup.go at runManageAgentsWithPreflight, especially the non-interactive branch around lines 584-612, and compare the existing --search-skill and --agent-help-skill handling with applyAgentChanges. Check the doctor.go and status.go advice and agent/claudecode/hooks.go contract. Done means non-interactive entire enable --force refreshes installed agents or clearly reports an actionable alternative, without falsely succeeding while hooks remain stale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happened?

entire doctor and entire status both prescribe entire enable --force when an agent's hook config is out of date (doctor.go:1279, status.go:239, plus three more sites in doctor.go), and agent/claudecode/hooks.go:48-50 documents the same contract: stale Task / TodoWrite matchers "are not rewritten in place on a normal entire enable; run with --force to strip and reinstall."

Without a TTY, entire enable --force does none of that. runManageAgentsWithPreflight (setup.go:610-612) hits the non-interactive branch before applyAgentChanges, prints a bail-out, and returns nil, so the command exits 0 with the stale config untouched:

$ entire enable --force        # no TTY
Enabled agents: Claude Code

Cannot show agent selection in non-interactive mode.
Use: entire agent add <name>
Agents: Claude Code

To add more agents, run `entire agent add <name>`.
$ echo $?
0
$ entire doctor | grep -i "claude code hook"
Claude Code hooks: OUT OF DATE

The bail-out's own suggestion, entire agent add claude-code, is a non-force add, which by the documented contract appends the current entries and leaves the dead ones in place. doctor then reports OK, because the current matchers are present, while the file carries both generations:

PreToolUse:  ["Task", "Agent"]
PostToolUse: ["Task", "TodoWrite", "Agent", "TaskCreate|TaskUpdate"]

The flag that does work non-interactively is --agent: entire enable --force --agent claude-code strips and reinstalls, exits 0, and doctor reports OK. Neither doctor nor status mentions it. --yes also refreshes, but it selects every agent, so a repo with one stale agent ends up with hook files for eight.

I hit this for real, not in a rig: doctor in my repo said OUT OF DATE, I ran the command it printed from a coding agent's shell, got exit 0, and doctor still said OUT OF DATE. agent-help steers agents toward suggesting enable rather than running it, but doctor's text is a bare command, and the failure is silent either way.

Reproduced on Entire 0.10.6 and on nightly 0.10.7-nightly.202609190623.ae303f31d, with identical output. Line numbers are from main at 81a05d785.

Steps to reproduce
  1. Fresh repo, entire enable, entire agent add claude-code
  2. Plant the pre-0.10 shape in .claude/settings.json: set the PreToolUse / PostToolUse matchers to Task and TodoWrite, delete SubagentStop (or use any repo enabled by an older CLI)
  3. entire doctor → Claude Code hooks: OUT OF DATE … Run entire enable --force
  4. entire enable --force </dev/null (or from any non-TTY context) → bail-out text, exit 0
  5. entire doctor → still OUT OF DATE
  6. entire enable --force --agent claude-code → doctor reports OK

Scripted, re-runnable: repro-enable-force-noninteractive.sh covers steps 3-6 plus the agent add case. Happy to paste it.

Entire CLI version

Entire CLI 0.10.6 (Go 1.26.6, darwin/arm64)

OS and architecture

macOS 27.0 (Darwin 27.0.0) arm64

Agent

Claude Code

Additional context

There is already a precedent for the fix in the same function: when --search-skill or --agent-help-skill is set and agents are installed, the non-interactive branch skips selection and calls applyAgentChanges on the installed set (setup.go:584-601). --force with installed agents is the same situation: the user is not choosing agents, they are asking for the installed ones to be reinstalled.

Two shapes I can see, and I would rather agree one before writing it:

  1. Make --force non-interactive on its own. In runManageAgentsWithPreflight, when opts.ForceHooks and len(installedNames) > 0, take the same path the skill flags take. Nothing to select; reinstall what is installed. Smallest change, matches what doctor already promises.
  2. Fix the advice instead. Leave the behaviour, and have doctor / status print entire enable --force --agent <name> (they know the agent name at that point), and have the bail-out mention --agent rather than agent add, which by design does not refresh.

I lean 1, with the doctor text naming --agent as well, since a bare --force that exits 0 having done nothing is the part that bites. Either way, exit 0 on the bail-out seems wrong when --force was requested and not honoured.

Related: #2237 (a different re-install path, git hooks, where the only signal is also lost outside an interactive entire enable).

Lingua principale
Go
Stelle
5.1k
Fork
475
Merge medio
1g 17h
PR unite (30g)
208

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di entireio/cli

Tutte le issue di entireio/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.