Skip to content

Startup and version notices corrupt agents-cli info --json stdout #69

Description

@benagentai93-dot

Baseline

Reproduced from v1.3.1 at 5a306f8956cb1eeae69f9709de0e4d61b44e11e7.

Reproduction

Use a valid project manifest that triggers one or more update, skills-version, legacy-config, or CLI/project-version notices, then run:

agents-cli info --json > info.json
python -m json.tool info.json

Actual behavior

Notices are written to stdout before or after the JSON payload, so info.json is not directly parseable by a JSON consumer even though the command explicitly requested machine-readable output.

Expected behavior

Stdout should contain only the command payload. Update/version/skills/legacy warnings belong on stderr, preserving their visibility without corrupting JSON.

Minimal fix

Use Click's err=True for warning echoes and configure the shared Rich update console with Console(stderr=True). No output-format abstraction is required.

Reference implementation: benagentai93-dot@0510574

Test evidence

A runnable regression triggers all four notice families together, parses result.stdout with json.loads, and verifies each notice remains present on stderr.

Fork verification on Python 3.11/3.13:

  • focused Batch 1 suite: 17 passed
  • full root suite: 19 passed
  • lint, type check, build, and installed-wheel smoke: passed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions