[dogfood][all][npm|main] Unknown `coco` subcommand (e.g. `coco doctor`) clones the 123 MB repo into ./coco, then fails "Unknown flag" and leaves the clone
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- cli
Research direction
Start in bin/coco.js around lines 250-253, where the default command-dispatch case passes unknown subcommands through to install. Check how bare words are distinguished from supported pass-through flags, then reproduce with coco doctor or an unknown word. Done means the command exits non-zero with an error or help text without cloning into ./coco, while intended flag pass-through still works.
Written by the indexing model from the issue text.
Description
Adapter: all (npm CLI wrapper bin/coco.js)
Paths: npm [email protected] and main 829f516 (node bin/coco.js). The default branch of main() is the same in both.
Tester: Sarah (SI dogfood; the brief asks for coco --help/doctor checks, and coco doctor is the open feature #26).
Repro
export HOME=/workspace/si-dogfood/sarah/runs/npm-doctor/home NPM_CONFIG_PREFIX=/workspace/si-dogfood/sarah/npm-prefix
npm i -g [email protected]
cd ~/work && coco doctor ; echo rc=$?
du -sh ~/work/coco
Expected
An unknown subcommand (a typo, or doctor, which is not built yet, #26) prints an error or the help text and exits non-zero without touching disk.
Actual
bin/coco.js:250-253 (default: // any unknown subcommand → pass through to install) treats doctor as an install. It clones the whole repo (tag v1.5.0, 123 MB) into ./coco, then runs install.sh doctor, which fails with Unknown flag: doctor (rc=1). The clone stays behind.
Cloning Coco v1.5.0 to …/home/work/coco...
Running …/home/work/coco/install.sh...
Unknown flag: doctor
rc=1
123M …/home/work/coco
Main's node coco/bin/coco.js doctor does the same (it also clones v1.5.0, #235). coco --help doesn't say that unknown words fall through to install. Pass-through is only meant for flags (npx cocosuperintelligence --adapter cursor, per the code comment), but any bare word triggers it.
Severity P2: nothing is lost, but a typo costs a 123 MB clone in the cwd and a confusing error.
Evidence
/workspace/si-dogfood/sarah/evidence/logs/npm-coco-doctor.log, /workspace/si-dogfood/sarah/evidence/logs/main-coco-doctor.log.
- Dominant language
- HTML
- Stars
- 347
- Forks
- 12
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 104
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coco-research/coco
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
coco-research/coco#374 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
coco-research/coco#312 ·
Maintainers usually reply within 1 day
-
dogfood P1
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
coco-research/coco#257 ·
Maintainers usually reply within 1 day
-
dogfood P2
Difficulty 1/5 Under an hour Newbie friendliness 95/100
coco-research/coco#249 ·
Maintainers usually reply within 1 day
-
dogfood P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
coco-research/coco#246 ·
Maintainers usually reply within 1 day
All issues in coco-research/coco
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
neondatabase/neon-pkgs#941 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bundle: ignores the manifest entryPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
longbridge/gpui-kit#3675 ·
Maintainers usually reply within 1 day
-
area:bash bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/claude-code#104799 ·
Maintainers usually reply within 1 day
-
tui: PHP code blocks without `<?php` are not syntax highlightedPossibly taken A pull request linked to this issue is open or already merged. Openreproduced
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/opencode#58664 · 1 comment ·
Maintainers usually reply within 1 day