[GH-ISSUE #5443] [Bug] Setup with --all-detected silently omits an explicitly selected undetected client #3303

Closed
opened 2026-10-31 00:38:57 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @coygeek on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5443

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

rea setup --client cursor --all-detected --yes --json returns ready and exits 0 after configuring only Codex when Codex is detectable and Cursor is not. The explicitly requested Cursor registration does not exist afterward. A fresh dry run also omits Cursor from the plan.

This report was prepared with AI assistance from an independently reproduced CLI verification. The submitter checked current upstream source and duplicate reports; the runtime results below come from that verifier's recorded runs.

Reproduction

Run from the source revision below with dependencies installed and the runtime built. Set TMPDIR to a disposable directory. The executed recipe used isolated home and XDG roots and no inherited provider settings:

VERIFY_ROOT=$(mktemp -d "${TMPDIR:?Set TMPDIR to a disposable directory}/rea-selection.XXXXXX")
rea_case() {
  case_root="$1"
  shift
  mkdir -p "$case_root/home" "$case_root/config" "$case_root/data" "$case_root/cache" "$case_root/state" "$case_root/temp"
  env -i PATH="$PATH" NO_COLOR=1 HOME="$case_root/home" \
    XDG_CONFIG_HOME="$case_root/config" XDG_DATA_HOME="$case_root/data" \
    XDG_CACHE_HOME="$case_root/cache" XDG_STATE_HOME="$case_root/state" \
    TMPDIR="$case_root/temp" node scripts/rea.mjs "$@"
}
mkdir -p "$VERIFY_ROOT/mixed/home/.codex"
rea_case "$VERIFY_ROOT/mixed" setup --client cursor --all-detected --yes --json
printf 'setup exit=%s\n' "$?"
test -f "$VERIFY_ROOT/mixed/home/.cursor/mcp.json"
printf 'Cursor config test exit=%s\n' "$?"
rea_case "$VERIFY_ROOT/mixed" doctor --client cursor --json
printf 'doctor exit=%s\n' "$?"

Observed exits were 0, 1, and 1 respectively. The final recipe replay reproduced the same result as the independent initial run.

Controls actually run in fresh isolated cases with the same Codex detection directory:

  • Omitting --all-detected returned ready, exited 0, and created Cursor's registration.
  • Creating both client detection directories before the combined invocation configured both clients.
  • Replacing --yes with --dry-run in a fresh combined case returned planned, exited 0, and omitted Cursor.

Expected behavior

Honor the explicitly selected client even without detection evidence, or clearly reject the combined scope before writing files. The dry-run plan should reflect the same decision. docs/installation.md:33-40,101-105 permits selecting undetected clients and documents explicit and every-detected selection. AGENTS.md:13 requires preserving caller-selected inputs. The observed setup help advertises both flags without an exclusion or precedence rule. These references do not prescribe a specific union algorithm.

Impact and scope

The caller receives a success result while its requested client remains unconfigured. Verified scope is Cursor with only Codex detectable; other client combinations were not reproduced. The verified workaround is to run setup for the explicit client without --all-detected. No target analysis, data loss, or security boundary crossing was established.

REA version

6.7.0, source commit 074768901f3cdc8205b61773fb1faf6f6c7b3ca8.

Runtime and platform

Node.js v26.12.0, Darwin arm64. No analysis engine was required.

Target and artifact context

No target binary or artifact. This concerns client registration selection in standalone setup.

Interface

CLI

Earliest failure stage

Setup or provider admission

Relevant output or evidence

The verifier recorded these reduced results from the built CLI:

Combined apply: exit 0, status ready
planned action IDs: configure_client:codex, install_skill
applied actions: configured_codex, installed_skill
clients and doctor.scope.clients: codex only
Cursor registration file: absent

Scoped doctor: exit 1
scope_checks: registration:cursor, ok false, classification config_drift
 detail: Requested client cursor was not detected.

Fresh combined dry run: exit 0, status planned
planned action IDs: configure_client:codex, install_skill

The setup report does list Cursor as missing in clientStates, but does not explain why it discarded the explicit selection. The explicit-only control created Cursor's registration successfully. This distinguishes the selection failure from an inability to configure Cursor.

Typed outcome or recovery expected

Configure the explicit client and verify that scope before returning ready, or return a clear combined-scope error before any write. A successful Codex-only result does not satisfy this request.

Analysis or suspected cause

Source-derived corroboration at the tested revision: src/cli/setupCommands.ts:256-278 drops explicit client IDs and their readiness scope when allDetected is true. src/application/Setup.ts:131-139 then selects detected client IDs. A fresh fetch found no changes to these files or the cited contract references between the tested revision and upstream main at 052956af3416fa01d93837e54fdec3ad2739f6d1. No new runtime run on that newer revision is claimed.

Additional context

A proposed restoration check is to repeat the combined apply and dry run with only Codex detectable, requiring Cursor configuration or a clear refusal before writes. Keep the explicit-only and both-detected controls passing. Actual Cursor application loading was not tested. NOT_ENOUGH_INFO for regression history: no last known good version was established.

Originally created by @coygeek on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5443 ### 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 `rea setup --client cursor --all-detected --yes --json` returns `ready` and exits 0 after configuring only Codex when Codex is detectable and Cursor is not. The explicitly requested Cursor registration does not exist afterward. A fresh dry run also omits Cursor from the plan. This report was prepared with AI assistance from an independently reproduced CLI verification. The submitter checked current upstream source and duplicate reports; the runtime results below come from that verifier's recorded runs. ### Reproduction Run from the source revision below with dependencies installed and the runtime built. Set `TMPDIR` to a disposable directory. The executed recipe used isolated home and XDG roots and no inherited provider settings: ```sh VERIFY_ROOT=$(mktemp -d "${TMPDIR:?Set TMPDIR to a disposable directory}/rea-selection.XXXXXX") rea_case() { case_root="$1" shift mkdir -p "$case_root/home" "$case_root/config" "$case_root/data" "$case_root/cache" "$case_root/state" "$case_root/temp" env -i PATH="$PATH" NO_COLOR=1 HOME="$case_root/home" \ XDG_CONFIG_HOME="$case_root/config" XDG_DATA_HOME="$case_root/data" \ XDG_CACHE_HOME="$case_root/cache" XDG_STATE_HOME="$case_root/state" \ TMPDIR="$case_root/temp" node scripts/rea.mjs "$@" } mkdir -p "$VERIFY_ROOT/mixed/home/.codex" rea_case "$VERIFY_ROOT/mixed" setup --client cursor --all-detected --yes --json printf 'setup exit=%s\n' "$?" test -f "$VERIFY_ROOT/mixed/home/.cursor/mcp.json" printf 'Cursor config test exit=%s\n' "$?" rea_case "$VERIFY_ROOT/mixed" doctor --client cursor --json printf 'doctor exit=%s\n' "$?" ``` Observed exits were 0, 1, and 1 respectively. The final recipe replay reproduced the same result as the independent initial run. Controls actually run in fresh isolated cases with the same Codex detection directory: - Omitting `--all-detected` returned `ready`, exited 0, and created Cursor's registration. - Creating both client detection directories before the combined invocation configured both clients. - Replacing `--yes` with `--dry-run` in a fresh combined case returned `planned`, exited 0, and omitted Cursor. ### Expected behavior Honor the explicitly selected client even without detection evidence, or clearly reject the combined scope before writing files. The dry-run plan should reflect the same decision. `docs/installation.md:33-40,101-105` permits selecting undetected clients and documents explicit and every-detected selection. `AGENTS.md:13` requires preserving caller-selected inputs. The observed setup help advertises both flags without an exclusion or precedence rule. These references do not prescribe a specific union algorithm. ### Impact and scope The caller receives a success result while its requested client remains unconfigured. Verified scope is Cursor with only Codex detectable; other client combinations were not reproduced. The verified workaround is to run setup for the explicit client without `--all-detected`. No target analysis, data loss, or security boundary crossing was established. ### REA version 6.7.0, source commit `074768901f3cdc8205b61773fb1faf6f6c7b3ca8`. ### Runtime and platform Node.js v26.12.0, Darwin arm64. No analysis engine was required. ### Target and artifact context No target binary or artifact. This concerns client registration selection in standalone setup. ### Interface CLI ### Earliest failure stage Setup or provider admission ### Relevant output or evidence The verifier recorded these reduced results from the built CLI: ```text Combined apply: exit 0, status ready planned action IDs: configure_client:codex, install_skill applied actions: configured_codex, installed_skill clients and doctor.scope.clients: codex only Cursor registration file: absent Scoped doctor: exit 1 scope_checks: registration:cursor, ok false, classification config_drift detail: Requested client cursor was not detected. Fresh combined dry run: exit 0, status planned planned action IDs: configure_client:codex, install_skill ``` The setup report does list Cursor as missing in `clientStates`, but does not explain why it discarded the explicit selection. The explicit-only control created Cursor's registration successfully. This distinguishes the selection failure from an inability to configure Cursor. ### Typed outcome or recovery expected Configure the explicit client and verify that scope before returning `ready`, or return a clear combined-scope error before any write. A successful Codex-only result does not satisfy this request. ### Analysis or suspected cause Source-derived corroboration at the tested revision: `src/cli/setupCommands.ts:256-278` drops explicit client IDs and their readiness scope when `allDetected` is true. `src/application/Setup.ts:131-139` then selects detected client IDs. A fresh fetch found no changes to these files or the cited contract references between the tested revision and upstream `main` at `052956af3416fa01d93837e54fdec3ad2739f6d1`. No new runtime run on that newer revision is claimed. ### Additional context A proposed restoration check is to repeat the combined apply and dry run with only Codex detectable, requiring Cursor configuration or a clear refusal before writes. Keep the explicit-only and both-detected controls passing. Actual Cursor application loading was not tested. NOT_ENOUGH_INFO for regression history: no last known good version was established.
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#3303
No description provided.