Skip to content

Build durable agent collaboration, replies, and direct messages - #215

Merged
NarwhalChen merged 12 commits into
mainfrom
feat/background-agent-host
Jul 31, 2026
Merged

Build durable agent collaboration, replies, and direct messages#215
NarwhalChen merged 12 commits into
mainfrom
feat/background-agent-host

Conversation

@NarwhalChen

@NarwhalChen NarwhalChen commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move agent collaboration execution behind a durable Electron-main Agent Host with persisted jobs, explicit lifecycle events, identity fences, and no replay of interrupted provider actions
  • add first-class message replies across storage, rendering, projection, routing, and the native workspace:send_message tool
  • add deterministic private agent DMs with a sidebar entry point and a DM-only context inspector that separates injected context, discoverable channels and tools, runtime state, and opaque provider-owned state
  • route channel mentions and open-floor offers through the Host while preserving background delivery and conversation-specific typing state
  • fail direct jobs when the provider stream errors or finishes without actually sending a workspace message, instead of reporting a false completion
  • tolerate storage-free Web Bridge test environments while retaining tab-stable client ids in real renderers

Verification

  • pnpm --filter @convera/app test — 79 files passed, 495 tests passed, 1 real-provider integration test skipped by default
  • pnpm --filter @convera/app lint — 0 errors, 10 existing hook warnings
  • pnpm --filter @convera/app format
  • pnpm --filter @convera/app exec tsc --noEmit --pretty false --skipLibCheck
  • pnpm --filter @convera/app automation:typecheck
  • Web Bridge regression test passed under Node 24.4.1, matching the failing macOS runner major version
  • push hook reran formatting, lint, and the complete Vitest suite successfully

Real Electron automation

Ran the packaged Electron app through the repository atomic automation MCP with an isolated profile and a real Codex agent only; Claude was not executed.

  • Sage configured for codex-cli / gpt-5.6-sol used workspace:send_message and wrote DM_AUTOMATION_OK into its private DM
  • reply affordance preserved and displayed the quoted Sage message, including the jump-to-parent target
  • the same stable DM and durable Host state survived application relaunch
  • background work continued after navigating away; public #general showed neither the DM-only Context control nor Sage typing from the private conversation
  • a later Codex turn that emitted no workspace message was recorded as failed with The agent completed a direct offer without sending a message, validating the false-success guard

Boundaries

  • provider-native resumed history, provider hidden prompts, and sandbox internals intentionally remain opaque to the renderer
  • no real Claude run was performed
  • .planning/ and local automation profiles/artifacts are not part of this PR

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
foxyfox-docs Skipped Skipped Jul 31, 2026 2:32pm
foxyfox-website Skipped Skipped Jul 31, 2026 2:32pm

Request Review

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@NarwhalChen must be a member of the codefox-repo team on Vercel to deploy.
- Click here to add @NarwhalChen to the team.
- If you initiated this build, request access.

Learn more about collaboration on Vercel and other options here.

@NarwhalChen NarwhalChen changed the title Add durable background agents to channels Build durable agent collaboration, replies, and direct messages Jul 31, 2026
@vercel
vercel Bot temporarily deployed to Preview – foxyfox-website July 31, 2026 14:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – foxyfox-docs July 31, 2026 14:32 Inactive
@NarwhalChen
NarwhalChen merged commit 428ce89 into main Jul 31, 2026
5 checks passed
Sma1lboy added a commit that referenced this pull request Jul 31, 2026
The durable agent host from #215 only existed in the Electron main process, so
a browser session showed "Agent Host unavailable" and no agent ever ran. Three
pieces were missing, each of which alone was enough to break it:

- The dev harness built a runtime with no agent-host tools and never started a
  host.
- The web bridge did not expose the agent-host channels, so even a running host
  was unreachable.
- `window.agentHost` comes from the preload, which a browser does not have, so
  the client half was absent regardless of the backend.

Also drops the temporary open-floor dispatcher: #215 replaced it with a durable
job queue that fans out the same way and survives a restart, which is what that
code was standing in for.
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.

1 participant