Skip to content

Output for scripts and agents: empty stdout with exit 0, --version not machine-readable, agent detection changes nothing #105

Open

Description

@joeblew999

cf version: 1.0.0-beta.5, macOS

Three things that break scripts and agents parsing cf's output:

  1. Empty stdout with exit 0. cf zero-trust access applications cas list prints nothing (0 bytes) and exits 0. Other lists print JSON ([] when empty), so cf ... | jq fails only on this one.
  2. cf --version isn't machine-readable. It prints 🍊☁️ cf · v1.0.0-beta.5 plus a box rule. There's no bare semver, which scripts need to pin or compare versions (--version --quiet, or cf version --json).
  3. Agent detection doesn't change the output. CLAUDECODE=1 cf d1 list | wc -c gives 4,293 bytes, byte-identical to running without it, still pretty-printed. The launch post describes condensed output for agents.

Expected:

  • every list prints JSON, [] when empty;
  • a bare version output;
  • compact JSON when an agent is detected, or remove the claim.

Found while evaluating cf for a dev workflow: https://github.com/joeblew999/cf-cli-test (FINDINGS.md, findings/).

Activity

  1. workers-devprod commented on Nov 24, 2026

    @workers-devprod
    Collaborator

    Thanks for the detailed report!

    • cf --version: this now prints only the bare version on stdout, with the banner on stderr, so it's safe to use in scripts.
    • Compact output for agents: cf currently pretty-prints JSON whether or not it detects an agent. Agent detection changes other things, such as the help text. Changing the JSON format would be a change to the product, which we track at Compact JSON output when cf detects an AI agent #765, so please follow and upvote it there.
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions