Skip to content

Add IBM Bob agent support - #7698

Closed
kiyeonjeon21 wants to merge 3 commits into
stablyai:mainfrom
kiyeonjeon21:feat/ibm-bob-agent-support
Closed

kiyeonjeon21 wants to merge 3 commits into
stablyai:mainfrom
kiyeonjeon21:feat/ibm-bob-agent-support

Conversation

@kiyeonjeon21

@kiyeonjeon21 kiyeonjeon21 commented Jul 7, 2026 •

Copy link
Copy Markdown

Summary

Adds IBM Bob (Bob Shell) as a first-class TUI agent: catalog entry, PATH detection, launch through --prompt-interactive, foreground process recognition, and a one-shot command filter so headless runs are not mistaken for a live session. Closes #7691.

Bob ships opt-in rather than on by default. bob is also the binary name of the Neovim version manager, and Orca detection is a bare PATH lookup, so anyone holding that tool would otherwise see IBM Bob listed as installed and get a dead pane on launch. It is seeded into DEFAULT_DISABLED_TUI_AGENTS with a one-shot bobDefaultDisabledMigrated guard so existing profiles start hidden too, and is turned on from Agent settings. For the same reason it sits in the tail of the auto-pick order rather than the head. IBM ships no alias binary to detect on instead: the package bin map is { "bob": "bundle/bob.js" }, and the package is not on the public registry.

The flag contract is verified against Bob Shell 1.0.6 itself rather than the docs alone. bob --help plus the yargs option table in the shipped bundle show --auth-method, --extensions/-e, --fake-responses and --record-responses taking values while hidden from help output, and t.strict() is on, so an unrecognized flag fails the run outright.

  • types.ts / tui-agent-config.ts: register bob with promptInjectionMode: 'flag-prompt-interactive'. --prompt and positional prompts are one-shot; --prompt-interactive runs the initial prompt and keeps the shell alive.
  • bob-headless-command.ts: one value-aware token pass that stops at --, skips option values, and reuses optionName from print-mode-headless-command.ts instead of forking it.
  • agent-process-recognition.ts: Bob is a node script, so node .../node_modules/bobshell/bundle/bob.js resolves through NODE_PACKAGE_SCRIPT_ENTRYPOINTS, same as codex and gemini.
  • tui-agent-permissions.ts: the yolo profile uses Bob's own -y, --yolo.
  • Standard registrations: agent-kind, telemetry-events, agent-status-types, agent-type-label, tui-agent-display-names, skills-cli-agent-keys (null, the skills CLI has no Bob key), desktop and mobile catalogs, a bundled 64px icon for the mobile offline-icon invariant, and the IBM Bob label in all five locale catalogs.

Deliberately out of scope for this PR: session resume, agent status hooks, AI vault, source-control AI, and trust presets. That matches how Ante and Trae landed.

Screenshots

No visual change beyond Bob appearing in the existing agent lists once it is enabled in Agent settings.

Testing

  • pnpm lint
  • pnpm typecheck (plus typecheck in mobile/)
  • pnpm test (3983 files, 42064 passed, 73 skipped)
  • pnpm build
  • Added or updated high-quality tests that would catch regressions
  • vitest run in mobile/ (57 files, 384 passed)

Tests added or updated: Bob process recognition including the hidden value-taking options, the -- terminator, management subcommands, the node-bundle entrypoint form and the --yolo --prompt-interactive launch line; the yolo permission profile; the opt-in default and its one-shot migration in persistence.test.ts, covering both the first migrated load and a later explicit opt-in.

Manual smoke tests against a real Bob Shell 1.0.6 install:

  • bob --prompt-interactive "Do not edit files. Reply READY only, then wait for my next message." ran the initial prompt, replied READY, and stayed in the interactive follow-up UI.
  • bob --prompt "Reply READY only" printed Bob's deprecation warning for --prompt and completed as a one-shot command.
  • bob "Reply READY only" completed as a one-shot command.

Not yet verified: a fresh install and an expired session inside an Orca PTY, including the bob.ibm.com/login browser handoff. I will post that separately.

AI Review Report

  • Cross-platform: recognition normalizes bob, bob.cmd and the node .../bob.js bundle form with no hardcoded path separators; detection and launch go through the shared TUI agent config on macOS, Linux and Windows.
  • SSH and remote: Bob uses the shared preflight detection path, so remote hosts receive the same command shape as every other agent. No local-only assumptions were added.
  • Agent contract: every flag the classifier treats as value-taking was checked against the 1.0.6 option table rather than the published docs, after the docs turned out to omit four of them.
  • Settings: the opt-in default needed the one-shot migration flag, otherwise it would only apply to fresh profiles while existing profiles kept Bob visible, and re-applying it on every load would prevent the toggle from sticking.
  • Performance: the classifier is a bounded token scan on paths that already tokenize the command line. Detection adds one PATH probe and no subprocess, keeping the zero-subprocess detection invariant intact.
  • UI: no new primitives. Desktop and mobile catalogs reuse the existing label and icon paths.

Security Audit

  • Command execution: no new spawn path. Launch goes through the shared agent startup builder, which shell-quotes the prompt the same way it does for every other agent.
  • Permissions: --yolo is only appended when the user selects the yolo profile, and Bob is disabled by default, so nothing auto-approves tools without two explicit user actions.
  • Secrets: Orca stores no Bob credentials. Authentication stays inside Bob, which uses its own browser SSO or BOBSHELL_API_KEY; neither is read or persisted here.
  • Input handling: the one-shot classifier is pure string inspection with no filesystem or network access, and the detection probe is a PATH existence check.
  • Dependencies: none added.

Notes

  • Rebased onto main; the branch was well behind.
  • The opt-in default touches global settings and adds a persistence migration, which is wider than plain agent registration. Happy to drop back to the auto-pick reorder alone if maintainers would rather keep this PR to registration.
  • --approval-mode also exists with choices default, auto_edit and yolo, but the bare --yolo flag matches the convention used by the other agents here.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request adds support for the IBM Bob TUI agent. It updates shared agent types, telemetry values, command detection, launch configuration, selection order, permissions, mobile configuration, renderer metadata, localized labels, and the README. It also adds tests for Bob detection, headless commands, startup planning, permissions, and local executable discovery.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #7691 by adding Bob registration, detection, launch behavior, catalogs, recognition, and tests.
Out of Scope Changes check ✅ Passed The changes support first-class Bob integration and do not introduce unrelated functionality beyond the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely describes the main change: adding IBM Bob agent support.
Description check ✅ Passed The description covers all required sections, testing, cross-platform review, security audit, and implementation notes in sufficient detail.

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: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 151e9b20-474f-4855-98ef-76604be6c510

📥 Commits

Reviewing files that changed from the base of the PR and between af59239 and 66e631bdd92444651e0bf90d299ba93519f6aaea.

📒 Files selected for processing (22)
  • README.md
  • mobile/src/tasks/mobile-tui-agents.ts
  • src/main/ipc/preflight.test.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-status.ts
  • src/shared/agent-headless-command.ts
  • src/shared/agent-kind.ts
  • src/shared/agent-process-recognition.test.ts
  • src/shared/agent-status-types.ts
  • src/shared/bob-headless-command.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-selection.ts
  • src/shared/tui-agent-startup.test.ts
  • src/shared/types.ts

Comment on lines +61 to +91
export function isBobHeadlessOneShotCommand(tokens: readonly string[]): boolean {
const bobIndex = findBobExecutableIndex(tokens)

for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (isBobHeadlessPromptFlag(token)) {
return true
}
if (isBobInteractivePromptFlag(token)) {
return false
}
}

for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (token === '--') {
return index + 1 < tokens.length
}
if (token.startsWith('-')) {
if (optionConsumesNextValue(token)) {
index += 1
}
continue
}
// Why: Bob positional prompts default to one-shot mode unless the command
// uses -i/--prompt-interactive, which the earlier pass already handled.
return true
}

return false
}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

First flag-detection pass ignores -- and option-value consumption, unlike the second pass.

The first loop (lines 64-72) scans every remaining token for -p/--prompt/-i/--prompt-interactive matches regardless of whether a -- separator has already ended option parsing, and without skipping values consumed by options in BOB_OPTIONS_WITH_VALUE. The second loop (lines 74-88) correctly handles both cases. This means a literal positional prompt that happens to match an interactive/headless flag name after -- (e.g. bob -- --prompt-interactive) is misclassified by the first pass as an actual --prompt-interactive flag and returns false (treated as interactive), contradicting the function's own documented intent that "positional prompts default to one-shot mode."

This is a narrow edge case, but the two passes should agree on where flag parsing legitimately ends.

🐛 Proposed fix to make the first pass `--`-aware and value-aware
   for (let index = bobIndex + 1; index < tokens.length; index += 1) {
     const token = tokens[index]
+    if (token === '--') {
+      break
+    }
     if (isBobHeadlessPromptFlag(token)) {
       return true
     }
     if (isBobInteractivePromptFlag(token)) {
       return false
     }
+    if (token.startsWith('-') && optionConsumesNextValue(token)) {
+      index += 1
+    }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function isBobHeadlessOneShotCommand(tokens: readonly string[]): boolean {
const bobIndex = findBobExecutableIndex(tokens)
for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (isBobHeadlessPromptFlag(token)) {
return true
}
if (isBobInteractivePromptFlag(token)) {
return false
}
}
for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (token === '--') {
return index + 1 < tokens.length
}
if (token.startsWith('-')) {
if (optionConsumesNextValue(token)) {
index += 1
}
continue
}
// Why: Bob positional prompts default to one-shot mode unless the command
// uses -i/--prompt-interactive, which the earlier pass already handled.
return true
}
return false
}
export function isBobHeadlessOneShotCommand(tokens: readonly string[]): boolean {
const bobIndex = findBobExecutableIndex(tokens)
for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (token === '--') {
break
}
if (isBobHeadlessPromptFlag(token)) {
return true
}
if (isBobInteractivePromptFlag(token)) {
return false
}
if (token.startsWith('-') && optionConsumesNextValue(token)) {
index += 1
}
}
for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (token === '--') {
return index + 1 < tokens.length
}
if (token.startsWith('-')) {
if (optionConsumesNextValue(token)) {
index += 1
}
continue
}
// Why: Bob positional prompts default to one-shot mode unless the command
// uses -i/--prompt-interactive, which the earlier pass already handled.
return true
}
return false
}

@trs-80 trs-80 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.

Took a pass over this against IBM's published Bob Shell docs and the surrounding Orca code. Overall it's a clean, well-scoped registration that reuses existing machinery rather than inventing new — promptInjectionMode: 'flag-prompt-interactive' already exists and is wired at src/shared/tui-agent-startup.ts:143, so there's no new startup path to review.

Two things I'd want addressed before merge (inline: auto-pick placement, and a missing entry in BOB_OPTIONS_WITH_VALUE), plus two follow-up-grade notes.

What checks out

  • Registration is complete. Every file referencing 'ante' (the previously-added agent) also references 'bob' — 22 files vs Ante's 12. The deliberately-omitted areas (hooks, AI vault, session resume, trust presets, commit-message AI) match the Ante precedent exactly, so the scope claims in the description hold up.
  • Flag semantics match the docs. --prompt-interactive/-i for interactive-with-initial-prompt and --prompt/-p for one-shot are both confirmed against IBM's configuration reference.
  • i18n is complete — all 5 locale files. Untranslated English for a product name matches existing precedent (Claude, Devin, Ante, MiMo Code).
  • Process recognition resolves bob and bob.cmd through the generic PROCESS_TO_AGENT map with no hardcoded separators, and there's no collision with another agent config.

One correction to the description

Security: Bob's --approval-mode yolo is intentionally not added to Orca's default yolo args in this PR.

This reads as a security decision, but it's actually just the norm — 10 of the 35 catalog agents have no YOLO_TUI_AGENT_ARGS entry (opencode, mimo-code, pi, omp, kilo, aug, codebuff, droid, openclaw). No change needed; the added test is still worth having. Just worth not framing the omission as a deliberate hardening step.

Comment thread src/shared/tui-agent-selection.ts Outdated
@@ -10,6 +10,7 @@ export const TUI_AGENT_AUTO_PICK_ORDER = [
'codex',
'grok',
'copilot',
'bob',

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.

bob collides with a popular unrelated binary, and this places it 7th in auto-pick.

bob is the executable name of MordechaiHadad/bob, the Neovim version manager (2.1k stars) — squarely in Orca's terminal/Neovim-user demographic.

Detection is a bare which bob with no version probe (src/main/ipc/preflight.ts:102-117), and auto-pick takes the first detected agent in this order (src/renderer/src/lib/quick-workspace-agent-selection.ts:13). At index 6 that's ahead of OpenCode, Gemini, Cursor, Aider and everything below. So a Neovim user with bob on PATH and no default agent set gets "IBM Bob" auto-selected, and Orca then runs bob --prompt-interactive "<task>", which errors.

This repo already knows the failure class — src/shared/tui-agent-config.ts:374 documents the orca-ide rename to avoid shadowing the GNOME Orca screen reader — but there's no hook in TuiAgentConfig for it, so a real fix isn't cheap.

Cheapest mitigation is to move Bob much later in the order. Position 7 is aggressive for a brand-new, IBMid-gated enterprise CLI regardless of the collision. Note TUI_AGENT_AUTO_PICK_ORDER, MOBILE_TUI_AGENT_AUTO_PICK_ORDER, and AGENT_CATALOG are asserted equal in quick-workspace-agent-selection.test.ts:11, so all three move together.

Comment on lines +3 to +19
const BOB_OPTIONS_WITH_VALUE = new Set([
'--chat-mode',
'--max-coins',
'--instance-id',
'--team-id',
'--model',
'-m',
'--approval-mode',
'--allowed-mcp-server-names',
'--allowed-tools',
'--resume',
'-r',
'--delete-session',
'--include-directories',
'--output-format',
'-o'
])

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.

--auth-method is missing here, and the omission silently breaks recognition.

IBM's install-and-setup docs document --auth-method api-key (space-separated) for non-interactive/CI auth. Since it isn't in this set, the second pass below doesn't consume its value, so api-key is read as a positional prompt and the command is classified one-shot. recognizeAgentProcessFromCommandLine then returns null, and Orca stops recognizing a live interactive Bob session — status, completion coordinator, and interrupt inference all go quiet.

Failing case: bob --auth-method api-key. This is reachable via the empty-prompt launch path (tui-agent-startup.ts:104, where the launch line is just bob <agentArgs> with no prompt flag) and via hand-launched bob in an Orca terminal. Prompt-carrying launches are safe because the first pass hits --prompt-interactive before reaching here.

Related, and the reason I'd rather rethink than just append one entry: --allowed-mcp-server-names, --max-coins, --model/-m, --resume/-r, --delete-session, --output-format/-o appear nowhere in Bob's public docs, while the documented --auth-method is absent. The list looks hand-derived from a --help dump and is already drifting from the real CLI, with a silent failure mode when it does.

Worth asking whether the positional-prompt pass earns its complexity at all — Bob is the only agent doing this inference; claude-headless-command.ts and ante-headless-command.ts just scan for prompt flags. If it stays, consider inverting the default so an unknown --flag <bareword> treats the bareword as a value rather than a prompt. That makes the list's incompleteness fail safe instead of silent.

Comment thread src/shared/bob-headless-command.ts Outdated
Comment on lines +64 to +72
for (let index = bobIndex + 1; index < tokens.length; index += 1) {
const token = tokens[index]
if (isBobHeadlessPromptFlag(token)) {
return true
}
if (isBobInteractivePromptFlag(token)) {
return false
}
}

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.

Minor: this first pass scans every token for -p/-i without skipping option values or stopping at --, so bob --allowed-tools -p and bob -- -p both misfire.

Low practical risk — Orca's own launch line hits --prompt-interactive at index 1 — but it's inconsistent with the value-aware loop directly below, which does handle both cases.

Comment on lines +333 to +341
bob: {
detectCmd: 'bob',
launchCmd: 'bob',
expectedProcess: 'bob',
// Why: Bob's `--prompt` and positional prompts are one-shot modes.
// `--prompt-interactive` executes the initial prompt and keeps the hosted
// shell alive for follow-up work.
promptInjectionMode: 'flag-prompt-interactive'
},

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.

Question rather than a blocker: has a fresh Bob install been exercised inside an Orca PTY?

Per IBM's install-and-setup docs, Bob opens a browser to bob.ibm.com/login on first run and after session expiry. The non-interactive guide also documents --accept-license for accepting the license "without interactive confirmation," which implies an interactive confirmation exists on first run.

Cursor, Copilot, and Codex get preflightTrust for exactly this class of first-launch gate (see the field docs at tui-agent-config.ts:44-51); Bob has none. The smoke tests in the description ran against an already-authenticated Bob Shell 1.0.6, so this path looks untested.

Remote/SSH worktrees are the case I'd worry about most — a browser launch on the remote host isn't useful to the user.

@nwparker nwparker added the enhancement New feature or request label Jul 27, 2026
- move `bob` out of the auto-pick head in all three order lists; the binary
  name collides with the Neovim version manager, and IBM ships no alias
- rebuild the headless matcher as one value-aware pass that reuses
  print-mode's optionName, honours `--`, and covers the value-taking options
  hidden from `bob --help` (--auth-method, --extensions, --fake-responses,
  --record-responses), verified against Bob Shell 1.0.6
- recognize the npm bundle entrypoint (node .../node_modules/bobshell/...)
- register Bob's own --yolo flag, a skills CLI key, and the shared agent label
- bundle the 64px icon required by the offline-icon invariant
Detection is a bare PATH lookup and `bob` is also the Neovim version
manager binary, so a false positive would surface IBM Bob in the picker
and dead-pane on launch. Seed it into DEFAULT_DISABLED_TUI_AGENTS, plus a
one-shot migration so existing profiles start hidden too without
overriding a later opt-in.
@kiyeonjeon21
kiyeonjeon21 force-pushed the feat/ibm-bob-agent-support branch from 66e631b to a193c3d Compare July 31, 2026 06:53

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

266-266: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the spelling error.

Replace sponored with sponsored in the signed-builds note.

Source: Linters/SAST tools


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 35dd32bf-3e3d-490e-b29c-b5412095256c

📥 Commits

Reviewing files that changed from the base of the PR and between 66e631bdd92444651e0bf90d299ba93519f6aaea and a193c3d.

📒 Files selected for processing (1)
  • README.md

@greptile-apps

greptile-apps Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR integrates IBM Bob Shell as a first-class TUI agent across desktop and mobile catalogs, adds one-shot vs interactive command recognition for Bob's CLI flags, and seeds a migration guard so existing users who hold the unrelated Neovim bob binary don't see the new agent until they opt in.

  • New bob-headless-command.ts: token-scanning parser that distinguishes Bob's --prompt/-p/positional one-shot modes from --prompt-interactive/-i interactive sessions, using a static option table sourced from Bob Shell 1.0.6.
  • Migration guard in persistence.ts: bobDefaultDisabledMigrated one-shot flag mirrors the existing claudeAgentTeamsDefaultDisabledMigrated pattern; fresh installs inherit DEFAULT_DISABLED_TUI_AGENTS = ['bob'] and are not re-migrated.
  • Process recognition: Bob's npm package entrypoint (node_modules/bobshell/) is added alongside codex and gemini so node-wrapped invocations are correctly identified.

Confidence Score: 4/5

Safe to merge; the Bob-specific changes are well-isolated and the migration guard correctly prevents disruption for existing users with the Neovim bob binary.

The implementation is thorough and the test suite covers the critical edge cases (one-shot vs interactive, node wrapper, -- terminator, hidden option values, yolo launch). The only forward-looking concern is that BOB_OPTIONS_WITH_VALUE is a static snapshot of Bob 1.0.6's option table — if Bob adds a new value-consuming flag in a future release, interactive sessions using that flag would be misclassified as one-shot and silently filtered out by Orca. This is a known trade-off of the static approach, but there is no visible trigger to catch drift when Bob updates.

Files Needing Attention: src/shared/bob-headless-command.ts — the BOB_OPTIONS_WITH_VALUE set needs to stay in sync with future Bob Shell releases.

Important Files Changed

Filename Overview
src/shared/bob-headless-command.ts New file: implements Bob one-shot vs interactive command detection; logic is correct for 1.0.6 but the static option table creates a maintenance footgun for future Bob releases
src/shared/agent-process-recognition.ts Adds node_modules/bobshell/ entrypoint marker; correctly piggybacks on the existing node-script entrypoint recognition path
src/main/persistence.ts One-shot migration guard (bobDefaultDisabledMigrated) correctly mirrors the claudeAgentTeamsDefaultDisabledMigrated pattern; fresh installs and existing profiles handled consistently
src/shared/tui-agent-config.ts Bob config uses flag-prompt-interactive injection mode; correctly documents the one-shot vs interactive distinction
src/shared/tui-agent-selection.ts Bob added to auto-pick order after autohand with clear comment explaining why it avoids the head; DEFAULT_DISABLED_TUI_AGENTS correctly seeds the opt-in default
src/shared/tui-agent-permissions.ts Adds bob: '--yolo' to YOLO_TUI_AGENT_ARGS; consistent with ante/trae pattern
src/shared/agent-process-recognition.test.ts Comprehensive test coverage: platform paths, one-shot vs interactive, hidden option values, -- terminator, yolo launch line, and node wrapper scenarios all covered
src/main/persistence.test.ts Migration tests correctly verify the one-shot guard pattern: existing profiles get bob disabled once, explicit opt-in is respected on subsequent loads
src/renderer/src/lib/agent-catalog.tsx Bob entry added with correct id, cmd, favicon domain, and homepage URL; uses named i18n key matching the newer mimo_code_label style
mobile/src/tasks/mobile-tui-agents.ts Bob added to mobile catalog labels and favicon domains; position in auto-pick order mirrors desktop with the same Neovim collision comment

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Command line string] --> B[tokenizeCommandLine]
    B --> C{First token is bob?}
    C -- Yes --> D[recognizeAgentProcess]
    D --> F[filterHeadlessOneShotAgentCommand]
    C -- No, first is node --> H[findInterpreterEntrypointToken]
    H --> I{Entrypoint in bobshell package?}
    I -- Yes --> J[recognizeNodeScriptEntrypoint returns bob]
    J --> F
    I -- No --> K[null]
    F --> G[isBobHeadlessOneShotCommand]
    G --> L{Scan from bobArgumentStartIndex}
    L --> M{token is double-dash?}
    M -- yes with more tokens --> N[one-shot: return true]
    M -- no more tokens --> O[interactive: return false]
    L --> P{token starts with dash?}
    P -- No --> N
    P -- Yes --> Q{prompt or -p flag?}
    Q -- Yes --> N
    Q -- No --> R{prompt-interactive or -i flag?}
    R -- Yes --> O
    R -- No --> S{flag in BOB_OPTIONS_WITH_VALUE?}
    S -- Yes, space-separated form --> T[skip next token]
    T --> L
    S -- No --> L
    N --> U[filter returns null]
    O --> V[recognized bob agent returned]
Loading

Comments Outside Diff (1)

  1. src/shared/bob-headless-command.ts, line 507-533 (link)

    P2 Static option table will silently misclassify future Bob flags

    BOB_OPTIONS_WITH_VALUE is pinned to Bob Shell 1.0.6. If a future version adds a new option that takes a value (e.g. --workspace /dir), and a user runs bob --workspace /mydir, the parser hits if (!token.startsWith('-')) on /mydir and immediately returns true (one-shot), so an interactive session launched by Orca would be incorrectly filtered out. The existing comment acknowledges this is taken from 1.0.6, but there's no visible guard or runtime version check to surface the drift.

Reviews (1): Last reviewed commit: "feat(bob): ship IBM Bob opt-in by defaul..." | Re-trigger Greptile

@kiyeonjeon21

Copy link
Copy Markdown
Author

Rebased onto main; the branch was 1533 commits behind. Changes are in the two follow-up commits.

bob name collision

No alias exists, so the Trae fix does not apply here.

$ jq .bin "$(npm root -g)/bobshell/package.json"
{ "bob": "bundle/bob.js" }

$ npm view bobshell
npm error 404 Not Found - GET https://registry.npmjs.org/bobshell

One binary name, and the package is not on the public registry. The curl installer feeds a gated tarball URL to npm install -g.

A version probe is also out. preflight-agent-detection-no-subprocess.test.ts pins detection at zero where/which subprocesses (#9297).

So I moved bob out of the auto-pick head into the alphabetical tail (autohand -> bob -> cline), 7th to 23rd of 36. All three order lists move together, since quick-workspace-agent-selection.test.ts and mobile-agent-catalog.test.ts require them to be identical.

That alone only fixes auto-pick, so Bob now also ships opt-in via DEFAULT_DISABLED_TUI_AGENTS. Someone holding the Neovim bob never sees IBM Bob in the picker, and anyone who wants it turns it on in Agent settings, which already lists disabled agents.

The constant only seeds fresh profiles though, and existing profiles are the ones more likely to have the other bob already installed, so it comes with a one-shot bobDefaultDisabledMigrated guard in persistence, same shape as claudeAgentTeamsDefaultDisabledMigrated: hidden once on load, and a later opt-in is not overwritten. Tests cover both paths.

This is a settings default plus a persistence migration, wider than what you flagged. Happy to drop it back to the reorder alone if you would rather keep this PR to registration.

--auth-method

Right, and it is hidden rather than absent, which is why --help does not list it. From the 1.0.6 bundle:

.option("auth-method", { type: "string", choices: [fr.W3ID_SSO, fr.USE_BOBSHELL] })   // "sso" | "api-key"
...
["debug","experimental-acp","extensions","list-extensions","fake-responses","auth-method"].forEach(c => t.hide(c))
t.strict()

I diffed the whole declared option table against the PR. Three more value-taking options were missing:

option type note
--auth-method string hidden
--extensions / -e array hidden; the -e alias makes bob -e tools "prompt" misparse
--fake-responses string hidden, test-only
--record-responses string hidden, test-only

The 12 already in the set all check out.

Worth noting for the launch path: t.strict() is on, so an unrecognized flag fails the run outright.

Two-pass scan

Rewritten as one value-aware pass that reuses optionName from print-mode-headless-command.ts, stops at --, and skips option values. Covers your note and CodeRabbit's in the same place.

The rebase surfaced another gap. Bob is a node script, so recognition can see it as node .../node_modules/bobshell/bundle/bob.js, which matched nothing. Added a NODE_PACKAGE_SCRIPT_ENTRYPOINTS entry following codex/gemini, with tests for the interactive and one-shot forms of that shape.

bob mcp and bob extensions <cmd> hit the positional rule and classify as one-shot. That is the behavior we want, since neither leaves a shell to host, so I pinned it with a test. Also pinned bob --yolo --prompt-interactive "...", the line the yolo profile now produces, so a later option-table change cannot drop yolo sessions out of recognition.

yolo

Dropped that line from the description. The flag itself is real though: -y, --yolo boolean, so Bob is now in YOLO_TUI_AGENT_ARGS like Ante and Trae, with a test. --approval-mode also exists with choices default/auto_edit/yolo, but the bare flag matches convention here.

Rebase pickups

main moved since your review:

  • skills-cli-agent-keys.ts is satisfies Record<TuiAgent, string | null>, so a missing bob is a typecheck failure. Added as null per the file's own rule.
  • mobile-agent-icon-assets.test.ts wants a bundled PNG for every favicon-domain agent ([Bug]: Some agent icon assets are not displayed #8451). Added src/shared/agent-icons/bob.png and wired both asset maps.
  • WELL_KNOWN_LABELS moved to shared/agent-type-label.ts; the label went with it.

pnpm lint, pnpm typecheck, pnpm test and pnpm build all pass on the rebased branch; numbers are in the description.

PTY

Not done yet. Verified so far: 1.0.6 installed locally, --version and --help off the real binary, option table read out of the shipped bundle. Not verified: fresh install and expired session inside an Orca PTY, including the bob.ibm.com/login handoff. I will run that against a live session and post the result here.

bob --help for 1.0.6 below, since CI and maintainers cannot reach the binary.

bob --help (Bob Shell 1.0.6)
Usage: bob [options] [command]

Bob Shell - Launch an interactive CLI, use -p/--prompt for non-interactive mode

Commands:
  bob [query..]             Launch Bob Shell                           [default]
  bob mcp                   Manage MCP servers
  bob extensions <command>  Manage Bob Shell extensions.    [aliases: extension]

Positionals:
  query  Positional prompt. Defaults to one-shot; use -i/--prompt-interactive
         for interactive.

Options:
      --chat-mode                 the mode to use for interaction, must be one
                                  of: 'plan', 'code', 'advanced', 'ask'
                           [string] [choices: "plan", "code", "advanced", "ask"]
      --hide-intermediary-output  will suppress all output and only show final
                                  output from attempt completion tool  [boolean]
      --logout                    will remove saved credentials        [boolean]
      --max-coins                 bob will stop with exit code 1 if max-coins
                                  are exceeded                          [number]
      --pre-check-auto-approved   bob will pre-check if an auto-approved command
                                  is safe to run                       [boolean]
      --show-license              will show full path to licence files for
                                  review                               [boolean]
      --accept-license            accept the IBM license agreement and continue
                                                                       [boolean]
      --instance-id               instance id to use for this Bob Shell session.
                                                                        [string]
      --team-id                   team id to use for this Bob Shell session.
                                                                        [string]
      --trust                     specify trust level for the current workspace
                                                                       [boolean]
  -m, --model                     Model                                 [string]
  -p, --prompt                    Prompt. Appended to input on stdin (if any).
  [deprecated: Use the positional prompt instead. This flag will be removed in a
                                                       future version.] [string]
  -i, --prompt-interactive        Execute the provided prompt and continue in
                                  interactive mode                      [string]
  -s, --sandbox                   Run in sandbox?                      [boolean]
  -y, --yolo                      Automatically accept all actions
                                                      [boolean] [default: false]
      --approval-mode             Set the approval mode: default (prompt for
                                  approval), auto_edit (auto-approve edit
                                  tools), yolo (auto-approve all tools)
                              [string] [choices: "default", "auto_edit", "yolo"]
      --allowed-mcp-server-names  Allowed MCP server names               [array]
      --allowed-tools             Tools that are allowed to run without
                                  confirmation                           [array]
  -r, --resume                    Resume a previous session. Use "latest" for
                                  most recent or index number (e.g. --resume 5)
                                                                        [string]
      --list-sessions             List available sessions for the current
                                  project and exit.                    [boolean]
      --delete-session            Delete a session by index number (use
                                  --list-sessions to see available sessions).
                                                                        [string]
      --include-directories       Additional directories to include in the
                                  workspace (comma-separated or multiple
                                  --include-directories)                 [array]
      --screen-reader             Enable screen reader mode for accessibility.
                                                                       [boolean]
  -o, --output-format             The format of the CLI output.
                               [string] [choices: "text", "json", "stream-json"]
  -v, --version                   Show version number                  [boolean]
  -h, --help                      Show help                            [boolean]

@kiyeonjeon21

Copy link
Copy Markdown
Author

Closing this in favor of #14895.

Bob Shell moved to 2.x while this sat. I installed 2.0.1 today and the launch path this PR is built on no longer exists:

$ bob --version
2.0.1
commit: e6a3e508

$ bob --prompt-interactive
error: Invalid argument — unknown option '--prompt-interactive'
Run `bob --help` for usage.

$ bob -i
error: Invalid argument — unknown option '-i'

$ bob --yolo
Warning: --yolo is deprecated and ignored in headless mode where auto-approve is the default.

The TUI is behind bob chat now, and --auto-approve is a chat option. So promptInjectionMode: 'flag-prompt-interactive' and YOLO_TUI_AGENT_ARGS.bob = '--yolo' are both dead against the current CLI, and the hidden value-taking options I built BOB_OPTIONS_WITH_VALUE from are gone with them.

@trs-80 rebased this onto main and retargeted it to 2.x in #14895, keeping the opt-in default and the persistence migration from here and extending the opt-out handling to mobile. That is the right base to carry forward. I will follow up there with what I can verify against a live 2.0.1 install.

Issue #7691 stays open and is tracked by #14895.

trs-80 added a commit to trs-80/orca that referenced this pull request Sep 2, 2026
Rebase of stablyai#7698 (by @kiyeonjeon21) onto current main, which had drifted
1102 commits since the original merge base. Agent behavior is unchanged
from the original PR; only the landing sites moved.

Relocations forced by two refactors on main:

- stablyai#14447 dropped the src/shared/types.ts barrel, so the TuiAgent union
  member moves to src/shared/tui-agent.ts and bobDefaultDisabledMigrated
  moves to src/shared/global-settings-types.ts.
- src/main/persistence.ts is now an 8-line barrel; the three opt-in
  migration hunks move to persistence/loading-store/store.ts.
- stablyai#14728 split the oversized test files, so the Bob detection test moves
  to preflight-agent-detection.test.ts and the disabledTuiAgents tests
  move to persistence-settings-update.test.ts.
- i18n locales and agent-headless-command.ts took both sides of the
  collision with Prime Agent (stablyai#12935).

Co-Authored-By: Kiyeon Jeon <kiyeon.jeon.21@gmail.com>
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 Sep 15, 2026
Rebase of stablyai#7698 (by @kiyeonjeon21) onto current main, which had drifted
1102 commits since the original merge base. Agent behavior is unchanged
from the original PR; only the landing sites moved.

Relocations forced by two refactors on main:

- stablyai#14447 dropped the src/shared/types.ts barrel, so the TuiAgent union
  member moves to src/shared/tui-agent.ts and bobDefaultDisabledMigrated
  moves to src/shared/global-settings-types.ts.
- src/main/persistence.ts is now an 8-line barrel; the three opt-in
  migration hunks move to persistence/loading-store/store.ts.
- stablyai#14728 split the oversized test files, so the Bob detection test moves
  to preflight-agent-detection.test.ts and the disabledTuiAgents tests
  move to persistence-settings-update.test.ts.
- i18n locales and agent-headless-command.ts took both sides of the
  collision with Prime Agent (stablyai#12935).

Co-Authored-By: Kiyeon Jeon <kiyeon.jeon.21@gmail.com>
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
Rebase of stablyai#7698 (by @kiyeonjeon21) onto current main, which had drifted
1102 commits since the original merge base. Agent behavior is unchanged
from the original PR; only the landing sites moved.

Relocations forced by two refactors on main:

- stablyai#14447 dropped the src/shared/types.ts barrel, so the TuiAgent union
  member moves to src/shared/tui-agent.ts and bobDefaultDisabledMigrated
  moves to src/shared/global-settings-types.ts.
- src/main/persistence.ts is now an 8-line barrel; the three opt-in
  migration hunks move to persistence/loading-store/store.ts.
- stablyai#14728 split the oversized test files, so the Bob detection test moves
  to preflight-agent-detection.test.ts and the disabledTuiAgents tests
  move to persistence-settings-update.test.ts.
- i18n locales and agent-headless-command.ts took both sides of the
  collision with Prime Agent (stablyai#12935).

Co-Authored-By: Kiyeon Jeon <kiyeon.jeon.21@gmail.com>
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
Rebase of stablyai#7698 (by @kiyeonjeon21) onto current main, which had drifted
1102 commits since the original merge base. Agent behavior is unchanged
from the original PR; only the landing sites moved.

Relocations forced by two refactors on main:

- stablyai#14447 dropped the src/shared/types.ts barrel, so the TuiAgent union
  member moves to src/shared/tui-agent.ts and bobDefaultDisabledMigrated
  moves to src/shared/global-settings-types.ts.
- src/main/persistence.ts is now an 8-line barrel; the three opt-in
  migration hunks move to persistence/loading-store/store.ts.
- stablyai#14728 split the oversized test files, so the Bob detection test moves
  to preflight-agent-detection.test.ts and the disabledTuiAgents tests
  move to persistence-settings-update.test.ts.
- i18n locales and agent-headless-command.ts took both sides of the
  collision with Prime Agent (stablyai#12935).

Co-Authored-By: Kiyeon Jeon <kiyeon.jeon.21@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

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