Skip to content

Add Companion mode for Claude Code 0.2.13 - #77

Open
alex-w-99 wants to merge 5 commits into
mainfrom
feat/skip-webhook-reconcile
Open

alex-w-99 wants to merge 5 commits into
mainfrom
feat/skip-webhook-reconcile

Conversation

@alex-w-99

@alex-w-99 alex-w-99 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Executive Summary

Add durable Companion mode conversation initialization to Claude Code bridge 0.2.13.

  • Load complete available group history in one input before processing live messages.
  • Preserve isolated sessions and fixed group replies, including inkbox_reply_companion.
  • Pin development and PR-CI SDK builds to an exact public source revision.

Description

The receiver journals initialization and live work before acknowledgement and feeds one complete input through the native Claude session queue. Replies retain a stored email reply-all parent or messaging conversation; ambiguous host outcomes pause instead of being replayed. History and approval parsing stay separate, while current grant and sponsor permission are checked again before sending. Current main's A2A progress, voice/audio support and bounded dependency-install retry behavior are preserved.

PR unit and contract jobs fetch and verify public SDK commit 449966c885208d41f995d09c54072e012df9eb1a, build sdk/python into a wheel, and install it alongside the bridge. The development-only uv source override and regenerated lock use the same revision. Package requirements and installed-version checks still require inkbox>=0.7.3,<1.0.0.

Reason

A group agent needs complete available history, ordered follow-ups and restart recovery that does not repeat uncertain work. Immutable SDK source builds make this prerelease behavior testable without claiming registry publication.

Decisions

  • Host input: Keep one complete initialization input with a configurable 200000-byte default instead of truncating or splitting history.
  • Replies: Use a current-conversation tool and immutable per-turn targets for both automatic and tool replies.
  • Dependencies: Build the exact public SDK revision in PR CI and lock it for development; retain the runtime floor and existing checks.
  • Recovery and configuration: Pause uncertain outcomes and preserve the identity's current Companion setting during installation.

Testing

  • Exact public SDK checkout and wheel build succeeded; regenerated uv.lock passes uv lock --check.
  • Three paginated-history/group-reply cases passed with that wheel through the actual queue and mocked Claude query boundary: exactly one query per channel with complete context and fixed group targeting.
  • Post-merge focused checks: 94 source cases and 39 installed-wheel cases passed, including lifecycle, A2A shutdown, SDK-threshold and host-interface checks.
  • Exercise inkbox_reply_companion, /health, duplicate/restart delivery and authorization changes: expect scoped replies, truthful local state, and no extra initialization or send after revocation.
  • PR CI run 35497437545 passed on b4710ec: Python 3.11/3.12/3.13 unit jobs and host contracts. The contract install explicitly uses the built wheel rather than the development Git-source override. CodeQL also passed. Published-registry installation and live channel/model acceptance remain unverified.

Readiness-triggered CI snapshot (2026-09-20 08:48 UTC)

Readiness-triggered Full stack e2e 35500002350 failed during dependency setup. The reusable canary and live installers still request registry inkbox==0.7.3, which is unavailable even after bounded retries. These paths need the same exact-source dependency handling as unit CI before tests can run; no live acceptance is established.

Companion PR stack

These peer PRs each target their own main; the coordinated set is now ready for review.

Review and release status

Ready for review. SDK/CLI 0.7.3 remains unreleased; SDK PR 190 and public source commit 449966c885208d41f995d09c54072e012df9eb1a are the dependency reference. Current-head unit/contract CI passed; any readiness-triggered live checks require their own completed results. Package publication and full live channel/model acceptance are not claimed.

Comment thread inkbox_claude/gateway.py
try:
self._companion.record_delivery_failure(envelope, failure_scopes)
except RuntimeError as exc:
return web.Response(status=503, text=str(exc))
Comment thread inkbox_claude/gateway.py
try:
result = self._companion_receiver().accept(envelope)
except ValueError as exc:
return web.Response(status=400, text=str(exc))
Comment thread inkbox_claude/gateway.py
except ValueError as exc:
return web.Response(status=400, text=str(exc))
except PermissionError as exc:
return web.Response(status=403, text=str(exc))
Comment thread inkbox_claude/gateway.py
except PermissionError as exc:
return web.Response(status=403, text=str(exc))
except RuntimeError as exc:
return web.Response(status=503, text=str(exc))
@alex-w-99 alex-w-99 changed the title Add durable Companion mode conversation initialization Add Companion mode for Claude Code 0.2.13 Sep 20, 2026
@blacksmith-sh

blacksmith-sh Bot commented Sep 20, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_email_intelligence/test_contact_crud_tool_use View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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.

2 participants