Skip to content

cli: --json rejected where --format json works; site fixture/memory still reject -f and --stdin #376

Description

@ankitranjan7

Summary

Agents treat -f / --format json / --json / --stdin as one Webcmd grammar. On v0.7.4 that grammar still breaks on several authoring commands, and --json is rejected even on commands that already accept --format json.

This is the same class of failure as #338 / #171 / #175, still reproducing after those landed.

What the eval actually did (v0.7.4, local task eval)

Invocation Result
webcmd hackernews top --json unknown option '--json' — valid flags include -f, --format
webcmd rest-countries top --json same
webcmd site fixture get quotes-toscrape/list -f json unknown option '-f' — valid flags: --output
webcmd site memory show --kind endpoints -f json unknown option '-f'
webcmd site fixture put --stdin unknown option '--stdin'

Two of those cost a wasted turn on an otherwise 5.0 scenario (engineering-news-brief, heal-country-cli). The site-memory ones burned turns on create-quotes-cli.

--json is not a wild guess. It is the dominant CLI convention, and Webcmd already prints valid flags: --limit, -f, --format. The agent then has to invent the mapping --json--format json.

Why this is still open

#338 added -f to several list commands (profile list now works). It did not:

  1. Accept --json as an alias of --format json on commands that already have --format
  2. Wire -f through site fixture get, site memory show, and the other site-memory reads
  3. Accept --stdin on site fixture put, even though browser run --stdin is the pattern the same agent just used

An inconsistent flag does not read as "this command is different." It reads as "I got the invocation wrong," so the agent retries with a temp file or drops into the filesystem.

Fix

  1. Accept --json as an alias of --format json on every command that already has --format. Unknown-flag errors that list --format should also list --json, or accept it.
  2. Add -f, --format to site fixture get, site memory show, site memory list, site note list, site endpoint list — the enumerations an agent parses mid-authoring.
  3. Accept --stdin / - on site fixture put (and any other put that currently requires a path), matching browser run --stdin.

Check

  • webcmd hackernews top --json --limit 1 and webcmd hackernews top --format json --limit 1 produce the same payload.
  • webcmd site fixture get <site/cmd> -f json exits 0 or a structured empty, never unknown option '-f'.
  • printf '{}' | webcmd site fixture put <site/cmd> --stdin is accepted (or the error names the valid input shape).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions