Skip to content

feat: add IBM Bob agent support (Bob Shell 2.x) - #14895

Closed
trs-80 wants to merge 16 commits into
stablyai:mainfrom
trs-80:feat/ibm-bob-agent-support-rebase
Closed

trs-80 wants to merge 16 commits into
stablyai:mainfrom
trs-80:feat/ibm-bob-agent-support-rebase

Conversation

@trs-80

@trs-80 trs-80 commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Adds IBM Bob (Bob Shell) as a selectable Orca agent, targeting the current Bob Shell 2.x CLI.

What Changed

Rebase of #7698 (by @kiyeonjeon21) onto current main, plus a retarget from the Bob Shell 1.0.6 CLI it was written against to Bob Shell 2.0.1:

  • Launch is bob chat --trust with the prompt injected after startup (stdin-after-start). 2.x removed --prompt-interactive; --trust skips the first-launch trust menu that would otherwise swallow the injected paste.
  • YOLO uses --auto-approve (a chat option). 2.x deprecates --yolo and drops into headless mode with it.
  • The headless classifier follows the 2.x subcommands: chat is interactive; run, mcp, -p, --list-tasks, -v are one-shot; -r [task-id] takes an optional value.
  • Detection requires Bob Shell's own help signature in addition to excluding the Neovim version manager that also installs as bob, so a stray bob script is not mistaken for IBM Bob. Probe failures still fail open.
  • Type extraction into tui-agent-config-types.ts (the config module sits at the 300-line cap; any new agent would have tripped it).
  • Gated e2e validation spec (ORCA_E2E_REAL_BOB=1) against the real binary: New-tab launch identity, auto-approve, Create Workspace defaulting to Bob, Settings pane, tab close stops the process.

Bob stays opt-in (DEFAULT_DISABLED_TUI_AGENTS) with a persistence migration for existing profiles.

Supersedes #7698.

Why

Bob Shell 2.x changed its CLI surface; against it the original integration failed at launch (unknown option '--prompt-interactive') and never opened the TUI in YOLO mode. The flags were verified against the installed bobshell@2.0.1 binary (the published docs still describe 1.x).

Bob emits no hook events and no OSC title status, so sidebar rows / status dots for Bob panes come in a follow-up (output-status profiles) stacked on this PR; worker dispatch uses the existing prompt-injection path and works today.

Linked Issue

Fixes #7691

Visual Proof

N/A — no new UI surface; IBM Bob renders through the existing agent catalog/picker paths and ships disabled by default, so the first-run appearance is unchanged. The gated e2e spec attaches screenshots of the New-tab menu, the launched pane, and the Create Workspace dialog.

Testing

macOS (Darwin 25.5.0), Node 26.5.1, bobshell 2.0.1:

  • pnpm vitest run on src/shared, src/main/ipc, agent components — passes (the Bob suites: startup, permissions, process recognition, detection).

  • Bob in a PTY (fresh untrusted folder, bracketed paste): no trust menu, Agent Mode (auto-approve), paste lands unsent in the composer.

  • Live app: Create Workspace with Bob as default → Bob is the worktree's first terminal; orchestration worker-start with a Bob worker → input_accepted, succeeded, worker_done received.

  • ORCA_E2E_REAL_BOB=1 npx playwright test tests/e2e/bob-agent-first-class.spec.ts --project electron-headless → 5/5.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Claude (Fable 5) via Claude Code assisted with analysis, implementation and testing; all changes were reviewed and run locally by the author.

Review

Agent skill upstream boundary

N/A

@trs-80
trs-80 requested a review from brennanb2025 as a code owner August 16, 2026 14:05
@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added IBM Bob as a supported TUI agent. The change covers command and process recognition, launch configuration, permissions, telemetry, preflight identity filtering, default-disabled persistence migration, renderer and mobile presentation, localization, documentation, and automated tests. Bob uses bob chat --trust for startup and --auto-approve for YOLO mode.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 35 files. (2 skipped: 2 unsupported.) Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description covers the required change, rationale, linked issue, visual proof, testing, AI disclosure, and agent-skill boundary; only optional checklist and notes are missing.
Title check ✅ Passed The title clearly and concisely identifies the primary change: adding IBM Bob agent support for Bob Shell 2.x.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c0abe47-e804-47eb-be40-e0ebbb9f62eb

📥 Commits

Reviewing files that changed from the base of the PR and between e4e54a1 and 428716bd9c8b337ad1019cc1c07669db2823851f.

⛔ Files ignored due to path filters (1)
  • src/shared/agent-icons/bob.png is excluded by !**/*.png
📒 Files selected for processing (32)
  • README.md
  • mobile/src/components/mobile-agent-icon-assets.ts
  • mobile/src/tasks/mobile-tui-agents.ts
  • src/main/ipc/preflight-agent-detection.test.ts
  • src/main/persistence-settings-update.test.ts
  • src/main/persistence/loading-store/store.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-catalog.tsx
  • src/renderer/src/lib/agent-favicon-assets.ts
  • src/renderer/src/lib/agent-status.ts
  • src/shared/agent-headless-command.ts
  • src/shared/agent-kind.ts
  • src/shared/agent-process-recognition.test.ts
  • src/shared/agent-process-recognition.ts
  • src/shared/agent-status-types.ts
  • src/shared/agent-type-label.ts
  • src/shared/bob-headless-command.ts
  • src/shared/constants.ts
  • src/shared/global-settings-types.ts
  • src/shared/skills-cli-agent-keys.ts
  • src/shared/telemetry-events.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-display-names.ts
  • src/shared/tui-agent-permissions.test.ts
  • src/shared/tui-agent-permissions.ts
  • src/shared/tui-agent-selection.ts
  • src/shared/tui-agent-startup.test.ts
  • src/shared/tui-agent.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.

Comment thread src/shared/tui-agent-config.ts Resolved
@trs-80

trs-80 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

CodeRabbit feedback addressed

Both unresolved threads are fixed in 66847c9596.

1. Flush the first Store before replacing its state file (persistence-settings-update.test.ts) — confirmed real. The opt-in migration sets loadNeedsSave, which reaches scheduleSave() and debounces a write 1s out (SAVE_DEBOUNCE_MS, store.ts:1696). That write could land after the second fixture and clobber it, and the orphaned timer could bleed into later tests in the file. Added migrated.flush(), matching the pattern already used ~10x in this file.

2. Disambiguate the bob executable (tui-agent-config.ts) — valid, and now guarded. Added an optional detectIdentityExclusion probe on TuiAgentConfig, applied in detectInstalledAgents for both the local and WSL paths. Only agents that declare one are probed, so detection cost is unchanged for the other agents.

The probe is deliberately negative and fail-open: it drops bob when the help text names Neovim, and keeps the agent on an errored, timed-out, or unrecognized probe. A positive IBM Bob check was considered and rejected — no stable IBM Bob identity string could be verified, and guessing one risks hiding real installs, which is worse than the collision this guards against. Worth a second opinion from anyone who has IBM Bob installed and can confirm its --help output.

New tests in preflight-agent-detection.test.ts:

  • Neovim bob on PATH is excluded
  • probe failure keeps IBM Bob (fail-open)
  • IBM Bob's own help text keeps it

Files modified:

  • src/main/ipc/preflight.ts
  • src/main/ipc/preflight-agent-identity-exclusion.ts (new)
  • src/main/ipc/preflight-agent-detection.test.ts
  • src/main/persistence-settings-update.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-config-types.ts

Verification: pnpm typecheck exit 0, pnpm lint exit 0, pnpm test exit 0 — 53,521 passed (+3).

@nwparker nwparker removed the P2 label Aug 19, 2026
@trs-80
trs-80 force-pushed the feat/ibm-bob-agent-support-rebase branch from 66847c9 to 1a47eb2 Compare August 22, 2026 01:59
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@trs-80
trs-80 force-pushed the feat/ibm-bob-agent-support-rebase branch from 1a47eb2 to a0c02e6 Compare August 22, 2026 11:28
@trs-80 trs-80 changed the title feat: add IBM Bob agent support (rebased onto main) feat: add IBM Bob agent support (Bob Shell 2.x) Aug 22, 2026
@trs-80

trs-80 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Split out per review scope: orchestration default-agent selection is #15935 (independent, on main); the output-status profiles that give Bob sidebar rows / status dots / strict prompt verification are #15936, stacked on this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 535aa8ea-0f08-4581-8129-23701762b413

📥 Commits

Reviewing files that changed from the base of the PR and between 1a47eb27fcea5de8b9290dbb2509dbc37e2110e6 and a0c02e618ba2712ec30867fbcf06a4d1f9856bf0.

📒 Files selected for processing (13)
  • README.md
  • src/main/ipc/preflight-agent-detection.test.ts
  • src/main/ipc/preflight-agent-identity-exclusion.ts
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/lib/agent-catalog.tsx
  • src/shared/agent-process-recognition.test.ts
  • src/shared/bob-headless-command.ts
  • src/shared/tui-agent-config-types.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-permissions.test.ts
  • src/shared/tui-agent-permissions.ts
  • src/shared/tui-agent-startup-bob.test.ts
  • tests/e2e/bob-agent-first-class.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/renderer/src/i18n/locales/ko.json
  • README.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/shared/bob-headless-command.ts Resolved
Comment thread tests/e2e/bob-agent-first-class.spec.ts Resolved
Comment thread tests/e2e/bob-agent-first-class.spec.ts Resolved
Comment thread tests/e2e/bob-agent-first-class.spec.ts Resolved
@trs-80

trs-80 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

CodeRabbit feedback addressed (5cc49119f5)

  1. bob.js entrypoint recognition — isBobExecutableToken now only accepts a .js/.mjs/.cjs script under node_modules/bobshell/; bare bob and the .exe/.cmd/.bat/.ps1 shims are unchanged. Note the practical exposure was already nil: recognizeNodeScriptEntrypoint requires the same package marker before a node …/bob.js process is identified as Bob at all, so the headless matcher never ran for an unrelated bob.js. Added bob-headless-command.test.ts covering the package path and an unrelated /repo/bob.js.
  2. Launched agent identity — the e2e now asserts expect(tabAgent).toBe('bob') from the active tab's launchAgent.
  3. Windows process check — the close test is skipped on win32 with a note; the process count is pgrep-based and a Windows process-table query belongs with src/main/windows/windows-process-table.ts rather than a test helper.
  4. Default marker scoping — the assertion now requires the button titled "Default agent" to sit in the same agent row as the "IBM Bob" label.

Re-ran ORCA_E2E_REAL_BOB=1 … bob-agent-first-class.spec.ts → 5/5.

@trs-80

trs-80 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Two more items raised on the stacked #15936 review belong to this PR's files and are fixed in a37cb50f44:

  • Mobile opt-out default — normalizeDisabledMobileTuiAgents now treats an absent disabledTuiAgents as DEFAULT_DISABLED_TUI_AGENTS (an explicit [] still means "enable all"), with tests in workspace-agent-selection.test.ts.
  • skills-cli-agent-keys.ts comment — reworded: the skills CLI has no IBM Bob key; its bob key belongs to a different project.

@trs-80

trs-80 commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Follow-up from an internal audit (e813bad9d1): the gated e2e spec no longer copies the whole ~/.bob into the disposable profile — it seeds only settings/settings.json and settings/auth-secrets.json with owner-only permissions (or a prepared ORCA_E2E_BOB_HOME), and the hard waitForTimeout and debug console.log dumps are gone. Suite still 5/5 against bobshell 2.0.1.

@kiyeonjeon21 kiyeonjeon21 mentioned this pull request Aug 23, 2026
6 tasks done
@kiyeonjeon21

Copy link
Copy Markdown

I closed #7698 in favor of this. The 1.0.6 launch path it was built on is a hard error on the current CLI, so rebasing my branch would not have been worth anyone's review time.

You asked for a second opinion from someone with Bob installed. I have bobshell 2.0.1 (commit: e6a3e508) and ran it in a real PTY (120x45) with an isolated BOB_DIR per run, so each run below starts from a profile that has never trusted a folder or accepted the license.

The trust menu is real, and --trust skips it. Without the flag, in a folder that is not in trustedFolders.json:

Do you trust this folder?
Trusting a folder allows Bob Shell to execute commands it suggests. This is a security
feature to prevent accidental execution in untrusted directories.
→ 1. Trust folder (pty-untrusted-a)
  2. Trust parent folder (scratchpad)
  3. Don't trust

With bob chat --trust the menu never renders and the run goes straight to the composer.

The injected paste lands unsent. Sending a bracketed paste once the composer is up:

 ❯ list the files in this folder
 Agent Mode

--auto-approve puts Agent Mode (auto-approve) in the status bar.

Startup is fast enough that injection timing is not a concern. Two fresh-profile runs, measured from spawn:

first-byte 0.82s   banner 0.97s   composer 2.43s   auth 2.72s
first-byte 0.83s   banner 0.98s   composer 1.57s   auth 2.16s

The identity probe passes on 2.0.1. Both anchors in your requirePattern are in bob --help: the first line is Bob in your terminal, and --accept-license is described as Accept the IBM license agreement and continue.

Worth flagging what that rests on, though. Both anchors are prose, one a tagline and one a flag description, and the probe is fail-open. A reword in a minor Bob release turns it into a silent false positive on the Neovim bob, with no failing test anywhere to show it. Given there is nothing more contractual to match on today, the cheap mitigation is to make the breakage loud rather than silent: record the 2.0.1 --help header as a fixture in preflight-agent-detection.test.ts and assert requirePattern against that exact text, so the day someone refreshes the fixture from a newer Bob the pattern either still matches or fails visibly in review.

I could only verify the require side. I do not have MordechaiHadad/bob installed, so excludePattern is still untested against the real Neovim binary.

Two things I checked and ruled out, in case a reviewer chases either:

  • 2.x added --show-license / --accept-license and launchCmd passes neither. A profile that has never accepted the license still reaches the composer with no prompt, so it is not a gate on the API-key path.
  • bin moved from bundle/bob.js in 1.0.6 to dist/bob.js in 2.0.1, but isBobExecutableToken keys off the node_modules/bobshell/ prefix, so the move does not touch it.

AI disclosure: Claude Code assisted with the analysis and with drafting this comment. Every line of output quoted above is from a live bobshell 2.0.1 session I ran on my own machine.

@trs-80

trs-80 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Appreciated — the live-PTY pass answers exactly what this PR couldn't verify from CI, and the license-flag and dist/bob.js rule-outs are noted for reviewers.

Your fixture suggestion is in (f459c3bc28): preflight-agent-detection.test.ts now carries the verbatim 2.0.1 --help stdout — captured from the same build you ran (2.0.1, commit e6a3e508) and checked byte-identical against the live binary — and asserts detectInstalledAgents still reports bob from it. That pins both prose anchors end to end: a fixture refresh from a newer Bob either keeps satisfying requirePattern (without tripping excludePattern) or fails visibly in review instead of silently false-positiving on the Neovim bob.

excludePattern against the real MordechaiHadad/bob remains covered only by the paraphrased help text in the existing exclusion test — flagging that as the one still-unverified edge.

🤖 Generated with Claude Code

@trs-80
trs-80 force-pushed the feat/ibm-bob-agent-support-rebase branch from f459c3b to e6dd4bc Compare August 27, 2026 11:51
@trs-80
trs-80 force-pushed the feat/ibm-bob-agent-support-rebase branch from e6dd4bc to f830002 Compare August 30, 2026 13:33
trs-80 added a commit to trs-80/orca that referenced this pull request Oct 8, 2026
Two unresolved review threads on stablyai#14895.

Flush the migrated Store before rewriting its state file. The opt-in
migration calls scheduleSave(), which debounces a write 1s out; that
write could land after the second fixture and clobber it, and the
orphaned timer could bleed into later tests in the file.

Disambiguate the `bob` executable. MordechaiHadad/bob is a Neovim
version manager that also installs as `bob`, and detection treated any
PATH hit as IBM Bob once a user opted in. Add an optional
detectIdentityExclusion probe, applied only to agents that declare one,
and use it to drop `bob` when the help text names Neovim.

The probe is deliberately negative and fail-open: an errored, timed-out
or unrecognized probe keeps the agent. Requiring a positive IBM Bob
signature would risk hiding real installs, since no stable identity
string for IBM Bob could be verified.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
trs-80 added a commit to trs-80/orca that referenced this pull request Oct 8, 2026
…xture

Both identity-probe anchors are prose and the probe fails open, so a
reworded --help on a future Bob would silently false-positive on the
Neovim bob. Recording the real 2.0.1 output (commit e6a3e508) makes a
fixture refresh either keep matching requirePattern or fail in review,
per review feedback on stablyai#14895.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
trs-80 added a commit to trs-80/orca that referenced this pull request Oct 21, 2026
Two unresolved review threads on stablyai#14895.

Flush the migrated Store before rewriting its state file. The opt-in
migration calls scheduleSave(), which debounces a write 1s out; that
write could land after the second fixture and clobber it, and the
orphaned timer could bleed into later tests in the file.

Disambiguate the `bob` executable. MordechaiHadad/bob is a Neovim
version manager that also installs as `bob`, and detection treated any
PATH hit as IBM Bob once a user opted in. Add an optional
detectIdentityExclusion probe, applied only to agents that declare one,
and use it to drop `bob` when the help text names Neovim.

The probe is deliberately negative and fail-open: an errored, timed-out
or unrecognized probe keeps the agent. Requiring a positive IBM Bob
signature would risk hiding real installs, since no stable identity
string for IBM Bob could be verified.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
trs-80 added a commit to trs-80/orca that referenced this pull request Oct 21, 2026
…xture

Both identity-probe anchors are prose and the probe fails open, so a
reworded --help on a future Bob would silently false-positive on the
Neovim bob. Recording the real 2.0.1 output (commit e6a3e508) makes a
fixture refresh either keep matching requirePattern or fail in review,
per review feedback on stablyai#14895.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

[Feature]: Add first-class support for IBM Bob / Bob Shell

4 participants