You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the codev afx, codev agent-farm, and codev af invocation paths. Going forward, afx is the only supported entrypoint for agent-farm commands. The standalone afx global bin already exists and is what every doc, skill, and prompt already tells users to call — the codev-wrapped variants are a leftover that adds a cross-cutting fragility we'd rather not pay for.
Motivation
Two reasons, in order:
Cross-cutting fragility. A recent integration review on PR [#829] afx workspace recover: revive builders and main architect after machine reboot #833 surfaced that workspace-recover.ts respawns via spawn(process.execPath, [process.argv[1], 'spawn', ...]). That works when invoked as afx but breaks when invoked as codev afx because process.argv[1] is then the codev entrypoint and codev spawn ... is not a top-level command. This is the kind of bug we'll keep paying for as long as the same logical command has two invocation surfaces with different process.argv[1] semantics. The cheaper fix is to remove the alternate surface.
No one uses it. Every doc (CLAUDE.md, AGENTS.md, the README, the skills, the prompts) tells users to invoke afx <subcommand> directly. The codev afx wrapper has been "supported but unused" for the entire 3.x line; codev af was already deprecated with a stderr warning at cli.ts:402. We're just acknowledging the de-facto state.
Remove the args[0] === 'agent-farm' early-dispatch branch in the exported runWithArgs function (around cli.ts:381-395).
Remove the args[0] === 'agent-farm' || args[0] === 'afx' || args[0] === 'af' early-dispatch branch at the top-level argv parsing (around cli.ts:398-405), including the codev af deprecation warning.
Keep runAgentFarm itself imported — it's still used by the standalone afx bin shim (packages/codev/bin/afx.js).
Deprecation messaging for anyone who tries the old path: print a clear stderr line ("codev afx is no longer supported; use afx <subcommand> directly") and exit non-zero. Don't silently misroute or fall through.
Docs sweep — search the repo for codev afx, codev agent-farm, codev af occurrences and update / remove. Spot-checks suggest there are very few but verify:
CLAUDE.md and AGENTS.md (kept in sync)
README.md, INSTALL.md
codev-skeleton/ equivalents
codev/resources/commands/*.md
Any .claude/skills/ skill files
No new tests required for absence, but a small test that the old invocations exit non-zero with the expected stderr would be a nice touch.
Acceptance criteria
afx <anything> still works exactly as before (the standalone bin path is unchanged).
codev afx <anything>, codev agent-farm <anything>, codev af <anything> all exit non-zero with a one-line stderr explaining the removal and pointing at afx.
No callsite in the repo (docs, scripts, skills, prompts) still says codev afx etc. — those are all rewritten to afx.
codev tower, codev init, codev adopt, codev doctor, codev update, team, porch, consult are all untouched. This change is scoped to the agent-farm wrapper.
PR description notes that this is technically a breaking change for any external script that hardcoded codev afx <…>, but in practice the workaround is a one-character edit (drop the codev prefix).
Summary
Remove the
codev afx,codev agent-farm, andcodev afinvocation paths. Going forward,afxis the only supported entrypoint for agent-farm commands. The standaloneafxglobal bin already exists and is what every doc, skill, and prompt already tells users to call — thecodev-wrapped variants are a leftover that adds a cross-cutting fragility we'd rather not pay for.Motivation
Two reasons, in order:
Cross-cutting fragility. A recent integration review on PR [#829] afx workspace recover: revive builders and main architect after machine reboot #833 surfaced that
workspace-recover.tsrespawns viaspawn(process.execPath, [process.argv[1], 'spawn', ...]). That works when invoked asafxbut breaks when invoked ascodev afxbecauseprocess.argv[1]is then thecodeventrypoint andcodev spawn ...is not a top-level command. This is the kind of bug we'll keep paying for as long as the same logical command has two invocation surfaces with differentprocess.argv[1]semantics. The cheaper fix is to remove the alternate surface.No one uses it. Every doc (CLAUDE.md, AGENTS.md, the README, the skills, the prompts) tells users to invoke
afx <subcommand>directly. Thecodev afxwrapper has been "supported but unused" for the entire 3.x line;codev afwas already deprecated with a stderr warning atcli.ts:402. We're just acknowledging the de-facto state.What changes
packages/codev/src/cli.ts(the surface).command('agent-farm', { hidden: false }).aliases(['afx', 'af'])registration (aroundcli.ts:355-365).args[0] === 'agent-farm'early-dispatch branch in the exportedrunWithArgsfunction (aroundcli.ts:381-395).args[0] === 'agent-farm' || args[0] === 'afx' || args[0] === 'af'early-dispatch branch at the top-level argv parsing (aroundcli.ts:398-405), including thecodev afdeprecation warning.runAgentFarmitself imported — it's still used by the standaloneafxbin shim (packages/codev/bin/afx.js).codev afxis no longer supported; useafx <subcommand>directly") and exit non-zero. Don't silently misroute or fall through.codev afx,codev agent-farm,codev afoccurrences and update / remove. Spot-checks suggest there are very few but verify:CLAUDE.mdandAGENTS.md(kept in sync)README.md,INSTALL.mdcodev-skeleton/equivalentscodev/resources/commands/*.md.claude/skills/skill filesAcceptance criteria
afx <anything>still works exactly as before (the standalone bin path is unchanged).codev afx <anything>,codev agent-farm <anything>,codev af <anything>all exit non-zero with a one-line stderr explaining the removal and pointing atafx.codev afxetc. — those are all rewritten toafx.codev tower,codev init,codev adopt,codev doctor,codev update,team,porch,consultare all untouched. This change is scoped to the agent-farm wrapper.codev afx <…>, but in practice the workaround is a one-character edit (drop thecodevprefix).References
process.argv[1]invocation-style split as a real integration bug. We're addressing the underlying surface, not patching the spawn child.packages/codev/src/cli.ts:353-365, 381-405.packages/codev/bin/afx.js.