`entire enable --force` exits 0 and refreshes nothing without a TTY, though doctor and status prescribe it
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
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
- Fresh repo,
entire enable,entire agent add claude-code - Plant the pre-0.10 shape in
.claude/settings.json: set thePreToolUse/PostToolUsematchers toTaskandTodoWrite, deleteSubagentStop(or use any repo enabled by an older CLI) entire doctor→Claude Code hooks: OUT OF DATE … Run entire enable --forceentire enable --force </dev/null(or from any non-TTY context) → bail-out text, exit 0entire doctor→ stillOUT OF DATEentire enable --force --agent claude-code→doctorreports 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:
- Make
--forcenon-interactive on its own. InrunManageAgentsWithPreflight, whenopts.ForceHooksandlen(installedNames) > 0, take the same path the skill flags take. Nothing to select; reinstall what is installed. Smallest change, matches whatdoctoralready promises. - Fix the advice instead. Leave the behaviour, and have
doctor/statusprintentire enable --force --agent <name>(they know the agent name at that point), and have the bail-out mention--agentrather thanagent 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di entireio/cli
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
entireio/cli#2416 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Stale `entire configure --agent` hints in investigate and review error messagesForse già presa @suhaanthayyil l’ha presa 54 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Codex last_assistant_message is parsed then discarded on Stop/SubagentStopForse già presa @Vishal202-rgb l’ha presa 45 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
entireio/cli#2064 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di entireio/cli
Issue simili
-
Headerless responses block while skipping duplicate status linesForse già presa @mynhe l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
projectdiscovery/rawhttp#554 ·
-
stage-fail
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
siyuan-note/bazaar#2447 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
superplanehq/superplane#9120 ·
I maintainer di solito rispondono entro 1 giorno