Skip to content

✨ feat(hetero-agent): server-side aiAgent.heteroIngest / heteroFinish + persistence handler#14444

Merged
arvinxx merged 5 commits into
canaryfrom
feat/hetero-server-ingest-2a
May 6, 2026
Merged

✨ feat(hetero-agent): server-side aiAgent.heteroIngest / heteroFinish + persistence handler#14444
arvinxx merged 5 commits into
canaryfrom
feat/hetero-server-ingest-2a

Conversation

@arvinxx

@arvinxx arvinxx commented May 5, 2026

Copy link
Copy Markdown
Member

πŸ’» Change Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ‘· build
  • ⚑️ perf
  • βœ… test
  • πŸ“ docs
  • πŸ”¨ chore

πŸ”— Related Issue

Fixes LOBE-8535 β€” phase 2 of the Cloud Claude Code integration (parent: LOBE-8516).

Builds on:

  • LOBE-8522 (phase 0: shared producer + desktop wiring) βœ… merged
  • LOBE-8523 (phase 1a: lh hetero exec standalone CLI) βœ… merged

Unblocks:

  • LOBE-8523 phase 1b (CLI BatchIngester β†’ trpc.aiAgent.heteroIngest)
  • Phase 3 (cloud sandbox routing)

πŸ”€ Description of Change

Wires lh hetero exec producer streams (CC / Codex CLIs) into the existing server-side stream fanout, with full DB persistence, so cloud-side renderers receive the same wire shape as gateway-driven runs.

Phase 2a β€” endpoint + stream fanout

  • aiAgent.heteroIngest and aiAgent.heteroFinish tRPC procedures, sharing aiAgentProcedure (auth + serverDB + service injection)
  • topicId is required (operationId reverse-lookup is unreliable per LOBE-8516 design decision)
  • Server StreamEvent.type reconciled with AgentStreamEventType from @lobechat/agent-gateway-client so tool_execute / tool_result land natively
  • Sequential publish preserves stepIndex ordering across batches

Phase 2b β€” HeterogeneousPersistenceHandler (server-side DB writes)

Mirrors src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts (1.8k lines) for DB concerns only. Renderer keeps its own copy for desktop-host concerns (IPC, store dispatch, notifications); cloud / CLI ingest goes through this handler instead.

  • 3-phase tool persist (assistant.tools[] pre-register β†’ tool message create β†’ backfill result_msg_id)
  • Subagent threads: lazy-create on first tagged chunk + per-turn assistant chaining + finalize on parent tool_result with terminal assistant
  • Step boundaries: stream_start { newStep: true } flushes prior content and chains a new assistant off the last tool message
  • Per-turn metadata persistence (step_complete phase=turn_metadata)
  • TodoWrite synth: pluginState.todos from adapter passes through updateToolMessage transparently
  • Module-level state map keyed on operationId; idempotency via (stepIndex, type, timestamp). Multi-replica caveat documented β€” phase 3 sandbox owns the endpoint per-instance so sticky routing is implicit.

Phase 2b' β€” full renderer event-branch parity

  • Echo suppression: when CC streams an AuthRequired error string into content BEFORE emitting the structured error, suppress the duplicate (mirrors renderer's shouldSuppressTerminalErrorEcho)
  • 34 branch-coverage tests against every event variant the renderer dispatches on (step_complete phases, stream_start with/without newStep, stream_chunk text/reasoning/tools_calling Γ— main/subagent, all no-op variants, terminal error echo handling, subagent edge cases)

Phase 2c β€” CC sessionId persistence + resume helper

  • ChatTopicMetadata.heteroSessionId docstring updated: shared field for desktop and cloud paths (was tagged "desktop only")
  • handler.finish() accepts sessionId and writes it via TopicModel.updateMetadata (merges, preserves runningOperation peer)
  • HeterogeneousAgentService.getHeterogeneousResumeSessionId(topicId) helper β€” phase 3 cloud sandbox routing uses it to inject --resume <id> on the next CLI spawn

πŸ§ͺ How to Test

  • Tested locally β€” full vitest sweep (66 hetero-agent + 16 router tests, 0 regressions)
  • Added/updated tests β€” 66 new tests across 5 spec files
  • No tests needed

Test breakdown:

src/server/services/heterogeneousAgent/__tests__/
β”œβ”€β”€ index.test.ts                                    8 tests  β€” service: ingest order, persist-then-publish, error propagation
β”œβ”€β”€ HeterogeneousPersistenceHandler.test.ts         13 tests  β€” bootstrap, idempotency, 3-phase persist, subagent lifecycle, terminal events
β”œβ”€β”€ HeterogeneousPersistenceHandler.eventBranches.test.ts  34 tests  β€” every renderer event variant (renderer parity)
β”œβ”€β”€ HeterogeneousPersistenceHandler.fixture.test.ts  2 tests  β€” replay .heerogeneous-tracing/cc-streaming.json (502 events, 71 tool uses)
└── sessionResume.test.ts                            9 tests  β€” sessionId persistence + getHeterogeneousResumeSessionId
src/server/routers/lambda/__tests__/aiAgent.heteroIngest.test.ts  7 tests  β€” procedure β†’ service wiring + schema validation

The fixture-driven test is the strongest end-to-end check β€” it replays a real CC run captured from .heerogeneous-tracing/cc-streaming.json and asserts that the resulting message tree has the right shape (71 tool uses β†’ 71 tool messages with content from tool_results, no duplicates, proper parent chain).

Manual sanity check held for phase 1b (LOBE-8523 follow-up) when the CLI BatchIngester lands β€” at that point lh hetero exec --topic <id> --operation-id <id> against a local dev server can drive a full end-to-end run.

πŸ“ Additional Information

Out of scope (held for follow-ups):

  • Phase 3 β€” cloud sandbox routing + medium-lived JWT signing (LOBE-8516)
  • Extracting common persistence logic shared between renderer + server (phase 4)
  • ACP-mode ingest (separate track)

Architecture notes:

  • Documented in .heerogeneous-tracing/cc-stream-chain-reference.md (full raw β†’ adapter β†’ executor β†’ DB mapping)
  • Persistence handler matches the renderer 1:1 on every dispatched event branch β€” verified by the eventBranches test suite

πŸ€– Generated with Claude Code

arvinxx and others added 4 commits May 6, 2026 00:38
…res (LOBE-8535 phase 2a)

Wires `lh hetero exec` producer streams into the existing StreamEventManager
fanout: events flow CLI β†’ tRPC β†’ Redis Stream β†’ gateway WS β†’ renderer with
the same wire shape as gateway-driven runs.

- Reconcile server StreamEvent.type with @lobechat/agent-gateway-client's
  AgentStreamEventType so tool_execute / tool_result land natively
- HeterogeneousAgentService skeleton with sequential publish (preserves
  stepIndex ordering) + terminal agent_runtime_end fallback on finish
- Inline Zod schemas on aiAgentProcedure; topicId required (operationId
  reverse-lookup unreliable per LOBE-8516 design decision)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…de DB writes (LOBE-8535 phase 2b)

Mirrors src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts
(1.8k lines) for the DB concerns. Renderer keeps its own copy for
desktop-host concerns (IPC, store dispatch, notifications); cloud / CLI
ingest goes through this handler instead.

- 3-phase tool persist: pre-register tools[] β†’ create role:'tool' message
  β†’ backfill result_msg_id (mirrors persistToolBatch lines 319–411)
- Subagent threads: lazy-create on first tagged chunk + per-turn assistant
  chaining + finalize on parent tool_result with terminal assistant
- Step boundaries: stream_start { newStep: true } flushes prior content
  and chains a new assistant off the last tool message
- Per-turn metadata persistence (step_complete phase=turn_metadata)
- Module-level state map keyed on operationId; idempotency via
  (stepIndex, type, timestamp). Multi-replica caveat documented β€” phase 3
  sandbox owns the endpoint per-instance so sticky routing is implicit.

Tests:
- 13 unit tests with fake-models harness covering bootstrap, idempotency,
  3-phase persist, step boundaries, subagent lifecycle, terminal events
- 2 fixture-driven tests replaying .heerogeneous-tracing/cc-streaming.json
  (502 events, 71 tool uses) end-to-end with idempotency assertions

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ThreadStatus / ThreadType / AgentRuntimeErrorType are used as values, not
just types β€” the post-commit linter incorrectly converted the import to
`import type`, which broke the build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ume (LOBE-8535 phase 2b' + 2c)

Renderer-parity additions to HeterogeneousPersistenceHandler:
- Echo-suppression: when CC streams an AuthRequired error string into
  `content` BEFORE emitting the structured error, the assistant ends up
  with both. Mirror the renderer's `shouldSuppressTerminalErrorEcho` logic
  (lines 113–130 of heterogeneousAgentExecutor.ts) so we keep only the
  structured error in those cases. Trigger conditions: `AuthRequired` code
  or explicit `clearEchoedContent` flag.
- 34 new branch-coverage tests against every event variant the renderer
  dispatches on (step_complete phases, stream_start with/without newStep,
  stream_chunk text/reasoning/tools_calling Γ— main/subagent, all no-op
  variants, terminal error echo handling, subagent edge cases).

Phase 2c β€” session id persistence + resume helper:
- ChatTopicMetadata.heteroSessionId docstring updated: it's now the shared
  field for desktop and cloud paths (was tagged "desktop only").
- handler.finish() now accepts `sessionId` and writes it via
  TopicModel.updateMetadata (merges, preserves runningOperation peer).
- HeterogeneousAgentService passes sessionId through, exposes
  `getHeterogeneousResumeSessionId(topicId)` helper for phase 3 cloud
  sandbox routing to inject `--resume <id>` on the next CLI spawn.
- 9 tests covering happy path, missing session id, error result still
  persists, peer-field preservation, updateMetadata failure isolation,
  and the resume helper's lookup paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment May 5, 2026 5:32pm

Request Review

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. feature:agent Assistant/Agent configuration and behavior feature:api API endpoint and backend issues labels May 5, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @arvinxx, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d372e5bd44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/server/services/heterogeneousAgent/HeterogeneousPersistenceHandler.ts Outdated
Comment thread src/server/services/heterogeneousAgent/HeterogeneousPersistenceHandler.ts Outdated
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.60120% with 16 lines in your changes missing coverage. Please review.
βœ… Project coverage is 68.78%. Comparing base (10300ba) to head (dfb7f29).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@             Coverage Diff             @@
##           canary   #14444       +/-   ##
===========================================
- Coverage   81.75%   68.78%   -12.97%     
===========================================
  Files         667     2501     +1834     
  Lines       44262   215018   +170756     
  Branches     6517    22628    +16111     
===========================================
+ Hits        36185   147910   +111725     
- Misses       7933    66964    +59031     
  Partials      144      144               
Flag Coverage Ξ”
app 63.02% <97.60%> (?)
database 92.37% <ΓΈ> (?)
packages/agent-runtime 79.94% <ΓΈ> (ΓΈ)
packages/builtin-tool-lobe-agent 83.41% <ΓΈ> (ΓΈ)
packages/context-engine 83.88% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.43% <ΓΈ> (ΓΈ)
packages/file-loaders 87.60% <ΓΈ> (ΓΈ)
packages/memory-user-memory 74.74% <ΓΈ> (ΓΈ)
packages/model-bank 99.94% <ΓΈ> (ΓΈ)
packages/model-runtime 83.86% <ΓΈ> (ΓΈ)
packages/prompts 69.57% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/types 5.05% <ΓΈ> (ΓΈ)
packages/utils 88.02% <ΓΈ> (ΓΈ)
packages/web-crawler 88.29% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 66.77% <ΓΈ> (βˆ…)
Services 53.80% <ΓΈ> (βˆ…)
Server 70.26% <97.50%> (βˆ…)
Libs 53.81% <ΓΈ> (βˆ…)
Utils 79.95% <ΓΈ> (-13.53%) ⬇️
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…after-success + portable fixture (PR #14444 review)

Three issues from PR review:

1. **Idempotency key collision** β€” the old `(stepIndex, type, timestamp)`
   triple collided when CC bursts multiple `stream_chunk` events through
   the same step within a single `Date.now()` millisecond. Later chunks
   got dropped as duplicates β†’ silent assistant truncation. Now keys
   include a stable FNV-1a fingerprint of `event.data`, so distinct
   payloads stay distinct even at the same timestamp.

2. **Mark-processed-before-handle** β€” `processedKeys.add(key)` ran BEFORE
   `handleEvent`, and ingest swallowed throws. A transient DB error in
   any per-event write was silently lost: the event was marked done,
   the BatchIngester acked OK, retries skipped it, content was gone.
   Now: mark only after successful handling + propagate throws all the
   way to the BatchIngester so the batch retries. Idempotency map
   dedupes the events that already succeeded earlier in the batch.

   Knock-on: removed every `.catch(log)` from per-write paths. Renderer's
   "log + continue" posture doesn't fit the server (authoritative for
   cloud runs, silent partial writes diverge DB from WS view).

3. **Portable fixture** β€” `.heerogeneous-tracing/cc-streaming.json` is
   gitignored and missing in CI, so the fixture-driven test couldn't run.
   Replaced file IO with a synthetic stream that captures the same
   characteristics (multi-step, bursty same-millisecond text chunks,
   tool_use β†’ tool_result pairs, step boundaries, terminal event). The
   synthetic fixture is also more meaningful β€” it has explicit assertions
   about chain-shape and bursty-text dedupe correctness.

Tooling adjustments to support the new contract:

- `persistToolBatch` restructured: payloads de-dup by id (so retries
  don't duplicate); `persistedIds` populated only AFTER successful
  per-tool create; phase 1 + phase 3 always run (idempotent re-writes)
  so a partial-failure retry can complete missed phase 3 backfills.
- `ensureSubagentRun`: thread/user/first-assistant create errors throw
  out instead of returning `undefined` and dropping the run.
  `ThreadModel.create` already uses `onConflictDoNothing` on id, so
  retrying the same generated id is safe.

Tests added (69 hetero-agent tests, was 66):
- Bursty same-timestamp distinct-content text chunks β†’ all preserved
- Mark-processed-after-success retry contract (transient flake recovery)
- Synthetic fixture replays a multi-step CC-shaped run with chain-shape
  + idempotency + partial-batch retry assertions

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arvinxx arvinxx merged commit 0e6eba6 into canary May 6, 2026
35 checks passed
@arvinxx arvinxx deleted the feat/hetero-server-ingest-2a branch May 6, 2026 02:30
Innei added a commit that referenced this pull request May 9, 2026
# πŸš€ LobeHub Release (20260509)

**Release Date:** May 9, 2026  
**Since v2.1.56:** 236 merged PRs Β· 19 contributors

> Agent Task System reaches general availability, the Agent Signal
pipeline runs nightly self-review with skill-aware policies, the
heterogeneous-agent runtime crosses replica boundaries, inline documents
become a first-class context source, and bot platforms expand across
Messager, Line, and Telegram.

---

## ✨ Highlights

- **Agent Task System (GA)** β€” End-to-end task execution platform:
templates, tracking, comment tools, parent reassignment, scheduled cron,
and dependency-ordered batch runs. (#14540, #14515, #14517, #14272,
#14246, #14418, #14403, #14488)
- **Agent Signal nightly self-review** β€” Wired self-review loop with
prompt + DB support, exponential-backoff retry on receipt listing,
skill-aware policy, and improved skill-intent detection. (#14543,
#14542, #14281, #14409, #14526, #14437)
- **Inline documents in KB tool** β€” BM25 search and `docs_*` read for
inline document grounding; agent documents usable as VFS. (#14494,
#14222)
- **Inline agent cards in chat** β€” `lobeAgents` markdown tag renders
agent profile cards inline; clickable card after `createAgent`. (#14495,
#14493)
- **Heterogeneous agent runtime** β€” Cloud hetero exec pipeline steps 3+4
land, persistence recovers across Vercel replicas, server-side
ingest/finish handler, and `lh hetero exec` CLI. (#14486, #14539,
#14444, #14431)
- **Bot platforms expand** β€” Messager, Line, DM pair policy, and
messenger DB tables; Telegram API path restored. (#14442, #14207,
#14211, #14496, #14519)
- **Visual analysis tool** β€” New visual understanding tool, with trigger
tracking and flattened schema. (#14378, #14399, #14550)
- **DeepSeek V4 Pro as OSS default** β€” OSS deployments ship with
DeepSeek V4 Pro by default; DeepSeek Anthropic runtime supported.
(#14555, #14312)

---

## πŸ—οΈ Core Agent & Architecture

### Agent Task System

- **Task System GA** β€” End-to-end execution platform now available.
(#14540)
- **Templates, comments, reparenting** β€” Template tracking, comment
tools, and parent reassignment. (#14515, #14517, #14488)
- **Cron + dependency-ordered runs** β€” Scheduled status with cron editor
and dependency-ordered subtask batches. (#14246, #14418, #14272)
- **Inspector + chip UI + batch tasks** β€” Task Inspector/Render
registry, batch `createTasks`/`runTasks`, and chip-based agent-documents
inspector. (#14403, #14404)
- **Recommend templates regardless of brief count** β€” Recommendations no
longer suppressed when briefs are sparse. (#14508)
- **Scheduling resilience** β€” Manual run no longer eats next scheduled
tick; recurring tasks survive brief resolution. (#14304, #14348)
- **Brief synthesis** β€” Auto-synthesize topic briefs; brief actions
revamp; mute resolved-brief icon on home. (#14324, #14228, #14452)
- **Task list & detail polish** β€” Topic operation ID exposed; task
drawer Gateway reconnect. (#14282)

### Agent Signal pipeline

- **Nightly self-review wired** β€” Prompt + DB support for the
self-review loop. (#14543)
- **Self-review activities push to briefs** β€” Activities during nightly
self-reflection now create briefs. (#14437)
- **Skill management policy** β€” New policy for Skill management running
inside Agent Signal. (#14281)
- **Skill intent detection & routing** β€” Improved detection plus direct
intent handling when `hintIsSkill`. (#14409, #14526)
- **Document tool outcome rendering** β€” Decision view restores missing
document tool outcomes. (#14534)
- **Exponential backoff retry** β€” Listing signal receipts retries with
jittered backoff. (#14542)
- **Easier-to-use signals** β€” Structural simplification +
recent-activities surface for receipts. (#14290, #14326, #14407)

### Heterogeneous agent runtime

- **Cloud hetero exec pipeline (steps 3 + 4)** β€” Refactor lands the next
two stages of the cloud hetero agent execution pipeline. (#14486)
- **Persistence recovery on Vercel** β€” Hetero state recovered across
replica boundaries. (#14539)
- **Server-side ingest/finish + persistence** β€” `aiAgent.heteroIngest` /
`heteroFinish` handlers. (#14444)
- **`lh hetero exec` CLI** β€” Standalone heterogeneous agent runs from
CLI. (#14431)
- **Gateway round-trip loading** β€” `execAgentTask` keeps the input box
in loading state through the full round-trip. (#14503)
- **Provider SDK type routing** β€” Provider routing now respects SDK
type. (#14520)
- **DeepSeek reasoning preserved** β€” `reasoning_content` preserved in
OpenAI-compatible runtime for DeepSeek models. (#14546)

### Knowledge & inline docs

- **KB tool BM25 + docs read** β€” BM25 search and `docs_*` read
integrated for inline documents. (#14494)
- **Agent documents as VFS** β€” FS-compatible output for agent documents.
(#14222)
- **`lobeAgents` markdown tag** β€” Inline agent cards rendered from a
markdown tag. (#14495)
- **Clickable agent card after `createAgent`** β€” Mentions and
recommendations become clickable. (#14493)
- **ExplorerTree** β€” Generic tree component built on `@pierre/trees` for
reusable explorer surfaces. (#14094)
- **Local file mention snapshots** β€” Mentions can now snapshot local
files. (#14278)

### Architecture

- **Agent Hono routes** β€” New agent routes added on Hono. (#14535)
- **`/api/agent` migrated to Hono** β€” Remaining `/api/agent` routes
finish their migration. (#14478)
- **Agent marketplace merged into web-onboarding** β€” Reduces package
fragmentation. (#14514)
- **Producer pipeline extracted** β€” Shared package for the producer
pipeline. (#14425)
- **`agentDispatcher.selectRuntimeType`** β€” New runtime selection
abstraction. (#14428)
- **pnpm v11 migration** β€” Workspace consolidated. (#14316)
- **Browser-compatible frontmatter parser** β€” Replaces `gray-matter`.
(#14435)

---

## πŸ“± Platforms & Integrations

- **Messager support** β€” New messager package wired into the chat
surface. (#14442)
- **Messenger DB tables** β€” IM bot integration gains its persistence
layer. (#14496)
- **Line bot** β€” Initial Line support and downstream optimization.
(#14207, #14448)
- **DM pair policy** β€” Group/DM pair-based delivery. (#14211)
- **Telegram API restored** β€” Missing Telegram API path reconnected.
(#14519)
- **xAI Responses tools stabilized** β€” Plus unsupported parameter
handling. (#14462, #14445)
- **Volcengine websearch via ResponseAPI** β€” Built-in websearch for
Volcengine. (#14216)

---

## πŸ€– Models & Providers

- **DeepSeek V4 Pro default for OSS** β€” OSS distribution defaults to
DeepSeek V4 Pro. (#14555)
- **DeepSeek Anthropic runtime** β€” Anthropic-shape runtime support for
DeepSeek. (#14312)
- **GPT-5.5 / GPT-5.5 Pro** β€” New OpenAI tier. (#14142)
- **Grok 4.20 / Grok 4.3 / LobeHub-hosted Grok 4.3** β€” (#14253, #14382,
#14446)
- **Gemma 4 + provider settings normalization** β€” (#13313)
- **gpt-image-2 + step-image-edit-2** β€” (#14253, #14329)
- **Model bank refresh + original-pricing display** β€” Batch model
updates and pricing surfaces. (#14070, #14391)
- **Hunyuan migrated to TokenHub for Hy3 Preview** β€” (#14108)
- **Reject lobehub model ids no longer in the bank** β€” (#14261)
- **Hide runtime-only aliases** β€” Runtime-only model aliases no longer
leak into the model picker. (#14552)

---

## πŸ–₯️ User Experience

### Onboarding

- **Shared prefix steps** β€” Language and privacy extracted as shared
prefix steps. (#14538)
- **Identity intervention card simplified** β€” Plus tool result renders
cleanup. (#14505, #14506)
- **Welcome polish + web-onboarding tool UI** β€” (#14475)
- **Templates fetched from market API** β€” (#14286)
- **Virtual model id for default onboarding model** β€” (#14311)
- **Skip / mode-switch footer behind feature flag** β€” Footer guarded for
desktop and web initialization. (#14560)

### Home & navigation

- **Home recents performance** β€” Recents refresh periodically and inline
task status; brief and task-template fetch overhead trimmed. (#14518,
#14516)
- **Home refactor + skill-connect recommendations** β€” Restructured home
with skill-connect recommendation system. (#14266, #14214)
- **Tasks in agent sidebar** β€” Tasks moved from welcome card into the
sidebar list. (#14500)
- **Sidebar collapse persists** β€” Home sidebar collapse state stored.
(#14473)
- **Agent-specific topic grouping** β€” Plus improved empty state and
agent identity in topic search. (#14225)
- **MentionMenu scroll fix** β€” Mention menu no longer clips inside chat
input. (#14533)

### Conversation & chat

- **Follow-up chips fill input** β€” Clicking a follow-up chip now fills
the input instead of sending immediately. (#14536)
- **Quick-reply chips below assistant messages** β€” (#14350)
- **Inline single-tool assistant group + leading sentence promotion** β€”
(#14244)
- **Assistant-group rendering** β€” Per-segment content overrides flow
into MessageContent. (#14504)
- **Tool call timer fix** β€” Timer no longer resets when tool calls
collapse or expand. (#14513)
- **Streaming re-render reduction** β€” Reference stabilization and
self-subscribing components. (#14470)
- **Topic chat drawer feedback input** β€” (#14392)

### Skills, agents, devtools

- **Managed skill folders** β€” Agent view displays managed skill folders
and aligns delete confirmations. (#14553)
- **Review tab + bulk git diffs** β€” New Review tab with bulk diffs;
gating uses effective working directory. (#14334, #14512)
- **Devtools gallery rebuild** β€” Plus Review polish, queue-tray images.
(#14423)
- **Agent mock devtools** β€” Playback & fixture viewer. (#14436)

### Desktop & CLI

- **App tray visibility setting** β€” (#14463)
- **Notification settings in desktop** β€” (#14491)
- **Multimodal input across CLI / shared spawn / desktop** β€” (#14433)
- **CLI bot + userId guide** β€” (#14258)

---

## πŸ”§ Tooling

- **Visual analysis tool** β€” New visual understanding tool with
flattened schema. (#14378, #14550)
- **GitHub marketplace tool UI** β€” (#14420)
- **Drop "Local" prefix and `____builtin` suffix from tool names** β€”
(#14364, #14289)
- **Sanitize provider tool names** β€” Avoids invalid characters from
external providers. (#14510)
- **Generation moderation context** β€” Moderation context passed through
the generation pipeline. (#14541)
- **Visual analysis trigger tracking** β€” (#14399)
- **Claude thinking signature sanitization** β€” History signatures
sanitized when replaying Claude conversations. (#14499)
- **Responses input media sanitization** β€” Assistant media sanitized in
Responses input. (#14497)

---

## πŸ”’ Security & Reliability

- **Security:** Removed the `/webapi/proxy` route and dead URL-manifest
plugin code to shrink the SSRF surface. (#14549)
- **Security:** Sessions revoked after password reset. (#14424)
- **Reliability:** Added `prompt_cache_key` to OpenAI chat requests for
stable cache hits. (#14349)
- **Reliability:** `onFinish` now fires even when the browser tab is
backgrounded mid-SSE stream. (#14461)
- **Reliability:** Better-auth session refetch preserves user fields
rather than overwriting them. (#14531)
- **Reliability:** User-memory queries sanitize backticks; user-memory
errors now explicitly injected so failures stay visible. (#14524,
#14525)
- **Reliability:** Auth captcha retries handled; input loading unsticks
on `auth_failed` and recoverable `auth_expired`. (#14346, #14419)
- **Reliability:** Trace snapshot finalized on error path. (#14440)
- **Reliability:** Drop `switchTopic` race under rapid sidebar clicks.
(#14115)
- **Reliability:** PDF chunking logic fixed to prevent vectorization
failure. (#14327)
- **Performance:** Marketplace fork uses a batched API for parallel
installs. (#14537)
- **Performance:** Review tab open latency cut ~9Γ— on large dirty trees.
(#14338)

---

## πŸ‘₯ Contributors

Huge thanks to **18 contributors** who shipped **236 merged PRs** this
cycle.

@hezhijie0327 Β· @sxjeru Β· @yueyinqiu Β· @octo-patch Β· @hardy-one Β·
@Coooolfan Β· @CanYuanA Β· @BillionClaw Β· @arvinxx Β· @tjx666 Β· @Innei Β·
@neko Β· @AmAzing129 Β· @rdmclin2 Β· @lijian Β· @sudongyuer Β· @rivertwilight
Β· @cy948

Plus @lobehubbot for i18n and translation maintenance.

---

**Full Changelog**:
v2.1.56...release/weekly-20260509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature:agent Assistant/Agent configuration and behavior feature:api API endpoint and backend issues size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant