Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[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

Closed Beginner friendly
#268 0 comments 0 reactions 0 assignees View on GitHub

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

dogfood P2

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coco-research/coco

All issues in coco-research/coco

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.