[codex] add automatic thread labels
Summary
Thread labels are now durable, automatically generated metadata for the existing thread lifecycle.
- Adds the canonical
bug,feature,review, andnew-buildlabels to contracts, event decisions, projections, SQLite persistence, and migration coverage. - Generates a title and label on first turn and during title regeneration while preserving manually assigned labels.
- Adds manual label actions, label filtering, and label badges across web and mobile thread lists.
- Documents the feature and includes the requested before/after UI screenshots.
Why
Threads previously had no durable category, making it difficult to scan, filter, and recover the intent of a large thread list. This keeps classification close to the existing title-generation flow, persists it through the event-sourced server, and exposes the same behavior across clients.
Screenshots
| Before | After |
|---|---|
![]() |
![]() |
Validation
vp test run --exclude '**/.t3/**' apps/server/src/orchestration/decider.labels.test.ts apps/server/src/orchestration/projector.labels.test.ts apps/server/src/persistence/Migrations/037_ProjectionThreadsLabels.test.ts apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts apps/server/src/persistence/Layers/ProjectionRepositories.test.ts— 5 files, 17 tests passed.vp test run --exclude '**/.t3/**' apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts apps/server/src/textGeneration/TextGenerationPrompts.test.ts packages/shared/src/threadLabels.test.ts packages/client-runtime/src/state/threadReducer.test.ts apps/mobile/src/features/home/home-list-filter-menu.test.ts— 5 files, 101 tests passed.git diff --check FETCH_HEAD...HEAD— clean.
Model/harness: GPT-5.6 Luna via Cursor CLI.
Made with Cursor
[!NOTE]
Add automatic thread label assignment and label filtering across web and mobile
- Introduces a constrained
ThreadLabeltype (bug,feature,review,new-build) inpackages/contracts/src/thread.tsand shared display utilities inpackages/shared/src/threadLabels.ts.- LLM title-generation prompts (Claude, Codex, Cursor, Grok, OpenCode) are updated to also return a
label; the first-turn and regeneration flows inProviderCommandReactorapply the label to unlabeled threads viathread.meta.updatewith compare-and-set semantics.- A SQLite migration (
037_ProjectionThreadsLabels) adds a nullablelabelcolumn toprojection_threads; the projection pipeline, snapshot queries, and repositories all read/write this column.- Web sidebar (v1 and v2) and mobile thread list rows display a label badge and expose a context-menu action to set or clear a label when the environment advertises
threadLabels: truecapability.- Home screen, sidebar, and thread navigation sidebar all gain a Label filter menu to scope the visible thread list to a single label, hiding pending tasks when a label filter is active.
- Risk: existing thread rows will have
label: nulluntil the migration runs and the server re-generates or a user manually assigns a label.Macroscope summarized 66e44fe.
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
[!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:
9e17a40c-7f86-41e4-bcc2-5d874bb75b80You 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
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
This PR introduces a new thread labels feature with AI-generated classification, manual label management, and filtering across mobile and web apps. The scope includes database migration, modified text generation prompts, and cross-platform UI changes - substantial new functionality that warrants human review.
You can customize Macroscope's approvability policy. Learn more.

