Skip to content

fix(agents): keep Claude Bridge continuation wakes out of chat - #1706

Merged
Alan-TheGentleman merged 3 commits into
mainfrom
fix/bridge-wake-visibility
Oct 3, 2026
Merged

Alan-TheGentleman merged 3 commits into
mainfrom
fix/bridge-wake-visibility

Conversation

@Alan-TheGentleman

@Alan-TheGentleman Alan-TheGentleman commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Current verification update — 85be8b30

The two candidate-introduced CI failures were reproduced with TMPDIR and PI_CODING_AGENT_DIR absent, then fixed by making the test fixtures self-contained. Only the two test files changed; production, workflow and assertions are unchanged.

  • RED: 2 matching CI errors; GREEN: 2 passed under the same absent-variable environment.
  • Writer and independent verifier: 192/192 focused tests, 4,625 passed / 0 failed / 34 Windows-only skips in the full offline suite; unit-tests, provider-contract and runtime-harness all passed.
  • Types: 186 recorded diagnostics, no regressions; parent repeated the two regression tests successfully.
  • Fixture correction native review review-7f2503525c51ec58 approved and acknowledged; earlier clean-range review remains recorded below.
  • The new remote CI run for 85be8b30 must pass before merge. The maintainer has explicitly authorized merge after those checks; no auto-merge or bypass is enabled.

Earlier failed local runs and the stopped isolation-incident verification below are historical evidence, not the current offline result. The earlier LIVE cleanup limitation remains unchanged.


Linked issue

Refs #1528

Follow-up to the lifecycle-preserving continuation introduced in #1631. This is a nonclosing reference to the approved issue.

PR type

Bug fix (type:bug).

Summary

  • Preserve Claude Bridge prompt preparation when waking an idle parent after a background subagent completes.
  • Hide only the exact generated Bridge wake identity in the chat renderer, including history/resume handling; retain the existing hidden custom-message path for native providers.
  • Keep the experimental live harness out of this PR and the package. Its six files were archived locally, not included in this branch.

Changes

File Change
extensions/gentle-agents.ts Bridge-specific idle wake routing and exact-identity rendering
tests/gentle-agents.test.ts Provider routing and wake lifecycle regressions
tests/bridge-wake-lifecycle.test.ts SDK lifecycle coverage
tests/bridge-wake-rendering.test.ts Real renderer coverage
docs/gentle-shell.md Document hidden Bridge continuation behavior
odd/tasks/bridge-only-agent-wake.md Original work-unit record

The branch starts at ac6715933287490307146fcc2131ceaea3374141 and contains only 03961d42 and 8f0cfea2, patch-equivalent to the two previously reviewed Bridge commits. Installer work from #1703 and experimental harness commits are excluded. Review scope: six files, 481 additions and 29 deletions (510 authored lines).

Test plan

  • PASS: node --experimental-strip-types --test tests/gentle-agents.test.ts tests/bridge-wake-rendering.test.ts tests/bridge-wake-lifecycle.test.ts — 192 passed, zero skipped, in an isolated environment.
  • PASS: node scripts/check-types.mjs — 186 recorded diagnostics, no regressions; this is not a zero-diagnostic result.
  • PASS: git diff --check against the base; replay patch IDs match the originals.
  • Native review of this exact clean range: approved and acknowledged (review-8ae84526bbb0fec9). Informational findings remain nonblocking follow-ups.
  • Historical, superseded local run (before the fixture correction): full node scripts/run-test-suite.mjs — 4,612 passed, 3 failed, 44 skipped; provider-contract and runtime-harness stages passed. Failures: agent-home.test.ts:31, review-host-relay-routing.test.ts:405, and :1317. The first is explained by the test invocation's GENTLE_PI_CONFIG_HOME override; the other two causes remain unverified.
  • An independent rerun was stopped before running any checks after an ambient package-manager inventory command violated the intended isolation. No corrected full-suite pass is claimed.
  • Previous unmodified Bridge trial observed successful automatic continuation with an invisible generated wake. Its overall result remains PARTIAL due to incomplete cleanup. It is supporting evidence, not a fresh live test of this rebased checkout.
  • Shellcheck/skill-loading tests: not applicable; no shell scripts or skills changed.

Manual trial

From a disposable project directory, start a fresh process using the path to this branch's checkout:

node /path/to/gentle-pi/bin/gentle-shell.mjs --link --package-root /path/to/gentle-pi

This uses the existing Pi agent directory and installed Bridge/authentication. It is not an isolated automated trial: normal session persistence, configured Claude Code hooks/plugins, and provider usage apply. The linked launcher does not rewrite Pi settings.json or auto-provision packages.

Select a claude-bridge model, request a background subagent task lasting a few seconds, and let the parent become idle. Verify that the parent continues automatically with the result and no synthetic wake message appears in the visible chat. No experimental harness is needed. This manual trial has not been run by the agent on this checkout.

Notes

The maintainer has now explicitly authorized merge after the CI correction and successful checks. The PR remains draft while the new CI run is pending; no admin bypass or auto-merge is enabled.

@Alan-TheGentleman Alan-TheGentleman added the type:bug Bug fix label Oct 3, 2026
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7f3978c7-6a3b-4187-855c-b2af993905ad
📥 Commits

Reviewing files that changed from the base of the PR and between ac67159 and 85be8b3.

📒 Files selected for processing (6)
  • docs/gentle-shell.md
  • extensions/gentle-agents.ts
  • odd/tasks/bridge-only-agent-wake.md
  • tests/bridge-wake-lifecycle.test.ts
  • tests/bridge-wake-rendering.test.ts
  • tests/gentle-agents.test.ts
 _________________________________________
< Make it work, make it right, make it 🥕. >
 -----------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

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

@Alan-TheGentleman
Alan-TheGentleman marked this pull request as ready for review October 3, 2026 13:42
@Alan-TheGentleman
Alan-TheGentleman merged commit cf3012f into main Oct 3, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant