Registry Mirror
Skip to content

Conversation

@leoreisdias

@leoreisdias leoreisdias commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Ask this session for Claude conversations in T3 Code, including idle conversations. Users opt in with install.sh --with-t3 and authorize Plannotator once. Agents keep their ordinary review, annotate and last commands.

Claude runs an ordinary Plannotator command
  optional Bash hook finds its exact tool-call owner in T3
    detached worker opens a connected review
      Ask and submitted feedback queue into that same conversation

The adapter uses T3's existing external MCP API. Default installs add no T3 hook; the Claude plugin and Plannotator skill keep their existing contracts. --without-t3 removes the optional hook while preserving other settings and credentials. Setup and routing limits are in apps/t3-code/README.md.

Evidence

  • Before: an ordinary Claude command in T3 opened a review without a connection to its originating conversation.
    After: live verification on T3 Nightly 0.0.46-nightly.20261008.2833 opened a connected review from plannotator annotate notes.md --gate; the rendered Ask panel returned T3-AUTO-HOOK-VERIFIED from the same conversation after Claude ended its turn.
  • Before: takeover regressions included another prompt's reply in the original question's answer and reread mutable text.
    After: both regressions pass; the bridge retains only completed, untruncated answers before the foreign prompt.
  • Before: CI failed on the new package’s missing test sandbox config and tests that loaded UI assets before the build.
    After: 231 tests pass locally with generated UI assets removed; all 65 compiled CLI/hook tests pass. CI now runs the connected-session proof explicitly against its compiled binary.
  • The OpenCode proof registry binds before the test selects the host port, preventing both from choosing the same port. The real-host OpenCode Inbox proofs and compiled T3 connected-session proofs passed in CI on ee32444e.
  • 309 focused tests and 6 DOM tests passed; platform-specific and compiled-only checks skip in the ordinary macOS run. Compiled build, affected typechecks and release-version consistency passed. Both previously failing test jobs, the OpenCode job, repository-wide typecheck and DOM checks passed in CI on ee32444e. The local checkout still reports the previously reproduced CodeMirror dependency conflict; its full test run had 6,867 passes and one HTML-server timeout, which passed alone.

Merge Danger

Door: two-way

Users can remove the hook with --without-t3; no destructive migration is involved.

Blast Radius: integration

Review attention: native tool-call ownership, OAuth-scoped delivery retries and the settings merge. Routing depends on T3's public timeline identity format; an incompatible mapping leaves the ordinary command unconnected. Automatic routing covers Claude Bash launches on macOS/Linux; plan-exit routing and other providers remain outside this change.

leoreisdias and others added 7 commits October 9, 2026 02:22
Preserve optional T3 installer flags in the shared update allowlist and retain the upstream lock check and Claude plugin opt-out. Incorporate the upstream iPhone app and workflow migration from backnotprop#1825, removing the obsolete failing iOS check.
…atch the mod's decisions

Follow-up to @leoreisdias's T3 Code integration (this PR), finishing the
review items on his branch.

- Hook gate: the installed command is wrapped in
  `case "$CLAUDE_CODE_ENTRYPOINT" in sdk*) … ;; esac`, so an interactive
  Claude session that loads the same settings never starts the binary
  (non-T3 Bash call: ~290 ms -> ~3 ms). The binary repeats the check as the
  first statement of the CLI entry and in prepareT3Hook. Failures are silent
  (`{}`, reason in t3-code/hook.log) instead of a systemMessage.
  parseT3HookCommand still recognizes the ungated form, so reinstall and
  uninstall replace it.
- Worker lifetime: a per-thread worker exits after 10 min with no open
  review, no pending delivery and no review request
  (PLANNOTATOR_T3_WORKER_IDLE_MS); a request that meets one that just exited
  is retried once. The OAuth token is read per request and a refused MCP
  session is reopened, so a new `t3 login` applies without stopping the
  worker; only a send already attempted under the old grant is refused, and
  refused or dead-server reviews stop being waited on.
- Feedback over 12 KB (T3 caps a message at 120,000 characters, which used
  to retry forever) goes to the review's feedback.md, worded as the mod does.
- Decision messages match the Claude Code mod's deliveryFor (tested against
  it): "Changes requested · N comments", singular "1 comment", LGTM / Done /
  Close only logged unless the annotate session is gated; the PR-platform
  post keeps its status line as "Review posted".
- Tool-call ids: Bedrock / Vertex ids (`toolu_bdrk_…`, `toolu_vrtx_…`) route.
- `last` skips messages from runs that have not finished (the run that
  called it).
- Uninstall stops running workers (dry run lists them), `--purge` removes
  t3-code/, and `plannotator t3 logout --url …` stops that endpoint's
  workers and forgets the grant.
- UI: the Ask panels key on an advertised `sessionBridge.interruptible:
  false` (pull poll body -> /api/ai/capabilities; absent for every other host
  and older servers) instead of `host === 't3'`.
- install.sh: a failing --with-t3 / --without-t3 step warns with the retry
  command and never aborts the install under `set -e`.
- Housekeeping: apps/t3-code moved to packages/t3-code (@plannotator/t3-code),
  loaded by the CLI as a package only for `t3` / `t3-hook`; both are in
  HIDDEN_SUBCOMMANDS with help entries; documented in AGENTS.md.

Co-authored-by: Leonardo R. Dias <47978193+leoreisdias@users.noreply.github.com>
Review follow-ups on @leoreisdias's T3 Code integration.

- A launch that never came up (no ready line within 60 s, or its CLI gone,
  e.g. the worker killed mid-open) is given up, so it no longer keeps a
  worker alive or passes to every later worker.
- The hook's 6.5 s abort now covers connecting to T3 as well, so a hanging
  endpoint fails quietly instead of running into Claude's 10 s hook timeout.
- The hook launch file is removed after one use, also when opening fails.
- Settled reviews drop their bridge token from launch.json at once; their
  folders are pruned on worker start and idle exit after 24 h (7 days for
  failed or refused ones).
- Uninstall removes settings.json.plannotator-t3.bak, the backup the hook
  install made.
- Docs: the gate also opens for `claude -p` (sdk-cli), other SDK apps and
  Plannotator's own Claude review jobs (~320 ms per Bash call for opted-in
  users there); a cwd below the thread root runs the ordinary blocking CLI;
  permission rules see the rewritten command (not checked live).

Co-authored-by: Leonardo R. Dias <47978193+leoreisdias@users.noreply.github.com>
@backnotprop
backnotprop merged commit 5d80bcb into backnotprop:main Oct 13, 2026
28 checks passed
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