Skip to content

lab --help still lists the internal run worker in the usage line #1171

Closed

Description

@Birfy

Problem

run is the internal detached-worker verb that evolve --detach spawns. Since #420, agentdescent --help, the top-level usage line, and unknown-verb choose from lists all hide it.

After #1112 / #1169, lab mounts every verb, including run. The help line and choose from list still hide it, but the lab usage metavar does not. On main 367d140f:

$ agentdescent lab --help
usage: agentdescent lab [-h]
                        {demo,init,plan,evolve,run,status,watch,...} ...

There is no run help line (correct), so the braces advertise a verb the listing does not explain. The same metavar leaks into the usage printed on an error, including --json:

$ agentdescent --json lab xyz
{
  "ok": false,
  "error": "argument lab_cmd: invalid choice: 'xyz' (choose from 'demo', ..., 'mcp')",
  "usage": "usage: agentdescent lab [-h]\n                        {demo,init,plan,evolve,run,status,...} ..."
}

choose from is already correct (_visible_choices strips _INTERNAL_COMMANDS). Only the {...} metavar on the lab subparsers was left at argparse's default, which includes run. The top-level parser sets its metavar from DEFAULT_SURFACE and so does not have this leak.

Expected

The same #420 contract on the lab mount: agentdescent lab --help, lab usage, and the usage field of a lab argparse error (plain and --json) must not list run. agentdescent lab run --run-dir … must still parse (the worker path stays reachable, just unpublished).

Acceptance

  • lab --help / lab usage braces omit run and still list the public verbs (evolve, algorithms, …).
  • Every verb those braces list has a help line (the current leak fails this: run is in the braces and has no line).
  • agentdescent lab xyz and agentdescent --json lab xyz do not mention run in usage or choose from.
  • agentdescent lab run --run-dir /tmp/x --budget 1.5 still parses to cmd_run.

No other verb's arguments, output, or exit code should change.

Activity

  1. added
    bugSomething isn't working
    area:cliThe agentdescent command line (cli.py, doctor, plan/evolve/status/apply)
    agent-readyTriaged spec: an agent may take it. Set by a maintainer or the maintenance routine only
    on Nov 19, 2026
  2. Birfy commented on Nov 19, 2026

    @Birfy
    CollaboratorAuthor

    Claim: agent/1171-lab-hides-internal-run → one PR against main. Scope is the #420 contract on the lab mount: hide run from the usage metavar; the verb stays reachable as lab run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyTriaged spec: an agent may take it. Set by a maintainer or the maintenance routine onlyarea:cliThe agentdescent command line (cli.py, doctor, plan/evolve/status/apply)bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions