Repository navigation
feat(server): title background-task work-log rows with the task name - #3751
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Background-task work-log rows are now titled with the task's actual name instead of generic labels.
task.progressactivities use the task description ("Typecheck mobile app") as their summary andpayload.titleinstead of "Reasoning update", andtask.completedactivities get apayload.titletoo, via a small per-(threadId, taskId) description cache in ingestion — terminal task notifications don't carry the name themselves.task.completedalso now emitspayload.summaryalongsidepayload.detail, mirroringtask.progress, so clients render "name - completion summary".Why
Providers stream named background work units (subagents, background shells, workflows), but the work log flattened them into anonymous "Reasoning update" / "Task completed" rows, making it impossible to tell what's actually running. The fix is confined to the provider-agnostic ingestion layer in
apps/server— clients already preferpayload.title/summary/detailwhen labeling rows, so web and mobile pick the names up with zero client changes and no provider-specific logic anywhere new.Edge cases covered: descriptions that trim empty fall back to the old labels; the cache is bounded (capacity + TTL), swept with the other per-thread caches on session exit, and lookups don't consume entries so replayed terminal events stay titled.
Tested via two new ingestion tests (named progress/completion, and completion titled from
task.startedalone); server orchestration suite passes 153/153, plus web session-logic and mobile threadActivity suites. Reviewed by two independent agent reviews; all findings addressed.Checklist
🤖 Generated with Claude Code
Note
Low Risk
Localized projection/activity shaping in ingestion with fallbacks and tests; no auth, API contract breaks, or client changes required.
Overview
Background-task work-log rows now show the provider’s task description instead of generic labels like “Reasoning update” or unnamed “Task completed”.
In
ProviderRuntimeIngestion, descriptions fromtask.started/task.progressare stored in a bounded per-(threadId, taskId)cache.task.progressuses the trimmed description for the activitysummaryandpayload.titlewhen present (otherwise the old “Reasoning update” label).task.completedgetspayload.titlefrom that cache, with a fallback that scans already-persistedtask.started/task.progressactivities when the cache was cleared (e.g.session.exited). Completion activities also setpayload.summaryandpayload.detailfrom the terminal summary, matchingtask.progressso clients can show “name — completion text” without app changes.Cache keys for the thread are invalidated alongside other per-session ingestion state on session exit; new ingestion tests cover named progress/completion, start-only naming, and post-sweep recovery.
Reviewed by Cursor Bugbot for commit 6485746. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Title background-task work-log rows with the task name in
ProviderRuntimeIngestiontask.progressactivities now use the task description as their summary and include apayload.titlefield;task.completedactivities include apayload.titlesourced from previously seen descriptions, pluspayload.summaryandpayload.detailwhen a completion summary is available.threadId+taskId) whentask.startedortask.progressevents are ingested, and the cached title is passed intoruntimeEventToActivitiesat completion time.session.exitedevent, the title is recovered by scanning persistedOrchestrationThreadActivityentries in reverse order via the newfindTaskTitleInActivitieshelper.clearTurnStateForSessionnow also invalidates task description cache entries for the thread alongside other per-thread caches.Macroscope summarized 6485746.