[GH-ISSUE #2164] [Bug] rea setup --dry-run prints nothing in an interactive terminal #710

Closed
opened 2026-10-15 18:27:37 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @balkan16 on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2164

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Setup, packaging, or upgrade

Observed behavior

In an interactive terminal, rea setup --dry-run prints nothing and exits 0, with or without --client. The help text says --dry-run will "Print the resolved plan without applying it", and docs/installation.md tells users to run rea setup --skill --dry-run and "review the destination", but there is nothing to review.

The same command prints the full plan when stdout is not a TTY, or with an explicit --format.

Reproduction

From a terminal (TTY on stdin/stdout/stderr):

npx -y rea-agents@latest setup --dry-run
npx -y rea-agents@latest setup --dry-run --client codex

Both print nothing and exit 0.

Controls that do print the plan:

npx -y rea-agents@latest setup --dry-run | cat
npx -y rea-agents@latest setup --dry-run --format toon

Also reproduced from source on main 60259a9 under a pseudo-terminal: script -qc "node scripts/rea.mjs setup --dry-run --client codex" /dev/null prints nothing; REA_LOG_LEVEL=debug shows CLI command completed with status: ok.

Expected behavior

In a terminal, --dry-run shows the planned actions (target paths and what each action does) and states that nothing was applied. Structured output for pipes and --format stays unchanged.

Impact and scope

Users following the documented review step before approving setup changes. Agents are unaffected (no TTY, or explicit --json/--format).

REA version

rea-agents@latest via npx (2026-10-12); source main 60259a9

Runtime and platform

macOS (zsh, Terminal); Linux, Node 22.22, pseudo-terminal

Target and artifact context

None (setup only)

Interface

CLI

Earliest failure stage

Transport or result projection

Relevant output or evidence


Typed outcome or recovery expected

No response

Analysis or suspected cause

  • src/cli/setupCommands.ts registers setup with outputPolicy: "agent-only", so incur skips rendering the returned value when output is human (TTY and no explicit format).
  • setupIsInteractive returns false for --dry-run, so renderInteractiveSetupResult is not called.
  • renderInteractiveSetupResult also returns early for status === "planned".

Net: the planned result is rendered by neither path in a terminal.

I plan to fix this by rendering a short human summary of the planned actions for --dry-run in a terminal, leaving structured output unchanged. I'll open a PR shortly.

Additional context

No response

Originally created by @balkan16 on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2164 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Setup, packaging, or upgrade ### Observed behavior In an interactive terminal, `rea setup --dry-run` prints nothing and exits 0, with or without `--client`. The help text says `--dry-run` will "Print the resolved plan without applying it", and docs/installation.md tells users to run `rea setup --skill --dry-run` and "review the destination", but there is nothing to review. The same command prints the full plan when stdout is not a TTY, or with an explicit `--format`. ### Reproduction From a terminal (TTY on stdin/stdout/stderr): ``` npx -y rea-agents@latest setup --dry-run npx -y rea-agents@latest setup --dry-run --client codex ``` Both print nothing and exit 0. Controls that do print the plan: ``` npx -y rea-agents@latest setup --dry-run | cat npx -y rea-agents@latest setup --dry-run --format toon ``` Also reproduced from source on main 60259a9 under a pseudo-terminal: `script -qc "node scripts/rea.mjs setup --dry-run --client codex" /dev/null` prints nothing; `REA_LOG_LEVEL=debug` shows `CLI command completed` with `status: ok`. ### Expected behavior In a terminal, `--dry-run` shows the planned actions (target paths and what each action does) and states that nothing was applied. Structured output for pipes and `--format` stays unchanged. ### Impact and scope Users following the documented review step before approving setup changes. Agents are unaffected (no TTY, or explicit `--json`/`--format`). ### REA version rea-agents@latest via npx (2026-10-12); source main 60259a9 ### Runtime and platform macOS (zsh, Terminal); Linux, Node 22.22, pseudo-terminal ### Target and artifact context None (setup only) ### Interface CLI ### Earliest failure stage Transport or result projection ### Relevant output or evidence ```text ``` ### Typed outcome or recovery expected _No response_ ### Analysis or suspected cause - `src/cli/setupCommands.ts` registers `setup` with `outputPolicy: "agent-only"`, so incur skips rendering the returned value when output is human (TTY and no explicit format). - `setupIsInteractive` returns false for `--dry-run`, so `renderInteractiveSetupResult` is not called. - `renderInteractiveSetupResult` also returns early for `status === "planned"`. Net: the planned result is rendered by neither path in a terminal. I plan to fix this by rendering a short human summary of the planned actions for `--dry-run` in a terminal, leaving structured output unchanged. I'll open a PR shortly. ### Additional context _No response_
bsakaguchi 2026-10-15 18:27:37 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#710
No description provided.