Repository navigation
Description
Phenomenon
agentdescent init <skill> --agent claude-code and algorithms run … --agent openai-compatible fail, even though install / doctor print hyphenated host names (claude-code, grok-bot) and algorithm names, parameter names, and --kind already fold case and -/_. Users copying the host spelling from doctor or install --help hit a hard reject instead of a starter spec.
The CLI already recognises the alias (did you mean --agent claude_code?) but refuses to write it. plan cannot resolve a literal claude-code agent ref — folding to the canonical short ref before write would make the spec valid, same as --kind skill-library now writes "kind": "skill_library" (#882).
Evidence
On current main (53a99fcc57b87515be73d89202d8b9c66203492d):
init <skill-dir> --agent claude-code→--agent claude-code: not a known agent; use one of claude_code, … (did you mean \--agent claude_code`?)`init --kind text prompt.txt --agent openai-compatible→ same pattern, suggestsopenai_compatibleinit <skill-dir> --agent CLAUDE_CODEand--agent cli-agent→ same, suggestsclaude_code/cli_agentalgorithms run archive_selection <skill-dir> --agent claude-code→ same reject- Contrast:
install claude_code,install CLAUDE-CODE, andinstall grok_botalready resolve (init/algorithms run: --agent with an install host name (grok-bot, deepseek-harness) gets no useful hint #752);algorithms show archive-selectionand--kind skill-libraryalready fold (algorithms show/run: algorithm names are case- and hyphen-sensitive #696, cli: --kind rejects hyphen/case variants that algorithm names already accept (skill-library, SKILL_LIBRARY) #882).
Install-only aliases whose worker name is not a hyphen/case variant (deepseek-harness → dsh, claudecode → claude_code, open-code → opencode) already point at the worker with a did-you-mean; those should keep the hint. grok-bot is an install host with no worker CLI and should keep its explanatory error.
Expected
A --agent value that matches exactly one built-in short ref (claude_code, codex, dsh, opencode, cli_agent, openai_compatible, host_model, claude, echo) once case and -/_ are ignored resolves to that name (claude-code → claude_code, openai-compatible → openai_compatible, CLI_AGENT → cli_agent). init and algorithms run write the canonical agent.ref. Kind mismatch checks (#456) still run on the folded name (--agent claude-code on kind=text is still refused as a WorkspaceAgent).
Unchanged: install-only aliases that are not a case/-/_ fold of a worker ref (deepseek-harness, claudecode, open-code) still hint; grok-bot / grok still explain there is no worker; unrelated names like bogus still list the refs with no guess; custom module:attribute refs are not rewritten.
Acceptance
-
init <skill-dir> --agent claude-code(andCLAUDE_CODE) writes"agent": {"ref": "claude_code"} -
init --kind text <prompt> --agent openai-compatiblewrites"ref": "openai_compatible" -
algorithms run … --agent claude-codewrites the same canonical ref (does not refuse) -
init --kind text --agent claude-codestill refuses as a WorkspaceAgent (no silent swap, init: --agent is silently ignored for kind=text (always openai_compatible/deepseek-v4-flash); skill_dir accepts host_model until plan fails #456) -
deepseek-harness/open-code/claudecodestill hint at the worker and do not write a spec -
grok-botstill explains it is an install host with no worker CLI - changelog.d fragment
Non-goals
- Auto-accepting install-only aliases that are not a case/
-/_fold (deepseek-harness→dsh) - Folding
agent.refinside an already-written spec /plan(only the--agentflag) - Giving Grok Bot a worker CLI
- Folding spaces or other punctuation (
claude code,claude.code)
Risk hint
T1/T2 (CLI --agent validation only; no evolve-loop change).
Related
#882 / #883 (--kind fold), #876 / #877 (parameter-name fold), #752 (install host aliases), #745 (refuse unknown --agent before write), #456 (never silently swap a mismatched agent).
Activity