Skip to content

Distinguish local connection failures and independent CLI access - #15

Merged
dbachko merged 8 commits into
masterfrom
codex/connection-error-recovery
Nov 8, 2026
Merged

dbachko merged 8 commits into
masterfrom
codex/connection-error-recovery

Conversation

@dbachko

@dbachko dbachko commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

The CLI reported “ExtraBrain is not running” when an agent host blocked localhost. It now preserves connection causes as structured LOCAL_ACCESS_BLOCKED, CONNECTION_REFUSED, REQUEST_TIMEOUT, or CONNECTION_FAILED details, retaining numeric exit 3. Discovery is bounded to 10 seconds; requests are never automatically replayed.

The CLI uses HTTP API routes independently of MCP. Disabled discovery now returns CLI_ACCESS_DISABLED and directs users to CLI access in Settings > Agent Skills. Connection messages and documentation use plain language and no longer mention MCP. This accompanies desktop #1366, which separates the two settings and route lifecycles.

Validation: Node 24.20 typecheck and full suite (212 passed, 5 existing optional tests skipped); bundle and standalone executable build. The final packaged CLI returned CLI_ACCESS_DISABLED with exit 3 against a controlled local HTTP server. Earlier packaged checks covered denied localhost, a responding dev app, an unused port, and live session listing with host permission.

extrabrain pair now says no pairing is needed on current apps, which return 404 for it, and stays available for older versions. The README also fixes the documents text example, marks insights as older data, and no longer claims nothing leaves the computer.

Numeric exit 3 remains compatible. Release smoke tests now check data.error instead of the old message text, which would have failed the next release; CI runs the same check on every runner. No agent policy changes or automatic elevation. Publish with the coordinated desktop and skills changes; no release was made by this PR.

@dbachko dbachko changed the title Distinguish blocked localhost access from unavailable app Distinguish local connection failures and independent CLI access Nov 5, 2026
ExtraBrain Developer and others added 5 commits November 6, 2026 14:37
Move the error walk and classification out of the request catch block and
replace nested ternaries with early returns. The exit 3 error codes now have
one source of truth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Integration tests spawn real processes and hit the 5 second default on the
Intel macOS runner. One suite-wide limit replaces fixing them one at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Say what to do instead of naming internals like the HTTP API or MCP, and
keep error codes in the section for scripts. Release smoke tests now check
the stable error code, because they required a message the CLI no longer
prints, which would have failed the next release. CI runs the same check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current apps return 404 for pairing, so `pair` now says none is needed. Fix
the `documents text` example, which omitted a required flag, mark insights as
older data, and stop claiming nothing leaves the computer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dbachko
dbachko merged commit 50089e8 into master Nov 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant