Skip to content

feat(bob): IBM Bob first-class agent support with managed status hooks - #20397

Open
trs-80 wants to merge 1 commit into
stablyai:mainfrom
trs-80:feat/ibm-bob-integration
Open

trs-80 wants to merge 1 commit into
stablyai:mainfrom
trs-80:feat/ibm-bob-integration

Conversation

@trs-80

@trs-80 trs-80 commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #14895. One branch instead of a stack: #14895's work rebased onto current main (889 commits of drift), plus a managed-hook integration that gives Bob real agent status, plus session resume.

Every behavioural claim below was verified against the real bobshell binary (2.0.2, re-checked on 2.0.5) — captured hook payloads and CLI round-trips, not reading the bundle and guessing. Raw evidence is quoted in the commit messages.

What Bob gets

Before Now
Agent status none working / done / idle, from hooks
Approval prompt none waiting + notification, from the on-screen modal
First input (worker / agent.launch / draft paste) waits out its timeout waits for Bob's composer placeholder
Session resume none bob chat --trust --resume <task-id>
SSH + WSL launch only managed hook installed remotely too

The five things that were wrong, and the evidence

1. ask_followup_question does not exist. An earlier draft mapped Bob's waiting state to that tool. Bob 2.0.2 has no ask-the-user tool at all — asked directly, it enumerated its 17-tool registry without it. The 12 occurrences in dist/bob.js are prose inside shipped skill markdown inherited from an IDE product, with no registration site. Bob asks in plain text and fires Stop. The dead predicate is gone and Bob has no hook-sourced waiting; see the limitation below.

2. --trust is load-bearing. In a fresh HOME, bob chat blocks on a "Do you trust this folder?" select and a prompt typed at that moment is swallowed — the trailing CR is eaten by the select list. Bob has no interactive initial-prompt flag, so Orca injects after startup, which means losing the flag loses the injected prompt on every first launch in a workspace.

3. session_id is the resume task id. It is Bob's rootTaskId. Round-tripped: the id from SessionStart fed to --resume restored the conversation with turn and tool counts intact, and the resumed run reported the same id with source flipping startup → resume. Gated behind its own runtime capability like kimi's, because bob joins RESUMABLE_TUI_AGENTS after agent-session.host-authority.v1 and an older host answers the unknown enum member with invalid_argument — which the launch fallback does not retry on.

4. Orca wrote ~/.bob/ for the wrong bob. Managed-hook install writes into a vendor's own config dir, but its presence gate was a bare PATH lookup. Agent detection already runs an identity probe for exactly this collision (bob is also MordechaiHadad's Neovim version manager); the install path never consulted it. A user who opted Bob in while holding the other tool got ~/.bob/settings/settings.json created locally, over SSH, and into WSL. Fixed for the whole bug class, not just Bob — only agents declaring detectIdentityExclusion are probed, and it fails open like detection does.

5. Windows needed no PowerShell at all. Bob runs hooks through child_process.exec (cmd.exe) and ignores empty stdout, so the hook registers the script path itself — no interpreter hop, no neutral-JSON tail. That is the #18875 doctrine in docs/reference/windows-edr-posture.md; an encoded launcher would have added a first-class Defender alert title per hook event.

Contract details that are load-bearing

  • Config is ~/.bob/settings/settings.json on every platform — Bob builds it from os.homedir() with no APPDATA branch and no env override.
  • Plain JSON, not JSONC, so the shared readHooksJson/writeHooksJson pair covers it; no per-agent parser.
  • BOB_HOOK_EVENTS is exactly SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop. Both the event map and each entry are .strict() zod: one unknown key and Bob silently discards every global hook, so the written shape is a contract. An omitted matcher means match-all. A test asserts the exact key set for that reason.
  • All five fire identically in headless bob run and the interactive bob chat TUI (verified through a real PTY).
  • SessionStart is lazy: Bob fires it from applyInput on a session's first turn input, just before UserPromptSubmit, never at boot, on startup and resume alike. It lands a session-boundary row and drops the previous session's caches. Only startup/resume count; 2.0.5 also sends source: "compact" mid-turn, which is ignored.
  • First-input readiness uses Bob's composer placeholder. Because no hook fires before the first prompt, and Bob emits no DECSET 2004, no alternate screen, and no OSC title, the tui-idle wait had nothing to settle on for a fresh pane. Bob now uses the composer-marker lane (as ZCode/OpenCode do) on Build Anything, @ for context, which every capture paints only after Bob's last Initializing… frame. Contributed by @alfred-rootson (fix(bob): wait for the composer before first worker input trs-80/orca#1).

Known limitations

  • Approval detection is screen-based. Bob has no hook for its command-approval modal: PreToolUse fires, then nothing until the user answers. This PR reads the modal off the PTY (bob-approval-prompt.ts, replayed against two captured transcripts) and emits waiting.
  • A cancelled or failed turn sends no Stop. Bob fires Stop only when a turn completes (!cancelled && …); after Esc or an API error the pane reads working until the status goes stale. Closing that needs an on-screen idle signal, which belongs with the output-status profile work (feat(agent-status): profile-driven output status scrape, with IBM Bob #15936).

Verification

  • pnpm tc clean across node, cli, and web. The CLI project needed Bob's files added to its explicit include list, and the web project's capability ratchet forced Bob's resume gate to be a deliberate decision.
  • Full unit suite: 79,419 passing. The remaining failures were confirmed against a pristine origin/main worktree and fail identically there — developer env ANTHROPIC_API_KEY, a real Claude CLI, and network-dependent cross-version-wire specs. Two more are load-flaky and pass in isolation. Nothing fails because of this branch.
  • pnpm run check:code-quality:changed: 0 new findings across 77 changed files.
  • Three ratchets caught this work mid-flight and are updated, not bypassed: the remote-installer coverage map, the installer count, and the resume-capability pin. The remote-installer test hit the 800-line cap, so it was split at its aggregate/per-agent seam rather than given a max-lines disable.
  • Orca's real identity patterns were run against the installed 2.0.2 binary's --help: kept, not excluded.

🤖 Generated with Claude Code

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

Important

The managed-hook install path enforces Bob's identity exclusion only locally. Over SSH and in WSL, bobHookService.installRemote still writes ~/.bob/settings/settings.json for a user whose bob is MordechaiHadad's Neovim version manager — the exact collision this PR sets out to fix for the whole bug class.

Reviewed changes

  • IBM Bob agent registration — new TuiAgent wired through the catalog, i18n (5 locales), icons, detection commands, telemetry, auto-pick order, and process recognition.
  • Managed status hooks — BobHookService install/remove/status against ~/.bob/settings/settings.json, plus the SSH/WSL remote installer entry.
  • Hook listener — Bob event normalization (SessionStart/UserPromptSubmit/PreToolUse/PostToolUse/Stop), new-turn routing, and resume by the hook session_id.
  • Identity exclusion infrastructure — shared serialize/probe/exclude helpers, absolute-path resolution threaded through local preflight, WSL, and the relay, and a local managed-hook install gate.
  • Default-off rollout — DEFAULT_DISABLED_TUI_AGENTS = ['bob'] plus a one-shot profile migration.
  • Type split — tui-agent-config-types.ts extracted from tui-agent-config.ts.
  • E2E validation — a gated real-binary first-class-agent spec.

⚠️ Remote hook install never forwards Bob's identity exclusion

buildManagedHookDetectionCommands builds { id, cmd } and never attaches identityExclusion, so the relay's excludeMisidentifiedAgents is a no-op for every managed-hook detection request. On SSH and WSL this is the allowlist that decides whether to run installRemote, so the Neovim-bob collision guard is bypassed exactly where the PR claims it is enforced. The local path (preflight detection and agentsFailingHookInstallIdentityProbe) is correctly gated, which is why the new local tests don't catch it.

Technical details
# Bob identity exclusion is not forwarded to remote hook-install detection

## Affected sites
- `src/main/agent-hooks/managed-hook-detection-commands.ts:29` — emits `{ id: target.tuiAgent, cmd }`; never reads `TUI_AGENT_CONFIG[...].detectIdentityExclusion`.
- `src/main/ssh/ssh-relay-session.ts:1373` — sends that command list to `preflight.detectAgents` to build the remote install allowlist.
- `src/main/agent-hooks/wsl-hook-fs-adapter.ts:34` — same builder for the WSL guest install allowlist.
- `src/shared/tui-agent-identity-exclusion.ts:83-88` — `keepsDetectedAgent` only probes when `command.identityExclusion` is present; absent means "keep".
- Contrast `src/shared/tui-agent-detection-commands.ts:42-44`, which serializes the exclusion for `KNOWN_TUI_AGENT_DETECTION_COMMANDS` (the local/preflight path).

## Required outcome
- A remote/WSL `bob` that `bob --help` identifies as the Neovim version manager must not be reported as detected, so `bobHookService.installRemote` never creates `~/.bob/settings/settings.json` for that user.
- Add `identityExclusion: serializeIdentityExclusion(TUI_AGENT_CONFIG[target.tuiAgent].detectIdentityExclusion)` to each emitted command, mirroring the shared builder, and add a test that drives `buildManagedHookDetectionCommands` through the relay's `excludeMisidentifiedAgents`.

## Open questions for the human
- If remote installs are intentionally out of scope for the exclusion, narrow the PR description's "created locally, over SSH, and into WSL … Fixed for the whole bug class" to local.

ℹ️ Nitpicks

  • src/main/bob/hook-settings.ts:17 — "It has no Notification or PermissionRequest hook, so waiting rides on PreToolUse" conflicts with the design: this PR deliberately has no Bob waiting state and maps PreToolUse to working (the approval modal stays working). Worth rewording so it doesn't re-suggest the dead predicate this PR removed.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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

No actionable comments were generated in the recent review.

Walkthrough

📝 Walkthrough

Walkthrough

The pull request adds IBM Bob as a supported TUI agent. It adds command and identity detection, headless-command recognition, startup and resume support, lifecycle event handling, local and remote managed hooks, approval-status detection, settings migration, desktop and mobile presentation, localization, bundled icons, runtime capabilities, and unit, integration, and gated end-to-end tests.

Merge Risk: High · previous review 69407

An authenticated relay client can cause execution of a chosen PATH program with chosen arguments. Restrict identity probes to known server-defined commands before merging.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 29.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 79 functions across 77 files. (7 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description provides detailed, relevant technical context and verification results, but it omits many required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing, Review, … Restructure the description to include every required template section. Add an explicit issue link, visual proof or N/A with a reason, platform-specific testing details, review notes, checklist status, and the required AI Disclosure and Age…
Linked Issues check Warning The description references superseded PR #14895, but it does not provide an explicit issue link or a required Fixes reference identifying the issue addressed by this change. Add the actual tracking issue using the repository's required format, such as Fixes #<issue-number>, and clarify the relationship to superseded PR #14895.
✅ Passed checks (2 passed)

Check name Status Explanation
Out of Scope Changes check Passed The changes are broad but directly support first-class IBM Bob integration, including detection, launch, hooks, status, resume, remote installation, mobile behavior, approval handling, and required sh…
Title check Passed The title clearly identifies the main change: first-class IBM Bob support with managed status hooks. It is concise and specific enough for project history.
Full details: Docstring Coverage

Explanation

Docstring coverage is 29.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 79 functions across 77 files. (7 skipped: 7 unsupported.)

Full details: Description check

Explanation

The description provides detailed, relevant technical context and verification results, but it omits many required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing, Review, Notes, and Checklist.

Resolution

Restructure the description to include every required template section. Add an explicit issue link, visual proof or N/A with a reason, platform-specific testing details, review notes, checklist status, and the required AI Disclosure and Agent skill boundary sections.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

ℹ️ Recent review info

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 06f93397-f3e1-4283-aed7-d0652289586a

📥 Commits

Reviewing files that changed from the base of the PR and between 6e79e07ce4fc685d5c6294a116bb37e21c16ae7f and 6940779.

📒 Files selected for processing (43)

  • README.md
  • config/tsconfig.cli.json
  • mobile/src/tasks/workspace-agent-selection.test.ts
  • src/main/agent-hooks/managed-agent-hook-controls.ts
  • src/main/agent-hooks/managed-agent-hook-registry.ts
  • src/main/agent-hooks/managed-hook-command-contract.test.ts
  • src/main/agent-hooks/managed-hook-detection-commands.test.ts
  • src/main/agent-hooks/managed-hook-detection-commands.ts
  • src/main/agent-hooks/remote-hook-service-installers.test.ts
  • src/main/agent-hooks/remote-managed-hook-installers.ts
  • src/main/bob/hook-service.test.ts
  • src/main/bob/hook-service.ts
  • src/main/ipc/pty-agent-session-write-gate.test.ts
  • src/main/ipc/pty-controller-ownership-routing.test.ts
  • src/main/ipc/pty-ipc-provider-fixtures.ts
  • src/main/ipc/pty-runtime-ssh-binding-persistence.test.ts
  • src/main/ipc/pty-serializer-settlement-mapping.test.ts
  • src/main/ipc/pty/ipc/write-input.ts
  • src/main/ipc/pty/runtime/operations.ts
  • src/main/runtime/orca-runtime-bob-approval-status-order.test.ts
  • src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts
  • src/main/runtime/orca-runtime-on-pty-data.ts
  • src/main/runtime/runtime-terminal-state-records.ts
  • src/relay/preflight-handler.test.ts
  • src/relay/preflight-handler.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/shared/agent-hook-listener/provider-event-routing.ts
  • src/shared/agent-hook-relay.ts
  • src/shared/agent-process-recognition.ts
  • src/shared/bob-approval-prompt.test.ts
  • src/shared/bob-approval-prompt.ts
  • src/shared/default-global-settings.ts
  • src/shared/global-settings-types.ts
  • src/shared/protocol-version.ts
  • src/shared/skills-cli-agent-keys.ts
  • src/shared/tui-agent-detection-commands.ts
  • src/shared/tui-agent-identity-exclusion.test.ts
  • tests/e2e/bob-agent-first-class.spec.ts
🚧 Files skipped from review as they are similar to previous changes (7)

  • README.md
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/shared/global-settings-types.ts
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json

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

@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: 5

🧹 Nitpick comments (1)
src/renderer/src/runtime/agent-resume-host-authority-capability.test.ts (1)

56-56: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a host-advertisement assertion for Bob.

RUNTIME_CAPABILITIES already contains AGENT_SESSION_BOB_RESUME_RUNTIME_CAPABILITY, but this test does not verify that contract. Add the equivalent toContain assertion used for Kimi.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: cf9df6db-76a7-48b7-b449-acff50a76c5b

📥 Commits

Reviewing files that changed from the base of the PR and between 403b62a and 46fe40acde35269a7dfb8c64f26d1c98643d0340.

⛔ Files ignored due to path filters (1)
  • src/shared/agent-icons/bob.png is excluded by !**/*.png
📒 Files selected for processing (86)
  • README.md
  • config/tsconfig.cli.json
  • mobile/src/components/mobile-agent-icon-assets.ts
  • mobile/src/session/mobile-new-tab-agent-options.test.ts
  • mobile/src/tasks/mobile-tui-agents.ts
  • mobile/src/tasks/workspace-agent-selection.test.ts
  • src/cli/runtime-client-deferral.test.ts
  • src/main/agent-hooks/managed-agent-hook-controls.ts
  • src/main/agent-hooks/managed-agent-hook-registry.ts
  • src/main/agent-hooks/managed-hook-identity-gate.test.ts
  • src/main/agent-hooks/managed-hook-identity-gate.ts
  • src/main/agent-hooks/managed-hook-local-filesystem.test.ts
  • src/main/agent-hooks/remote-hook-aggregate-installer.test.ts
  • src/main/agent-hooks/remote-hook-service-installers.test.ts
  • src/main/agent-hooks/remote-managed-hook-installers.ts
  • src/main/agent-hooks/server-retired-pane-new-turn.test.ts
  • src/main/bob/hook-service.test.ts
  • src/main/bob/hook-service.ts
  • src/main/bob/hook-settings.ts
  • src/main/ipc/command-path-resolver.test.ts
  • src/main/ipc/command-path-resolver.ts
  • src/main/ipc/local-agent-install-dir-detection.ts
  • src/main/ipc/preflight-agent-detection-no-subprocess.test.ts
  • src/main/ipc/preflight-agent-detection.test.ts
  • src/main/ipc/preflight-agent-refresh.test.ts
  • src/main/ipc/preflight-command-exec.ts
  • src/main/ipc/preflight-host-cli-status.test.ts
  • src/main/ipc/preflight-remote-ssh.test.ts
  • src/main/ipc/preflight-test-harness.ts
  • src/main/ipc/preflight-wsl-agent-detection.test.ts
  • src/main/ipc/preflight-wsl-agent-detection.ts
  • src/main/persistence-settings-update.test.ts
  • src/main/persistence/loading-store/normalize-loaded-global-settings.ts
  • src/main/persistence/loading-store/prepare-loaded-profile-settings.ts
  • src/main/preflight/agent-detection.ts
  • src/main/preflight/preflight-identity-probe.ts
  • src/relay/preflight-handler.test.ts
  • src/relay/preflight-handler.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-draft-readiness.ts
  • src/renderer/src/lib/agent-favicon-assets.ts
  • src/renderer/src/lib/agent-status.ts
  • src/renderer/src/runtime/agent-resume-host-authority-capability.test.ts
  • src/renderer/src/runtime/agent-resume-host-authority-capability.ts
  • src/shared/agent-headless-command.ts
  • src/shared/agent-hook-listener-claude-compatible-vendors.test.ts
  • src/shared/agent-hook-listener/provider-dispatch.ts
  • src/shared/agent-hook-listener/provider-event-routing.ts
  • src/shared/agent-hook-listener/providers/bob-events.ts
  • src/shared/agent-hook-listener/source-routing.ts
  • src/shared/agent-hook-relay.ts
  • src/shared/agent-hook-types.ts
  • src/shared/agent-kind.ts
  • src/shared/agent-process-recognition.test.ts
  • src/shared/agent-process-recognition.ts
  • src/shared/agent-session-resume.ts
  • src/shared/agent-type-label.ts
  • src/shared/bob-headless-command.test.ts
  • src/shared/bob-headless-command.ts
  • src/shared/default-global-settings.ts
  • src/shared/draft-paste-ready-scanner-grok-trace-replay.test.ts
  • src/shared/draft-paste-ready-scanner.ts
  • src/shared/global-settings-types.ts
  • src/shared/local-agent-install-dir-detection.ts
  • src/shared/node-package-script-entrypoints.ts
  • src/shared/protocol-version.ts
  • src/shared/require-tui-agent-config.ts
  • src/shared/skills-cli-agent-keys.ts
  • src/shared/telemetry-property-schemas.ts
  • src/shared/tui-agent-config-types.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-detection-commands.ts
  • src/shared/tui-agent-display-names.ts
  • src/shared/tui-agent-identity-exclusion.test.ts
  • src/shared/tui-agent-identity-exclusion.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-bob.test.ts
  • src/shared/tui-agent.ts
  • tests/e2e/bob-agent-first-class.spec.ts

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

Comment thread mobile/src/tasks/mobile-tui-agents.ts Resolved
Comment thread src/wsl-guest/preflight-handler.ts Resolved

@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: Advanced

Run ID: 925787ef-d34a-47ee-b4c5-67ab2357e7be

📥 Commits

Reviewing files that changed from the base of the PR and between 46fe40acde35269a7dfb8c64f26d1c98643d0340 and e55f1416daa66d9c76daeffbdb3ea13723dedfa9.

📒 Files selected for processing (11)
  • src/main/runtime/__fixtures__/bob-approval-command.meta.json
  • src/main/runtime/__fixtures__/bob-approval-command.txt
  • src/main/runtime/__fixtures__/bob-approval-subagent.meta.json
  • src/main/runtime/__fixtures__/bob-approval-subagent.txt
  • src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts
  • src/main/runtime/orca-runtime-get-unpersisted-tracked-title-for-pty.ts
  • src/main/runtime/orca-runtime-on-pty-data.ts
  • src/main/runtime/runtime-terminal-state-records.ts
  • src/shared/bob-approval-prompt.test.ts
  • src/shared/bob-approval-prompt.ts
  • src/shared/synthetic-agent-title.ts

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

Comment thread src/shared/bob-approval-prompt.ts Resolved

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

Important

The new Bob approval detector re-fires many times for a single modal whenever it is painted across PTY chunks, and the transcript tests assert only > 0, so the re-fire is invisible to the suite.

Reviewed changes

  • Added src/shared/bob-approval-prompt.ts — an edge-triggered screen detector for Bob's command and subagent-spawn approval modals, self-armed by the bob chat launch command or the composer banner.
  • Wired it through RuntimePtyTitleTrackerEntry.bobApprovalDetector, created unconditionally in the per-PTY title tracker, observed from onPtyData, and emitted as a waiting agent-status row.
  • Registered Bob in SYNTHETIC_AGENT_TITLE_AGENTS / profiles so the waiting row drives the "Bob - action required" title and its BEL.
  • Added committed 120x40 Bob 2.0.2 approval transcripts and a detector unit suite.

ℹ️ The detector's waiting row has no in-band clear

The detector only ever emits waiting; it never emits a working/done when the modal clears. Clearing therefore depends entirely on a Bob hook (PostToolUse/Stop) arriving afterward. With managed hooks absent — they are the same feature this PR adds, so an install failure or an opt-out leaves the screen scraper running alone — a pane that hits one approval modal stays "action required" until the 30-minute AGENT_STATUS_STALE_AFTER_MS window elapses.

Technical details
# Detector emits `waiting` with no matching unblock signal

## Affected sites
- `src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts:44-55` — `onApprovalPrompt` always emits `{ state: 'waiting', agentType: 'bob' }`.
- `src/shared/bob-approval-prompt.ts:85-124` — `observe` sets `armed`/`carryOver` but has no "modal cleared" callback.
- `src/shared/agent-status-freshness.ts:7` — `AGENT_STATUS_STALE_AFTER_MS = 30 * 60 * 1000`.

## Required outcome
- A pane whose modal was dismissed but whose hooks are missing/disabled must not advertise "action required" for up to 30 minutes.

## Open questions for the human
- Is the intended contract "screen detector only ever probes, hooks are always the authority that clears it"? If so, is it acceptable that the detector's row can outlive its modal when hook install failed? A paired screen-cleared signal (or refusing to emit at all unless a managed hook is confirmed installed for the pane) would close the gap.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/shared/bob-approval-prompt.ts Resolved
Comment thread src/shared/bob-approval-prompt.test.ts Resolved
@trs-80

trs-80 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the pullfrog and CodeRabbit review rounds in e7a1a858ec (inline threads answered individually). Review-body findings:

  • Remote hook install never forwarded Bob's identity exclusion: fixed. buildManagedHookDetectionCommands now attaches the serialized identityExclusion, so the relay's excludeMisidentifiedAgents drops a Neovim bob before SSH/WSL installRemote runs. The test sends the list through JSON and the relay check.
  • hook-settings.ts nitpick: reworded; waiting comes from bob-approval-prompt.ts, not PreToolUse.
  • Detector waiting has no in-band clear (open question): intentionally not added. Emitting working when the modal leaves could land after Bob's Stop hook and overwrite done, leaving the pane stuck on working in the normal hooks-installed case. Hooks stay the authority that clears it; without managed hooks the row goes stale at AGENT_STATUS_STALE_AFTER_MS. Open to a different contract if maintainers prefer one.

Verification: pnpm tc (all projects) passes; 896 tests across agent-hooks, relay preflight, the detector, identity exclusion, and runtime status suites pass, plus the mobile agent-selection suites; changed-code quality gate reports 0 new findings.

@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: Advanced

Run ID: dc267cc7-4b27-4d72-b8e6-7ad4467ecf34

📥 Commits

Reviewing files that changed from the base of the PR and between e55f1416daa66d9c76daeffbdb3ea13723dedfa9 and e7a1a858ecdeee59b008d373db53a58db2fb47dd.

📒 Files selected for processing (17)
  • config/tsconfig.cli.json
  • mobile/src/tasks/mobile-tui-agents.ts
  • mobile/src/tasks/workspace-agent-selection.test.ts
  • src/main/agent-hooks/managed-agent-hook-controls.ts
  • src/main/agent-hooks/managed-hook-detection-commands.test.ts
  • src/main/agent-hooks/managed-hook-detection-commands.ts
  • src/main/agent-hooks/managed-hook-identity-gate.test.ts
  • src/main/agent-hooks/managed-hook-identity-gate.ts
  • src/main/bob/hook-settings.ts
  • src/main/runtime/orca-runtime-bob-approval-status-order.test.ts
  • src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts
  • src/main/runtime/orca-runtime-on-pty-data.ts
  • src/shared/agent-hook-listener-claude-compatible-vendors.test.ts
  • src/shared/bob-approval-prompt.test.ts
  • src/shared/bob-approval-prompt.ts
  • src/shared/tui-agent-identity-exclusion.test.ts
  • src/shared/tui-agent-identity-exclusion.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/main/runtime/orca-runtime-create-terminal-side-effect-command-code-detector.ts
  • mobile/src/tasks/workspace-agent-selection.test.ts
  • src/main/runtime/orca-runtime-on-pty-data.ts
  • src/main/bob/hook-settings.ts
  • mobile/src/tasks/mobile-tui-agents.ts
  • src/main/agent-hooks/managed-hook-identity-gate.test.ts
  • src/main/agent-hooks/managed-agent-hook-controls.ts
  • src/shared/agent-hook-listener-claude-compatible-vendors.test.ts
  • src/shared/tui-agent-identity-exclusion.test.ts
  • src/shared/tui-agent-identity-exclusion.ts

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

Comment thread src/shared/bob-approval-prompt.ts Resolved
@trs-80

trs-80 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@greptile-apps review

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

✅ No new issues found.

Reviewed changes

Reviewed the single new commit e7a1a858ec since the prior pullfrog review, which addresses the prior findings on identity probes, the approval detector, and status ordering. All three prior pullfrog threads are resolved and the fix lands with exact assertions; the touched suites (bob-approval-prompt, managed-hook-detection-commands, managed-hook-identity-gate, tui-agent-identity-exclusion, the new status-order test, listener, remote installers, relay) all pass.

  • Forwarded each managed-hook target's serializeIdentityExclusion through buildManagedHookDetectionCommands, so the SSH/WSL install allowlists' same-named-tool probe now actually runs.
  • Reworked agentsFailingHookInstallIdentityProbe to reuse excludeMisidentifiedAgents over the same candidate list (including the Settings command override) and to keep an agent when any found candidate proves to be the real one.
  • Rewrote the Bob approval detector's edge-trigger: rolling carry-over, disarm only when the composer reappears without a modal, and ignore matches living only in the carried tail. Transcript tests now assert exact counts (1 command / 2 subagent) at 64/512/4096-byte writes.
  • Emitted Bob's approval waiting after the chunk's own OSC statuses so a same-chunk working cannot overwrite it, with a new ordering test.
  • Treated null/malformed disabledTuiAgents on mobile as the opt-out default and exported isMobileTuiAgentEnabled, now consumed by three mobile selection hooks.
  • Updated the stale waiting comment in bob/hook-settings.ts and tightened the Bob SessionStart listener assertion to toBeNull().

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@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: Advanced

Run ID: 26758a94-85ed-46fe-859e-f18a1351f0e9

📥 Commits

Reviewing files that changed from the base of the PR and between e7a1a858ecdeee59b008d373db53a58db2fb47dd and 6e79e07ce4fc685d5c6294a116bb37e21c16ae7f.

📒 Files selected for processing (2)
  • src/shared/bob-approval-prompt.test.ts
  • src/shared/bob-approval-prompt.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/shared/bob-approval-prompt.test.ts

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

Comment thread src/shared/bob-approval-prompt.ts Resolved

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

✅ No new issues found.

Reviewed changes

Reviewed the single new commit 6e79e07ce4 since the prior pullfrog review — a targeted fix to the Bob approval detector's cross-write edge trigger.

  • Replaced the carried-tail boolean check (matchIsOnlyCarriedOver) with a differential match count (hasNewMatch), so a second modal that completes across a PTY write boundary still fires while the carried tail retains the first. Verified the count only ever increases against the previous tail (which is a literal prefix of the assembled frame), so a stale modal scrolling out of the 512-char window cannot suppress a new one.
  • Added a regression test pinning the split-second-modal case: after a subagent modal fires and the idle composer disarms the detector, a second subagent modal split across three writes fires exactly once.
  • Switched the composer disarm to the same differential check (using a global clone of BOB_BANNER_RE) and inlined the removed textShowsBobComposer helper.

The existing detector suite and the waiting-ordering test both pass (18 tests), and matchAll on the shared module-level global regexes does not mutate lastIndex, so the cached pattern clones are safe to reuse.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 6e79e07 to 6940779 Compare September 15, 2026 17:00

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

✅ No new issues found.

Reviewed changes

Re-reviewed the two commits added since the prior pullfrog review. The head branch was rebased in between (all SHAs changed; the previously reviewed 6e79e07ce4 is now 6075a8bcbe), so the scope is the net delta of those two commits.

  • Gated the Bob approval detector's composer disarm on input. observeInput() sets inputSinceModal = armed, a modal match resets it, and the composer arm only disarms on inputSinceModal && showsComposer && hasNewMatch(banner). A modal repaint under a repainting composer (the subagent-spawn case) or an arrow-key redraw can no longer clear the waiting row — a resize no longer re-fires it.
  • Wired notePtyInput through the local input paths: a new public method on OrcaRuntimeWithCreateTerminalSideEffectCommandCodeDetector (inherited by OrcaRuntimeService), called from writePtyInput / writePtyInputAccepted and writePtyFromRuntimeController, with the affected runtime fixtures updated.
  • Tightened the detector suite for the new contract: new no-re-fire cases for a composer repaint under an unanswered modal and for cursor input, and the transcript it.each now takes an acceptedAt offset, asserting 2 fires with the answer and 1 without.
  • Reconciled with main's hook contract and assertion gate: registered Bob's getBobManagedCommand / getBobRemoteManagedCommand in the managed-hook command contract, replaced the remote settings.json cast with parseHooksJsonText (returns null on parse failure or a non-object top level), dropped the duplicate runProcess mock in the relay test, and swapped the remaining type assertions for typed values or SAFETY:-annotated disables.

The touched suites pass locally: bob-approval-prompt, orca-runtime-bob-approval-status-order, managed-hook-command-contract, managed-hook-detection-commands, bob/hook-service, tui-agent-identity-exclusion, the four PTY IPC suites, and relay/preflight-handler (172 tests). All prior Pullfrog threads are resolved.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 6940779 to d474390 Compare September 23, 2026 01:43

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

✅ No new issues found.

Reviewed changes

Re-reviewed the two commits added since the prior pullfrog review (the branch was rebased, so the previously reviewed 69407794f3 is now 5ee015f357); scope is the net delta.

  • Split the preflight probes into their own modules — moved isGhAuthenticated/isGlabAuthenticated into preflight/preflight-cli-auth.ts and probeCommandVersion/runIdentityProbe into relay/relay-command-probes.ts, keeping agent-detection.ts and preflight-handler.ts under the 300-line cap. The moves are verbatim (same timeouts, same runProcess/execFile calls), the remaining imports in both source files are still used, and the relay test's vi.mock still covers the moved probe because the new module imports the same specifier.
  • Restored main entries the rebase had dropped — re-added freebuff to TUI_AGENT_CONFIG_SOURCE and preflightTrust: 'antigravity' to the antigravity config. Both are present again in main, and I found no other rebase-loss deletions in the full diff (scanned every removed line for agent-config keys). pnpm tc and the relay/preflight/runtime-startup suites (83 tests) pass.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@rootson-hen

Copy link
Copy Markdown

Just adding some positive real-world feedback: I’ve been using a build created directly from this PR for almost two weeks, and the integration with IBM Bob has been working very reliably.

I’d really appreciate it if the maintainers could move this toward merging. Having to continuously rebuild Orca myself to use IBM Bob adds unnecessary friction, especially when the implementation already appears stable in daily use.

@trs-80

trs-80 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@greptile-apps review

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from d474390 to 4a4e2d0 Compare September 24, 2026 11:53

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

✅ No new issues found.

Reviewed changes

Re-reviewed the branch after it was rebased onto current main (all SHAs changed; the previously reviewed head d47439035c is now 4a4e2d0eb3). The scope is the net delta against the new base: it is a rebase reconciliation, and Bob's own logic is unchanged.

  • Antigravity trust restored — re-added preflightTrust: 'antigravity' to tui-agent-config.ts so the file matches main; the diff no longer removes it.
  • freebuff → command-code adopted — the icon, catalog, favicon, and mobile icon lists now use main's renamed agent (command-code), and the head commit no longer restores freebuff because main itself renamed it.
  • Moved import repointed — managed-hook-detection-commands.ts now imports TuiAgentDetectionCommand from shared/tui-agent-detection-commands (main moved it out of main/ipc).
  • New-main agents carried as context — muse sits alongside Bob in the hook registries, source/target arrays, headless matcher, resume list, and capability list; Bob's own files (hook service, approval detector, identity exclusion, runtime wiring, fixtures) are byte-identical to the approved revision, and the remote-installer tests use main's dynamic REMOTE_MANAGED_HOOK_INSTALLER_AGENTS.length with the aggregate cases in remote-hook-aggregate-installer.test.ts.

Verified pnpm tc (node/cli/web) is clean and the targeted suites (quick-workspace-agent-selection, tui-agent-startup-bob, managed-hook-detection-commands) pass. No prior Pullfrog threads remain open.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 4a4e2d0 to 6bf0f60 Compare September 26, 2026 10:20

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

✅ No new issues found.

Reviewed changes

Re-reviewed the branch after it was rebased onto a newer main (all 27 commit SHAs were re-created; the previously reviewed head 4a4e2d0eb3 is now 6bf0f601df). Because the two tips sit on different bases, a plain old-vs-new diff is almost entirely intervening main commits, so I used git range-diff to isolate the PR patch: every Bob-authored commit is patch-identical, and each difference below is the patch coexisting with main's newer code — no Bob behavior changed. pnpm tc (node/cli/web) is clean and the 11 targeted Bob/runtime suites (99 tests) pass.

  • Coexisting with main's new zcode agent — zcode is threaded alongside bob in every registry, union, and ordered array (agent kinds, hook sources/targets, managed-hook installers and refreshers, remote installer list, resume list and capability, i18n locales, icons, catalog, process-recognition entrypoints) without perturbing Bob's entries.
  • comparableScriptPath → comparablePath — main moved the path-normalizing helper into agent-command-line-entrypoint.ts; bob-headless-command.ts and agent-process-recognition.ts now import it. The implementation is byte-identical to the removed helper, so Bob's path matching is unchanged.
  • Agent-session PTY write gate removed by main — write-input.ts, operations.ts, and controller.ts lost main's write gate. Bob's notePtyInput calls survive on both input paths, and writePtyFromRuntimeController now threads deps so the runtime call still resolves.
  • Antigravity trust restore — preflightTrust: 'antigravity' is re-added so tui-agent-config.ts matches main.
  • Registration/ordering preserved — Bob stays after autohand in TUI_AGENT_AUTO_PICK_ORDER, in DEFAULT_DISABLED_TUI_AGENTS = ['bob'], and in SYNTHETIC_AGENT_TITLE_AGENTS; the one-shot profile migration and resume gate are unchanged.

No prior Pullfrog threads remain open (all were resolved on earlier revisions), and no new issues surfaced in this delta.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Adds IBM Bob agent with managed hook installation and identity detection.

The PR appears safe to merge; the remaining finding is a non-blocking gap in test protection.

Findings

  1. P1 Home-relative Bob override is ignored ▶
  2. P1 Relative PATH skips Bob hooks ▶

Summary

The PR adds first-class IBM Bob detection, managed status hooks, and session resume. Changes since the previous review also revise workspace trust, terminal-output delivery, push-worker capacity, CI workflows, and test protections.

  • The Bob identity-gate changes address the two unresolved prior review findings.
  • The new real-agent-home test guard misses Claude’s custom-OAuth config filename.

Reviews (4) · Last reviewed commit: "fix(bob): index only the executable of a..."

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

✅ No new issues found.

Reviewed changes

Reviewed the delta since the prior pullfrog review. The branch was rebased again onto a newer main, so this run covers the rebase reconciliation plus the one new head commit afe1a0921f; git range-diff confirms every Bob-authored commit is patch-identical and each difference is Bob's code coexisting with main's newer code. pnpm tc:node/tc:cli/tc:web are clean and 18 targeted suites (277 tests) pass.

  • Rebased onto a newer main — main's qoder, codebuddy, and dsh agents are threaded alongside Bob through every registry, union, and ordered array, without disturbing Bob's entries.
  • Folded Bob's package-path boundary into main's module — isNodePackageScriptPath moved from the parallel node-package-script-entrypoints.ts into main's agent-node-package-entrypoints.ts, and the parallel module was deleted; agent-process-recognition.ts and bob-headless-command.ts now share it, so the segment-boundary rule cannot diverge between the recognizer and the headless matcher.
  • Recorded Bob's rest signal — bob: 'synthetic-title' added to the exhaustive rest-signal table, derived from Bob's SYNTHETIC_AGENT_TITLE_PROFILES entry.
  • Test-harness follow-ups — split the Bob hide-migration test into two fresh-profile cases, stubbed notePtyInput in the write-input test runtime, and merged the identical opencode/opencode2 icon branches to keep agent-catalog.tsx under its max-lines cap.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 384100f to bb37a28 Compare September 30, 2026 16:06
@trs-80

trs-80 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@greptile-apps review

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

✅ No new issues found.

Reviewed changes

Re-reviewed the two commits added since the prior pullfrog review (the branch was rebased, so 384100f159 is now c69805aefd; the net delta is 783c3ed12c and bb37a282e2). Both are self-initiated fixes with tests. The touched suites (local-agent-cli-presence 12, managed-hook-identity-gate 7, AgentsPane 34) pass and pnpm tc:cli is clean.

  • Shared the identity-gate's candidate resolution with presence detection — new resolveLocalAgentCommand reuses the private helpers behind detectLocalManagedAgentCliPresence (~ expansion, relative PATH entries kept, relative path-shaped command rejected), and agentsFailingHookInstallIdentityProbe resolves each candidate once into a cmd → program map and probes the resolved program. A real Bob reached via ~/bin/bob or a relative PATH entry can no longer be shadowed by an unrelated same-named bob; buildManagedHookIdentityProbe no longer re-resolves, and command-path-resolver.ts leaves the CLI project's explicit include list.
  • Indexed only the executable in agent settings search — buildAgentSettingsKeywords now indexes agent.cmd's executable token instead of the whole command, so Bob's bob chat --trust no longer contributes trust to the Agents section where the host-only folder-trust row is hidden.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from bb37a28 to fba7b65 Compare October 5, 2026 10:00

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

✅ No new issues found.

Reviewed changes

Reviewed the two commits added since the prior pullfrog review (bb37a282e2, now c6427b1630). The first is a self-initiated fix restoring Bob's identity probe after main's detection refactor; the second meets main's newer agent-integration requirements. No new issues found, and no prior Pullfrog threads remain open.

  • Restored local/WSL identity exclusion in agent detection — main merged local and WSL detection into detectAgentCommandsOnHost, which returned only command names, so the rebase had dropped the identity probe from detectInstalledAgents. New resolveAgentCommandPathsOnHost returns each found command's resolved executable (WSL via detectWslCommandsOnPath, local via resolveLocalCommandPath + resolveCommandsInInstallDirs); detectAgentCommandsOnHost derives its set from the resolver's keys so Qoder callers are unchanged; detectInstalledAgents builds buildIdentityProbe over those paths and runs excludeMisidentifiedAgents, so the Neovim-bob collision is excluded again on both hosts.
  • Met main's newer agent-integration requirements — registered Bob in the readiness-census transcript catalog with a synthetic baseline and four approval-transcript baselines, added bob: 'tui-idle' to the readiness-lane table, kept "IBM Bob" untranslated in the locale policy, added the French catalog label, listed Bob on the docs supported-agents page, and covered Bob's resume capability in the remote launch tests (legacy fallback and host authority).

pnpm tc (node/cli/web) is clean. Targeted verification: preflight-agent-detection (24), preflight-agent-detection-no-subprocess (2), preflight-wsl-agent-detection (23), qoder-desktop-execution-host (14), launched-agent-composer-readiness (61), remote-agent-session-launch (22), readiness-census (6) and readiness-census-synthetic (46), the four Bob transcript replays, and the locale-policy suites (35) all pass.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

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

✅ No new issues found.

Reviewed changes

Re-reviewed the two commits added since the prior pullfrog review (213cb6d06a, 3587040a5a). The branch was not rebased this time, so the delta is exact. pnpm tc (node/cli/web) is clean and the touched suites pass (ibm-bob-title-recognition 6, agent-title-evidence 125, readiness-census-synthetic 46).

  • Bob pane titles are now vendor-qualified and recognized — the profile wrote Bob / Bob ready / Bob - action required, which no classifier recognized, so the rest-signal table's synthetic-title entry for Bob did not hold and the idle check fell back to waiting. SYNTHETIC_AGENT_TITLE_PROFILES.bob now writes the IBM Bob variants, and a boundary-safe IBM_BOB_AGENT_NAME_RE (ibm + whitespace + bob) is wired into every title classifier that handles Hermes/Droid (agent-title-core.ts, agent-title-identity.ts, terminal-title-agent-type.ts, agent-title-status.ts, and the renderer's title-agent-identity.ts). The dedicated-pattern list moved beside the patterns in agent-name-token-match.ts and is now consumed by agent-title-evidence.ts. Bare bob (bob@host, bob 4.0.0, the Neovim manager) stays unrecognized.
  • The fix is pinned by exact assertions — the new ibm-bob-title-recognition test asserts the exact idle/permission labels, the idle / permission / agent-type round-trip, and five bare-bob negatives; and synthetic--bob.json's twelve synthetic-ready census verdicts move from pending:closed to ready-strong/ready@start, now identical to Devin's fixture. Both would fail if recognition regressed.
  • Docs — added docs/reference/ibm-bob-integration.md (the verified Bob Shell 2.0.2 contract, identity model, compatibility and limits) and allow-listed it in .gitignore alongside the Jcode reference.

No prior Pullfrog threads remain open; all were resolved on earlier revisions.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 3587040 to e0f131a Compare October 8, 2026 12:28
@NoeSamaille

NoeSamaille commented Oct 8, 2026 •

Copy link
Copy Markdown

Super eager for this to get merged :)

@trs-80

trs-80 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Hi maintainers 👋 Could one of you take a look at two PRs when you have a moment?

#20397: IBM Bob as a first-class agent (managed status hooks, approval detection, session resume)

#20401: worker-start --agent defaults to the Settings default agent

  • Rebased on current main, mergeable, no conflicts.
  • If --agent is omitted, the worker uses the agent set in Settings. A named agent or a configured command alias (Resolve explicitly configured command aliases for workers #24648) still works. A mistyped or empty name fails instead of quietly launching the default.
  • Greptile's P2 finding (a remote worker's resolved agent wasn't recorded) is fixed and covered by a test; Pullfrog found no new issues.

Since these come from a fork, CI hasn't run on the current heads, so the first step would be approving the workflow runs. I'm happy to make any changes you want. Thanks!

@rootson-hen

Copy link
Copy Markdown

For documentation, cross-linking the related Discord thread I started:
https://discord.com/channels/1492228674081263786/1521653794310586388/1558008476813234198

I shared my positive experience with this PR there in the hope of bringing it a little more visibility among the maintainers.

@alfred-rootson

alfred-rootson commented Oct 9, 2026 •

Copy link
Copy Markdown

I tested the Bob integration through Orca's native orchestration worker path and found a first-dispatch readiness issue at the current PR head, e0f131adfab96cd07984cc0ebf379f2416d6b706. This concerns a fresh Bob worker with an initial task, not ordinary manual Bob terminal use.

Current path and deadlock

Bob currently has promptInjectionMode: 'stdin-after-start', but no composerReadyCaptures and no Bob-specific draftPasteReadySignal. getLaunchedAgentReadinessLane therefore selects tui-idle, as the lane test currently records.

In direct Bob Shell 2.x testing:

  1. Start bob chat --trust.
  2. Leave it idle at the initial composer.
  3. No SessionStart or UserPromptSubmit hook arrives.
  4. Submit the first prompt.
  5. Bob then emits both events.

That makes pre-input tui-idle circular for a fresh worker: Orca waits for hook-backed evidence before delivering the prompt, while Bob emits that evidence only after receiving the prompt.

Why the generic terminal signals do not solve it

The two Bob captures already committed to this PR provide useful protocol evidence:

Capture Build Anything, @ for context DECSET 2004 (ESC[?2004h) Alternate screen (ESC[?1049h)
bob-approval-command.txt present (24 full-placeholder paints) 0 0
bob-approval-subagent.txt present (47 full-placeholder paints) 0 0

Bob therefore cannot use the generic quiet-after-bracketed-paste signal: its quiet timer is never armed. It also cannot anchor its composer glyph on alternate-screen entry as Grok does.

Why bare ❯ is unsafe

My normal Powerlevel10k prompt ends with a separate bare glyph:

░▒▓    ~/Workspace/orca-bob  on   bob-integration ... ▓▒░
❯

That output appears before bob chat --trust mounts Bob's composer. Starship and Pure can use the same glyph. An unanchored bare-❯ signal can therefore mistake the launching shell for Bob and inject the task too early. I intentionally do not propose a glyph fallback; a visible readiness timeout is safer than typing a worker task into the shell.

Existing Orca mechanism to reuse

This does not need a new worker readiness architecture or a Bob conditional in local-worker-start.ts. Orca already has the intended path:

composerReadyCaptures
    → getLaunchedAgentReadinessLane() === 'composer-marker'
    → waitForFreshWorkerComposer()
    → configured draft-paste readiness signal

OpenCode, OpenCode 2, and ZCode already use this lane.

Proposed implementation

I prepared a one-commit implementation with this shape:

  1. Share the existing Bob identity prefix from bob-approval-prompt.ts:

    export const BOB_COMPOSER_PLACEHOLDER_PREFIX =
      'Build Anything, @ for context'

    This is intentionally shorter than the complete placeholder so secondary / for commands and $ for skills hints can change independently.

  2. Add bob-composer-prompt as a marker-only signal:

    {
      markerAnchor: null,
      markerAnchorEnd: null,
      marker: BOB_COMPOSER_PLACEHOLDER_PREFIX,
      quietAnchor: null
    }
  3. Configure Bob with:

    draftPasteReadySignal: 'bob-composer-prompt',
    composerReadyCaptures: [
      'bob-approval-command',
      'bob-approval-subagent'
    ]
  4. Reuse the shared prefix in approval detection.

The only generic scanner extension is that marker !== null && markerAnchor === null means the configured marker is sufficient evidence. The existing rolling window still handles PTY chunk boundaries.

Coverage and validation

The focused tests prove:

  • Bob selects composer-marker, not tui-idle.
  • The shared prefix resolves without DECSET 2004 or alternate-screen entry.
  • A realistic Powerlevel10k prompt ending in bare ❯ does not resolve.
  • Every split point in the prefix resolves across PTY chunks.
  • Both committed Bob captures resolve and contain neither generic anchor.
  • Existing Bob approval detection still passes using the shared constant.

Local results on the clean contribution branch:

  • focused readiness/config/startup/worker files: 291 passed
  • nearby Grok replay plus Claude/Codex readiness files: 38 passed
  • pnpm tc: passed
  • changed-code quality gate: 0 findings
  • pre-commit Oxlint, React Doctor, and Oxfmt: passed

I also previously validated the effective behavior in an installed local build through orca orchestration worker-start --agent bob: initial input was accepted, Bob processed the task, emitted worker_done, and the dispatch settled succeeded with zero failures. That older build used a less general code shape; this contribution uses the PR's current capture-backed architecture.

Because GitHub native PR stacks require all branches in one repository, a cross-fork stack cannot represent this dependency. I opened the prepared one-commit dependent PR against trs-80:feat/ibm-bob-integration: trs-80#1. The commit can also be cherry-picked if that fits your workflow and agent setup better.

AI disclosure: The code and accompanying messages were generated using the GPT-5.6-sol AI model.

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from e0f131a to 3863700 Compare October 9, 2026 11:58
@trs-80

trs-80 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@alfred-rootson thanks, confirmed and merged.

I reproduced the deadlock on Bob 2.0.5 in a real PTY: no hook fires before the first prompt (SessionStart lands ~30 ms before UserPromptSubmit, on --resume too), and Bob emits no DECSET 2004, no alt screen, and no OSC title. The bundle confirms it: SessionStart is fired from applyInput, so it can never be a readiness signal. Bob's rest signal is synthetic-title (its approval title), which closes the quiet-foreground lane kimi and cline fall back on, so tui-idle had nothing left to settle on. That hit agent.launch with a prompt and the desktop draft paste as well as worker start.

The placeholder also appears only after Bob's last Initializing… frame in both 2.0.2 captures and a fresh 2.0.5 boot, so the marker means a ready composer.

Your commit is cherry-picked as-is onto this branch (authorship kept). I also corrected the SessionStart comment in bob-events.ts and updated the description. Closing trs-80#1 as merged.

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch 5 times, most recently from d95b472 to 9469e8f Compare October 15, 2026 12:49
@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 9469e8f to 11969b1 Compare October 16, 2026 17:22
@trs-80

trs-80 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@nwparker @brennanb2025 — could one of you approve the CI runs on two fork PRs? That's the only blocker right now; both are rebased on today's main and mergeable, and no workflow has ever been allowed to run on them (the September runs expired unapproved after 30 days).

#20397 is large (~130 files). If a smaller review unit would help, I'm happy to split it — detection + identity gate first (the part that's generic), then hooks + resume, then approval detection — just say which you'd prefer. Thanks!

@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch 2 times, most recently from e0a7cc1 to 8c8bb8d Compare October 21, 2026 02:08
@Harshad01

Copy link
Copy Markdown

@trs-80, any update here?
@brennanb2025, very excited for this! Having Bob as a first-class agent in Orca would be awesome. Looking forward to it.

@IgorTodorovskiIBM

Copy link
Copy Markdown

Looking forward to this too! What's left? Can we merge this in?

Adds IBM Bob Shell 2.x as a first-class Orca agent: launch, yolo, and trust
flags; identity-gated detection on every host; managed status hooks posted
through the shared curl command; hook-task-id resume; approval-modal and
composer recognition in every Bob locale; "IBM Bob" pane titles; and
opt-out-by-default on desktop and mobile agent lists.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trs-80
trs-80 force-pushed the feat/ibm-bob-integration branch from 19b2d01 to ecf7a9c Compare November 9, 2026 19:24
@trs-80

trs-80 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@IgorTodorovskiIBM @Harshad01 thanks for the interest! The code side is done: I just rebased this onto today's main. Main had reorganized much of the agent detection and hook code, so this was a substantial merge. Typecheck and lint are clean, and the Bob test suites pass. What's left is on the maintainer side: CI has never run on this fork PR because the workflow runs need approval.

@nwparker @brennanb2025 could one of you approve the workflow runs here and on #20401 when you get a chance? Both are rebased on current main and mergeable.

@jvillalobos22

Copy link
Copy Markdown

@trs-80 have you had luck getting the new bots feature to work with Bob?

This branch has not been deployed

No deployments
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.

7 participants