Repository navigation
[AI-1569] Tombstone the retired agent verb: rename pointer to kcap daemon, exit 2 - #390
Conversation
…exit 2 The daemon verb was renamed in May 2026, but the dead verb lives on in old transcripts, docs, memories, and habits — and the generic "Unknown command: agent" reply is how a healthy daemon reads as dead mid- diagnosis (the message names nothing to run instead). `kcap agent …` — including `agent start` and `agent --help` — now answers with a rename pointer and exits 2, matching the removed cursor-import precedent. Placed before per-command help and before any server-config resolution, so it works logged-out and offline. Deliberately NOT an alias: the verb stays dead, so stale channels self-correct at the point of execution instead of fossilizing. The message avoids the literal retired phrase so the repo scan landing separately stays green regardless of merge order. Tests: RetiredAgentVerbTests (integration, spawns the built binary) 3/3 across the three arg forms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR Summary by QodoTombstone retired agent verb with daemon migration guidance
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used 1.
|
… concise comments - The agent check moves to immediately after command extraction — before ResolveServerUrl's config/git discovery and the update-check spawn — so the dead verb exits fast, offline, and deterministically (the prior placement paid config resolution first and could interleave unrelated stderr). - README documents the tombstone in the daemon section and the setup wizard step. - Production and test comments trimmed per the concise-comment rule. Tests: integration 3/3; smoke shows the two pointer lines with exit 2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per the decision to keep `kcap agent` as the coding-agent group, drops RetiredVerbScanTests (AI-1567), which banned the literal string "kcap agent" from all shipped text under kcap/, src/ and npm/ and is what failed CI on both platforms. Addresses the review findings on this PR: - The dispatch test did not prove dispatch. In a config-less environment every non-help case exited 1 at the missing-server gate and `--help` returned from the global help path, so nothing pinned that AgentCommand was reached — another pre-dispatch guard would have passed it. Each case now asserts a string only AgentCommand emits, and points `ls` at a daemon name that cannot exist so the handler's own output is deterministic. - Windows bypassed the daemon signpost. NotSupportedOnWindows returned before the subcommand switch, so `kcap agent status` reported that coding agents are unsupported instead of pointing at `kcap daemon status`, which Windows does support. The signpost now runs ahead of the platform guard. - The group sat behind the server-config gate, which made the signpost unreachable offline. `agent` joins offlineCommands and `start` — the only subcommand that needs a server for the daemon to record to — reports the missing server itself. ls/attach/stop only ever talk to the local socket. Two defects the rewritten test then caught in the group itself: - Any argv[1] was treated as a subcommand, so `kcap agent --daemon dev` failed with "unknown subcommand '--daemon'" instead of listing that daemon's agents. A leading flag is now an `ls` option. - `--no-update-check` is global and left in argv by Program.cs, so strict parsing read it as a subcommand and, worse, as a vendor name for `start`. Global flags are dropped before the split. Closes #391 AI-1570 Reverts the CLI behaviour of #390 (AI-1569) and the text ban from #389 (AI-1567). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ombstone (#392) * Restore the `kcap agent` command group shadowed by the retired-verb tombstone #390 added a `command is "agent"` guard at the top of Program.cs that exits 2 with a pointer to `kcap daemon`. #383 added the `kcap agent start|ls|stop|attach` group at `case "agent":` in the switch below it. They merged without conflict — different regions of the file — and the guard wins, so every `kcap agent` subcommand on main answers "Unknown command: agent" and exits 2. Neither side's tests caught it: #390's assert the tombstone fires (it does), and #383's exercise the parsers and daemon handlers directly, never through Program.cs. AgentVerbDispatchTests now spawns the real binary and pins that the group is reachable, which is the gap that let this through. The daemon signpost is kept where it doesn't collide: `kcap agent status`, `restart`, `logs`, `doctor`, and `service` only ever meant the daemon, so they answer with a pointer to `kcap daemon <verb>`. `start` and `stop` belong to both groups and dispatch to the agent group. Note this is reachable only with a server configured — the `agent` group resolves config before dispatch, unlike the pre-config tombstone it replaces. Closes #391 AI-1570 Reverts the CLI behaviour of #390 (AI-1569). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Remove the retired-verb text ban; fix dispatch, Windows and offline gaps Per the decision to keep `kcap agent` as the coding-agent group, drops RetiredVerbScanTests (AI-1567), which banned the literal string "kcap agent" from all shipped text under kcap/, src/ and npm/ and is what failed CI on both platforms. Addresses the review findings on this PR: - The dispatch test did not prove dispatch. In a config-less environment every non-help case exited 1 at the missing-server gate and `--help` returned from the global help path, so nothing pinned that AgentCommand was reached — another pre-dispatch guard would have passed it. Each case now asserts a string only AgentCommand emits, and points `ls` at a daemon name that cannot exist so the handler's own output is deterministic. - Windows bypassed the daemon signpost. NotSupportedOnWindows returned before the subcommand switch, so `kcap agent status` reported that coding agents are unsupported instead of pointing at `kcap daemon status`, which Windows does support. The signpost now runs ahead of the platform guard. - The group sat behind the server-config gate, which made the signpost unreachable offline. `agent` joins offlineCommands and `start` — the only subcommand that needs a server for the daemon to record to — reports the missing server itself. ls/attach/stop only ever talk to the local socket. Two defects the rewritten test then caught in the group itself: - Any argv[1] was treated as a subcommand, so `kcap agent --daemon dev` failed with "unknown subcommand '--daemon'" instead of listing that daemon's agents. A leading flag is now an `ls` option. - `--no-update-check` is global and left in argv by Program.cs, so strict parsing read it as a subcommand and, worse, as a vendor name for `start`. Global flags are dropped before the split. Closes #391 AI-1570 Reverts the CLI behaviour of #390 (AI-1569) and the text ban from #389 (AI-1567). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Problem
Linear AI-1569 — the daemon verb was renamed
agent→daemonin May 2026 (c6f1fd5), but the dead verb lives on in channels that can never be fully swept: old session transcripts resurfaced by recap/search, pre-fix server strings on not-yet-rolled-out tenants, worktrees branched before the docs fixes, notes, and agent memories. Each one funnels a user or coding agent into runningkcap agent, and the genericUnknown command: agentreply names nothing to run instead — the AI-1489/AI-1559 misdiagnosis loop (healthy daemon reads as dead).Fix
kcap agent …— includingagent startandagent --help— now answers:with exit 2, matching the removed cursor-import precedent. Placed before per-command help and before server-config resolution, so it works logged-out and offline. Deliberately not an alias — the verb stays dead; stale channels self-correct at the point of execution instead of fossilizing.
The message and comments avoid the literal retired phrase, so the repo scan landing in the AI-1567 PR stays green regardless of merge order.
Verification
RetiredAgentVerbTests(integration, spawns the built binary): 3/3 acrossagent/agent start/agent --help— pins stderr content and exit 2.exit=2.scripts/check-linear-ids.shclean (no issue ids in .cs).Related: kcap-server AI-1559 (#1210), AI-1568 (kcap-server #1213), AI-1567 (skill docs — separate PR).
🤖 Generated with Claude Code