[GH-ISSUE #7522] [Bug] Automatic setup selects Grok Bot even though its connector requires manual registration #4469

Closed
opened 2026-10-31 00:50:05 +00:00 by bsakaguchi · 0 comments
Owner

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

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

With an isolated home containing only Grok Bot's detection directory, node scripts/rea.mjs setup --all-detected --yes --json installs the shared skill but returns needs_human and exits 1. The caller did not request Grok Bot explicitly. Setup selects it anyway, reports its registration as manual, and gives hosted-connector instructions that local setup cannot perform. Running the same command again still exits 1, with no further actions.

Removing the empty detection directory makes the same command return ready and exit 0. A fresh marker-only home with --skill=false still fails, so skill installation is not necessary for the failure.

Reproduction

  1. Use the built baseline below and Node.js 24.22.1. Set TMPDIR to a disposable verification directory. Run this Python fixture from the repository root; all REA home and XDG paths stay inside its generated directories:
import json
import os
from pathlib import Path
import subprocess
import tempfile

root = Path(tempfile.mkdtemp(prefix="rea-selection-"))

def setup(label, marker, extra):
    home = root / label
    home.mkdir()
    if marker:
        (home / ".grokbot").mkdir()
    env = {
        "PATH": os.environ["PATH"], "NO_COLOR": "1",
        "HOME": str(home), "DSH_HOME": str(home / ".dsh"),
        "XDG_CONFIG_HOME": str(home / "config"),
        "XDG_DATA_HOME": str(home / "data"),
        "XDG_CACHE_HOME": str(home / "cache"),
        "XDG_STATE_HOME": str(home / "state"),
        "TMPDIR": str(root),
    }
    result = subprocess.run(
        ["node", "scripts/rea.mjs", "setup", *extra, "--yes", "--json"],
        env=env, capture_output=True, text=True, check=False,
    )
    report = json.loads(result.stdout)
    print(label, result.returncode, report["status"],
          report["doctor"]["healthy"], report["doctor"]["scope"]["clients"],
          report["appliedActions"])

setup("marker", True, ["--all-detected"])
setup("empty", False, ["--all-detected"])
setup("no-skill", True, ["--all-detected", "--skill=false"])
setup("skill-only", True, ["--skill"])
  1. Compare the marker case with the empty-home control. The marker case exits 1 and includes grok_bot; the control exits 0 with no client scope. The skill-disabled case also exits 1. The explicit skill-only case succeeds while retaining the marker.

The marker failure reproduced in a fresh home and on its immediate rerun; a second fresh marker home reproduced it with the skill disabled. Removing the marker from the first home restored success.

Expected behavior

The installation guide and executed setup help describe the broad flag as configuring detected supported agents. The supported-agent documentation separately identifies Grok Bot as a manual hosted connector and explains that its local data directory is not a connector registration.

Automatic selection should therefore omit this manual client from the configuration and readiness scope. For this fixture, setup should install the requested shared skill and complete successfully. Explicitly selecting Grok Bot should retain its documented manual instructions.

Impact and scope

The verified impact is a repeatable nonzero result for broad unattended setup on macOS when the only client marker is Grok Bot's directory. The shared skill is installed before the failure; a repeat remains unsuccessful. No data loss or analysis-target interaction was observed.

Impact is P2: this is a bounded automation failure with an available explicit-scope workaround. For the reproduced fixture, setup --skill --yes --json successfully installs the same shared skill without selecting the manual connector. Mixed automatic-client installations and other operating systems were not tested.

REA version

Exact node scripts/rea.mjs --version output:

6.8.0

Source baseline: 65f1c447344a423fa2785847dbcea1e9a9e2454a.

Runtime and platform

Node.js v24.22.1; macOS 27.0.1; Darwin arm64. No analysis provider or hosted account was used.

Target and artifact context

No target artifact. The reduced fixture is an empty home containing an empty .grokbot directory.

Interface

CLI

Earliest failure stage

Setup or provider admission

Relevant output or evidence

Reduced fields from the executed broad setup command with the marker present:

{
  "status": "needs_human",
  "appliedActions": ["installed_skill"],
  "clients": {},
  "doctor": {
    "healthy": false,
    "scope": {"clients": ["grok_bot"], "skill": true},
    "identity": {
      "registrations": [{"client": "grok_bot", "state": "manual"}]
    }
  }
}

Exit status was 1. The second run had the same failure status and empty planned/applied action lists. The empty-home control returned ready, healthy true, an empty client scope, and exit 0.

Contract references at the baseline: docs/installation.md:120-125,612-643; docs/client-configuration.md:715-730; CLI help wording also appears in src/cli/setupCommands.ts:82-85. Interactive selection excludes unsupported formats at src/cli/interactiveSetup.ts:128-130.

Typed outcome or recovery expected

Return ready and exit 0 for the marker-only broad setup after completing its selected skill action. Keep grok_bot out of automatic client readiness checks, while preserving manual remediation for an explicit Grok Bot request.

Analysis or suspected cause

Source-derived explanation: src/application/SupportedClients.ts:755-761 identifies Grok Bot's format as unsupported. src/application/SetupPlan.ts:81-136 retains its detected ID, and src/application/Setup.ts:153-161 includes that ID in the broad selection. The planner accepts the known client at src/application/SetupPlan.ts:163-176 but excludes unsupported formats only when generating writes at line 345. The selected manual client still enters readiness and remediation at src/application/Setup.ts:259-264; final remediation yields needs_human at lines 425-442.

Additional context

Related reports examined: #5443 and its merged fix #5508 concern explicit clients being omitted when combined with broad selection. #3944 concerns Windows Hopper recovery advice. #6914 concerns audit-wide doctor health presentation. These do not report automatic inclusion of the manual Grok Bot connector. Merged PR #1134 documents the intentional manual behavior for explicitly selected Grok Bot; this report concerns automatic selection only. No last-known-good revision or live hosted-connector behavior was established.

Originally created by @coygeek on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/7522 ### 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 With an isolated home containing only Grok Bot's detection directory, `node scripts/rea.mjs setup --all-detected --yes --json` installs the shared skill but returns `needs_human` and exits 1. The caller did not request Grok Bot explicitly. Setup selects it anyway, reports its registration as `manual`, and gives hosted-connector instructions that local setup cannot perform. Running the same command again still exits 1, with no further actions. Removing the empty detection directory makes the same command return `ready` and exit 0. A fresh marker-only home with `--skill=false` still fails, so skill installation is not necessary for the failure. ### Reproduction 1. Use the built baseline below and Node.js 24.22.1. Set `TMPDIR` to a disposable verification directory. Run this Python fixture from the repository root; all REA home and XDG paths stay inside its generated directories: ```python import json import os from pathlib import Path import subprocess import tempfile root = Path(tempfile.mkdtemp(prefix="rea-selection-")) def setup(label, marker, extra): home = root / label home.mkdir() if marker: (home / ".grokbot").mkdir() env = { "PATH": os.environ["PATH"], "NO_COLOR": "1", "HOME": str(home), "DSH_HOME": str(home / ".dsh"), "XDG_CONFIG_HOME": str(home / "config"), "XDG_DATA_HOME": str(home / "data"), "XDG_CACHE_HOME": str(home / "cache"), "XDG_STATE_HOME": str(home / "state"), "TMPDIR": str(root), } result = subprocess.run( ["node", "scripts/rea.mjs", "setup", *extra, "--yes", "--json"], env=env, capture_output=True, text=True, check=False, ) report = json.loads(result.stdout) print(label, result.returncode, report["status"], report["doctor"]["healthy"], report["doctor"]["scope"]["clients"], report["appliedActions"]) setup("marker", True, ["--all-detected"]) setup("empty", False, ["--all-detected"]) setup("no-skill", True, ["--all-detected", "--skill=false"]) setup("skill-only", True, ["--skill"]) ``` 2. Compare the marker case with the empty-home control. The marker case exits 1 and includes `grok_bot`; the control exits 0 with no client scope. The skill-disabled case also exits 1. The explicit skill-only case succeeds while retaining the marker. The marker failure reproduced in a fresh home and on its immediate rerun; a second fresh marker home reproduced it with the skill disabled. Removing the marker from the first home restored success. ### Expected behavior The installation guide and executed setup help describe the broad flag as configuring detected supported agents. The supported-agent documentation separately identifies Grok Bot as a manual hosted connector and explains that its local data directory is not a connector registration. Automatic selection should therefore omit this manual client from the configuration and readiness scope. For this fixture, setup should install the requested shared skill and complete successfully. Explicitly selecting Grok Bot should retain its documented manual instructions. ### Impact and scope The verified impact is a repeatable nonzero result for broad unattended setup on macOS when the only client marker is Grok Bot's directory. The shared skill is installed before the failure; a repeat remains unsuccessful. No data loss or analysis-target interaction was observed. Impact is P2: this is a bounded automation failure with an available explicit-scope workaround. For the reproduced fixture, `setup --skill --yes --json` successfully installs the same shared skill without selecting the manual connector. Mixed automatic-client installations and other operating systems were not tested. ### REA version Exact `node scripts/rea.mjs --version` output: ```text 6.8.0 ``` Source baseline: `65f1c447344a423fa2785847dbcea1e9a9e2454a`. ### Runtime and platform Node.js v24.22.1; macOS 27.0.1; Darwin arm64. No analysis provider or hosted account was used. ### Target and artifact context No target artifact. The reduced fixture is an empty home containing an empty `.grokbot` directory. ### Interface CLI ### Earliest failure stage Setup or provider admission ### Relevant output or evidence Reduced fields from the executed broad setup command with the marker present: ```json { "status": "needs_human", "appliedActions": ["installed_skill"], "clients": {}, "doctor": { "healthy": false, "scope": {"clients": ["grok_bot"], "skill": true}, "identity": { "registrations": [{"client": "grok_bot", "state": "manual"}] } } } ``` Exit status was 1. The second run had the same failure status and empty planned/applied action lists. The empty-home control returned `ready`, healthy true, an empty client scope, and exit 0. Contract references at the baseline: `docs/installation.md:120-125,612-643`; `docs/client-configuration.md:715-730`; CLI help wording also appears in `src/cli/setupCommands.ts:82-85`. Interactive selection excludes unsupported formats at `src/cli/interactiveSetup.ts:128-130`. ### Typed outcome or recovery expected Return `ready` and exit 0 for the marker-only broad setup after completing its selected skill action. Keep `grok_bot` out of automatic client readiness checks, while preserving manual remediation for an explicit Grok Bot request. ### Analysis or suspected cause Source-derived explanation: `src/application/SupportedClients.ts:755-761` identifies Grok Bot's format as unsupported. `src/application/SetupPlan.ts:81-136` retains its detected ID, and `src/application/Setup.ts:153-161` includes that ID in the broad selection. The planner accepts the known client at `src/application/SetupPlan.ts:163-176` but excludes unsupported formats only when generating writes at line 345. The selected manual client still enters readiness and remediation at `src/application/Setup.ts:259-264`; final remediation yields `needs_human` at lines 425-442. ### Additional context Related reports examined: #5443 and its merged fix #5508 concern explicit clients being omitted when combined with broad selection. #3944 concerns Windows Hopper recovery advice. #6914 concerns audit-wide doctor health presentation. These do not report automatic inclusion of the manual Grok Bot connector. Merged PR #1134 documents the intentional manual behavior for explicitly selected Grok Bot; this report concerns automatic selection only. No last-known-good revision or live hosted-connector behavior 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#4469
No description provided.