feat: add Hermes-powered T3 Work
Stack
This is a cross-fork draft stacked directly on #4400 (codex/v1-v2-state-migration). Its parent is the current #4400 head, 80082809973557d1cec7f7107932a4db1d37f0e7.
Summary
- Add Hermes as a first-class orchestration-v2 provider with managed local serve startup, attachment to compatible running instances, reconnect/reconciliation, durable bindings, model/reasoning selection, command support, tool-call visibility, and provider error terminalization.
- Add the projectless T3 Work experience across web and mobile: dedicated workspace switching, fresh-context chats, unsettled/settled/pinned thread handling, Main, clear/delete history, replies, commands, settings, and non-git behavior.
- Add transport onboarding/import for recent Discord/Telegram/etc. sessions with an age control, canonical Work-project ownership, lazy durable history hydration, settlement classification, and profile-scoped reset/re-import.
- Add image/video/PDF/file uploads and rendering, imported Hermes cache media,
MEDIA:output handling, reply normalization, and safe durable asset access. - Expose T3 orchestration MCP to Hermes through authenticated, capability-scoped, lifecycle-revoked per-session leases so Hermes can delegate coding tasks to selected providers/models when the gateway advertises
session_mcp. - Add Hermes cron/proactive infrastructure and settings, Hermes ACP support for Code mode, and a disabled OpenClaw “Soon” gateway entry.
- Add a pinned Hermes conformance harness, sanitized protocol fixture, evidence template, and integration documentation.
Reliability and security
- T3 Work runs do not request Git filesystem checkpoints, preventing non-git chats from hanging in checkpoint baseline capture.
- Permanent provider-start failures terminalize instead of leaving threads stuck in Working.
- Import and full-history reset resolve the canonical Work project server-side, validate provider/profile ownership, preserve unrelated threads, and reject reset while mutations are unsettled.
- Import is disabled unless configured and requires an evidence-backed negotiated
profile.import+session.lifecyclecapability inventory; legacy gateways are not granted synthetic optional/mutating capabilities. MEDIA:ingestion is confined to canonical Hermes-owned cache roots by default. Additional roots require explicit operator configuration; traversal and symlink escapes are rejected.- MCP credentials are hashed, audience/capability checked, atomically rotated, and revoked with their thread/session lifecycle without breaking long-running sessions via wall-clock expiry.
- A forward migration repairs development databases that ran the earlier unscoped Hermes import ledger.
Verification
67changed test files passed,746tests total.- Typechecks passed for
@t3tools/contracts,@t3tools/shared,@t3tools/client-runtime,t3,@t3tools/web,@t3tools/mobile, and@t3tools/scripts. - Targeted lint, formatting,
git diff --check, and the staged commit hook passed. - Release review included adversarial coverage for cross-profile/provider reset isolation, forged project IDs, unsettled mutations, media traversal/symlink escape, long-lived MCP sessions, and multi-environment mobile routing.
Browser/dev-server/simulator testing was intentionally not run for this handoff. CodeRabbit CLI was installed but signed out, so its external review was unavailable; the branch received independent Sol-medium backend, client, security, and integration reviews instead.
Current protocol constraints
- T3 orchestration MCP delegation is enabled only when the connected Hermes gateway advertises safe ephemeral
session_mcplease support; the pinned legacy gateway remains correctly reported as blocked rather than receiving unsafe fallback behavior. - Remote Hermes endpoints remain subject to the connection-security policy and explicit authentication configuration.
- OpenClaw is visible but intentionally disabled as “Soon”; this PR includes the provider skeleton, not a production-enabled gateway.
UI Changes — Screenshots & demos
All media below is from live end-to-end runs against a real Hermes gateway (Codex OAuth, GPT‑5.5), through both T3 Work and T3 Code.
Demo videos
Full e2e pass — Hermes code work, attachments (image/PDF/file/video), MEDIA output, delegation:

Reload dedupe + attachment-only rendering verification (fresh and older Hermes Code threads render each message exactly once after hard reload):

Hermes in T3 Work
Image upload in a Work thread — Hermes describes the attached gradient:

Hermes generates an image via its terminal tool; the MEDIA: output renders as an image bubble:

Subagent delegation — spawn acknowledged once, then the result reported back:


Hermes tool inventory surfaced natively (delegate_task, cronjob, skill_manage, project tools, …):

Hermes model picker (provider models incl. Codex OAuth) with the "Delegated tasks" panel:

Session import
| Imported thread keeps its historical timestamp (6:47 AM) and settled state | Imported threads keep historical sidebar ages, not "now" |
|---|---|
![]() |
![]() |
Hermes in T3 Code
Hermes as a coding provider on a normal Code project — native Updated greet.py file-change activity, thread classified into the Code sidebar:

[!NOTE]
Add Hermes-powered T3 Work workspace with session import, cron, skills, and ACP driver support
- Introduces a T3 Work workspace mode alongside T3 Code in web and mobile sidebars, filtering threads by provider driver kind (Hermes vs others) and routing new conversations to a Hermes-backed project.
- Adds the
hermesprovider driver (HermesDriver.ts),hermesAcpACP driver (HermesAcpDriver.ts), andopenclawACP driver (OpenClawDriver.ts) to the built-in driver registry.- Adds a
HermesServeAdapterV2andHermesAcpAdapterV2orchestration adapter with full session/thread/turn lifecycle, MCP lease handling, and media persistence against a Hermes gateway (HermesServeAdapterV2.ts).- Implements Hermes session import (discovery, import, history reset), cron management, and skills browsing via new WebSocket RPCs and corresponding settings pages (HermesSessionImportService.ts, HermesCronSettings.tsx, HermesSkillsSettings.tsx).
- Adds chat composer support for file, PDF, and video attachments with provider-aware validation, inline video rendering, and updated markdown media rendering (ChatComposer.tsx, MarkdownMedia.tsx).
- Adds six new SQLite migrations (44–49) for Hermes session bindings, mutation intents, session imports, proactive events, and title/branch lineage.
- Introduces
HermesConnectionSecurityfor endpoint classification andHermesServeRuntimeto attach to or launch a local Hermes gateway process (HermesConnectionSecurity.ts, HermesServeRuntime.ts).- Risk: new migrations are irreversible; enabling the Hermes provider also sets the
enableHermesrollout flag and creates a T3 Work backing project automatically on first use.Macroscope summarized f024045.
[!NOTE] Medium Risk Work launches depend on correct Hermes/t3-work routing and
prepareWorkspace: falsepropagating through mobile outbox and turn bootstrap; server asset and Hermes remote/cron paths add security-sensitive surface area but include explicit fail-closed checks and tests.Overview Mobile gains a persisted T3 Work / T3 Code workspace switch in the home header, sidebar, and split layouts. Lists and pending outbox items are filtered by provider driver (Hermes vs coding providers) via new
mobileWorkspacehelpers; Work mode forces thread-list v2, shows an Inbox header, and hides project filters.Starting a task in Work resolves a Hermes backing project and model through
resolveHermesConversationTarget, opens a New conversation draft with preselected Hermes model, uses work-scoped composer drafts, and sendsprepareWorkspace: falsethrough the outbox andthread.turn.startbootstrap so routing-only projects do not run workspace prep. Code keeps the existing new-task flow. Hermes and OpenClaw provider icons are added to the thread list.Server changes in this diff extend signed asset URLs to workspace videos and browser artifacts (safe filenames,
O_NOFOLLOWstreaming), broaden attachment filename extensions, and addt3WorkDir/browserArtifactsDirderived paths. Hermes connection security assesses loopback vs remote endpoints (pairing token, TLS fingerprint, kill switches) and blocks unsupported remote verification. Hermes cron projects gateway capability inventory into list/mutate APIs with shared clients, operation-id deduplication, and execution provenance/deduping.Reviewed by Cursor Bugbot for commit f024045b1a181b231f3e994838016a9b5e570b08. Bugbot is set up for automated code reviews on this repo. Configure here.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
6b33c0a0-f987-409f-a66a-2f06feb8bd0eYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
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.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Needs human review
1 blocking correctness issue found. Diff is too large for automated approval analysis. A human reviewer should evaluate this PR.
You can customize Macroscope's approvability policy. Learn more.
I'm watching this and #4678 with attention and expectation. One unsure topic on both PRs is if either supports remote Hermes, which as become a very common Hermes setup nowadays.
pls ts needs to merge. we need a hermes integration!

