Repository navigation
Make AI task capture suggestion-only, expire suggestions in 2 days, and remove task execution - #11974
Conversation
…n 2 days Auto-generated tasks were landing directly in the user's task list through four independent paths. On one dogfood account, 121 of 124 surviving tasks were machine-written, and 340 of 353 accepted Candidates were accepted within 2 seconds of creation — machine acceptance, not a human gesture. Establish one invariant: an automatically extracted task is never written to the task list. Every AI-derived proposal is a pending Candidate that reaches the list only through an explicit user gesture. Backend: - capture_policy: drop the `auto_accept_silent` and `create_direct` outcomes. Self-reported model confidence now decides whether a proposal is worth surfacing, never whether it may bypass the user. - conversation_capture: stop create-then-accept, and handle policy rejection per item. A single ignored item no longer drops the whole conversation onto the legacy writer. - process_conversation: `_save_action_items` only proposes. The extracted items still live on `conversation.structured`, which is what the summary view renders. - Candidates carry a real `expires_at` (2 days), cleared on resolution so accepted rows survive as the audit link. Reads treat a lapsed pending Candidate as expired, deriving a deadline from `created_at` for rows written before the field existed, so the existing backlog ages out with no backfill. A Firestore TTL policy reclaims the storage. - Replaces the 14-day read-time freshness filter, which hid old suggestions without ever expiring them. Desktop: - No workflow mode routes captures onto legacy staging, whose end is automatic promotion. `.off` in particular is what /v1/candidates/control reports when its own read fails; a backend hiccup must not become unrequested tasks. Captures defer and retry instead. - Screen capture policy mirrors the backend change (both read the same frozen fixture). - Conversation summary: action items move directly under the summary and each carries an explicit "Add to Tasks". - Tasks page keeps category grouping in multi-select; only the row's selection control changes. Co-Authored-By: Claude Opus 5 <[email protected]>
…k card The notch/chat receipt existed to acknowledge a task Omi had already written into the user's list. Under I1 nothing is written without the user, so the receipt announced something that no longer happens. Surface the proposal instead. A new pending Candidate seen while listening posts a moment carrying the candidate id and description; chat renders it as a native card with "Add to Tasks", which resolves the candidate through the same accept path the Tasks page's Suggested section uses. - SuggestedTaskChatCard encodes/parses the card payload inside the message text, the way BackgroundAgentSummary already does, so a card survives a transcript reload with no schema change. - SuggestedTasksStore gains a shared instance: the Tasks page and the chat card accept from the same pending set, so accepting in one place removes the row from the other. - NotchMomentsCoordinator observes suggestions rather than created tasks. Undo becomes a no-op: there is no longer a write to retract. Co-Authored-By: Claude Opus 5 <[email protected]>
Tasks are a list the user keeps, not an agent surface. Both execute affordances are gone. The shipping one: "Execute with Omi" in the task detail panel, the inline "Execute" pill on each row, TasksPage.investigateTask, and TaskChatCoordinator.investigateInBackground. RecurringTaskScheduler goes with them — its only job was firing those investigations on a timer, and nothing ever called start(). The legacy one: the tmux/CLI Terminal Task Agent. TaskAgentManager and TaskAgentViews are deleted, along with the startup session-restore call and the "Terminal Task Agent" settings card — the last user-reachable remnant of a path that had no working launch button left. TaskAgentSettings keeps only what the surviving task chat thread uses: isChatEnabled, the working directory, and the canonical prompt. The dead agent* display goes too — status, plan, prompt, and edited-files rows in the detail panel and tooltip, the .execute action in TaskDetailPanelActionPolicy, and the agent column descriptions handed to the chat SQL tool, which otherwise invites queries against columns nothing writes. The local agent* SQLite columns are deliberately left in place. They are nullable and now unwritten, and GRDB decodes by name, so they cost nothing; dropping them needs a migration whose downside on a live user database is worse than the untidiness. Co-Authored-By: Claude Opus 5 <[email protected]>
Extraction wrote suggestions, but two capture kinds wrote ones nobody could read. The Suggested surface applies a 0.8 confidence floor; `direct_request` and `inferred_next_step` already gated on it, so below the floor they were ignored. `explicit_command` and `clear_commitment` did not, so a low-confidence item became a pending Candidate the surface would never show — stored forever, displayed never. That is the accumulation pattern that grew staged_tasks to five figures, and half of it was introduced when explicit_command stopped creating tasks and started proposing without picking up the floor. All four kinds now clear the same floor. What the policy admits, the user sees; anything below it is ignored rather than quietly stored. Fail-closed stays fail-closed: extraction that omits confidence still scores below the floor and is dropped. test_conversation_suggestion_visibility walks policy → Candidate → suggested projection for every capture kind, so "a Candidate exists" can no longer pass for "the user was offered something". Two further I1 gaps the desktop suite surfaced: - CanonicalScreenCandidateDelivery accepted its own candidate when the outcome said so. Inert once the policy stopped emitting those outcomes, but `accept` remained on the capture client's protocol. Both are gone: the capture pipeline now has no way to accept anything. - ScreenCapturePolicy had the outcome change but not the floor, so the two policies would have disagreed. They share one frozen fixture, which is what caught it. Also repoints the `recurrence` writer class at TasksStore, which owns recurrence rollover now that RecurringTaskScheduler is deleted. Co-Authored-By: Claude Opus 5 <[email protected]>
…h the removals
Review pass over the branch (glm-5.3 via omp), findings verified independently.
The serious one: removing the legacy action-item writer also removed the
module-level TRANSCRIPT_CHUNK_INDEXING_ENABLED that happened to sit directly
after it, while leaving its use in the finalization pipeline intact. Every
conversation finalization would have raised NameError. Transcript-chunk
indexing has nothing to do with action items; the deletion was collateral.
Confirmed by reproduction: the name is defined on origin/main, absent at the
previous commit, and test_process_conversation_usage_context fails 7 there and
passes 40 here. That suite escaped the earlier sweep because its filename is
test_process_conversation_*, not test_conversation_*.
User-visible: the notch pill was the sole renderer for the suggestion moment
and drew notification.title raw, so it showed the encoded card payload —
candidate id and all — to the user, beside an Undo button wired to a
now-empty handler. It parses the card now, shows the description, and offers
Review only; there is nothing to undo because nothing was written.
The suggestion moment also lost both guards the receipt path had: ids were
never seeded and the 120s freshness gate was gone, so a store load landing
mid-conversation could announce a days-old proposal as if Omi had just made
it. Restored as a pure function with regression tests.
The e2e conversation test still asserted extracted items land in
users/{uid}/action_items — the exact write I1 forbids — and patched three
attributes the branch had deleted.
Removal fallout: updateAgentState, getActiveAgentSessions, updateAgentStartedAt,
clearAgentState and getDueRecurringTasks were orphaned by deleting
TaskAgentManager and RecurringTaskScheduler, as was
StartupWarmupPolicy.recurringTaskSchedulerInitialDelay. All had zero callers.
Two known gaps left unfixed and recorded in the tracker rather than patched
over: the 14-day candidate reuse window now outlives the 2-day suggestion TTL,
and "Add to Tasks" on a conversation summary does not resolve the twin pending
candidate.
Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
firebase_index_manifest generates fieldOverrides from FIELD_INDEXING_EXEMPTIONS and can only emit `ttl: false` indexing exemptions. A hand-added `ttl: true` policy is therefore not reproducible from the registry, would be wiped by the generator, and fails the manifest contract. Read-time expiry already delivers the behaviour: every read treats a lapsed pending Candidate as expired. What is lost is storage reclamation, which is recorded rather than papered over — enabling auto-deletion on a live collection group deserves its own decision, not a line in a generated file. Co-Authored-By: Claude Opus 5 <[email protected]>
The scenario-13 proof opens the real TaskChatPanel across first, second and resumed workstream projections; that behaviour is TaskChatCoordinator's, so the flow already exercises it and should say so. Co-Authored-By: Claude Opus 5 <[email protected]>
…res_at Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
ai-chat-settings.yaml still covered TaskAgentViews.swift, deleted with the execute feature. Separately, desktop-flow-lint was already red on origin/main: it builds its registered-action set by scanning ACTION_SOURCE_RELATIVE_PATHS, which omits DesktopAutomationBridge+Notifications.swift, so the two actions registered there read as unknown. Confirmed by running the lint on a clean origin/main worktree. Unrelated to this branch, but it blocks every desktop push. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
The rule this branch enforces by construction is now a named product invariant with a static guard, so the next change cannot quietly undo it. INV-TASK-2: a task the user did not ask for is never written to their task list. Automatic capture — conversation, screen, proactive — produces a pending Candidate that becomes an action item only through an explicit user gesture, and an unacted Candidate expires rather than accumulating. check_task_capture_authority.py asserts five structural facts, chosen as the shapes that actually shipped rather than as prose matching: - no capture-policy outcome constructs auto_accept_silent or create_direct (in either the Python policy or its Swift twin) - conversation_capture never calls accept_candidate - _save_action_items never calls an action-item writer - CanonicalScreenCandidateClient exposes no accept(); a delivery path that can accept eventually gets wired to one - no source governed by shared_capture_policy declares an action-item create anchor, so a new extraction writer cannot be registered without failing here Run against origin/main the guard reports all four original write paths plus the manifest anchor, and test_check_task_capture_authority.py pins that it still fails on each shape. It also has to tolerate the files naming those outcomes in comments that explain their removal, which is why the checks match construction sites rather than words. Status is `proposed`. The registry promotes to `locked` only after the rule and its guards stand unchanged for seven days; earliest promotion 2026-08-27. The behavior is CI-enforced today either way — `locked` adds the requirement to name the ID in PR bodies touching these paths. Co-Authored-By: Claude Opus 5 <[email protected]>
…plit Both failures arrived with the rebase onto current main, not from this branch. d5596a6 relocated the notification bridge actions into DesktopAutomationBridge+Notifications.swift to satisfy the line-count ratchet, and two consumers still grep only the original file: - desktop-flow-lint's ACTION_SOURCE_RELATIVE_PATHS (fixed earlier on this branch, which is why the push gate went green) - DesktopAutomationSecondaryActionTests.bridgeSource(), which reports settings_notifications_snapshot and set_notification_settings as unregistered although both are registered bridgeSource now reads every DesktopAutomationBridge* source, so a future relocation to satisfy the same ratchet cannot break it again. Separately, the referral settings section landed on main without updating PermissionsPagePresentationTests' expected sidebar order. Neither reproduces in a full local `swift test` — CI runs each suite in isolation, and the full-suite log for this branch predates the rebase. Both reproduce in isolation and pass after these fixes. Co-Authored-By: Claude Opus 5 <[email protected]>
|
@cursor address merge conflict |
|
I merged The clash was with #11981, which replaced the seven-day soak with a standing lint and locked the existing proposed invariants. I kept main’s locked index (including INV-BETA-1) and locked INV-TASK-2, since its guards already exist and are wired. Registry audit, 37 product-invariant tests, and the task-capture-authority guard plus its 13 violation fixtures all pass after the merge. Hygiene will still want three extra IDs in the PR body — INV-NAV-1, INV-MEM-4, and INV-TASK-1 — because this branch already touches those globs and #11981 locked them. I couldn’t edit the description from here (it isn’t agent-managed); the list is in a PR comment so it can be pasted under Product invariants affected. |
Resolve the invariant-registry index conflict from #11981: keep main's locked rows and INV-BETA-1, and lock INV-TASK-2 now that lockedness is a standing lint rather than a seven-day soak. Co-authored-by: David Zhang <[email protected]>
|
Merged Resolution: kept main's locked index rows and INV-BETA-1, and locked INV-TASK-2 now that lockedness is a standing lint rather than a seven-day soak. The product-invariants check will also need these IDs added under Product invariants affected (this PR already touched their path globs; #11981 locked them on main):
INV-TASK-2 should be listed as |
Resolve the second-wave conflicts from #11962: both sides added the notifications bridge to the flow-lint source list and taught the automation-bridge tests to read every DesktopAutomationBridge*.swift file. Keep main's versions of those two helpers. Co-authored-by: David Zhang <[email protected]>
|
Hygiene failed because Line-count ratchet now passes against current Hygiene will still fail
and mark INV-TASK-2 as |
|
@cursor address merge conflicts |
|
I merged Four conflicts, resolved in favor of INV-TASK-2: extraction still only proposes Candidates (no accept-on-capture, no writer fallback). I kept main’s useful pieces — the evidence clamp, the wake-word gate, and conversation summary sections — alongside this PR’s “Add to Tasks” rows. Wake-word fixture scoring now treats Locally the INV-TASK-2 guard, capture/visibility/invariant tests, wake-word suite, line-count ratchet, and product-invariants citations all pass, and |
Conflicts were in conversation capture (#12014 auto-accept + writer fallback vs INV-TASK-2 propose-only), the candidate-capture tests, and ConversationDetailView (#12042 summary sections vs Add to Tasks). Keep INV-TASK-2: extraction never accepts or writes a task. Keep #12014's evidence clamp and #11980's wake-word gate. Keep both summary sections and the suggestion-only action-item rows. Wake-word fixture scoring now treats policy_capture_kind == explicit_command as the command-admitted signal (create_direct is gone). Co-authored-by: David Zhang <[email protected]>
|
Merged Four conflicts:
Wake-word fixture scoring now treats Locally: INV-TASK-2 guard, 13 violation fixtures, 109 capture/visibility/invariant tests, wake-word suite (73), line-count ratchet, and product-invariants citations all pass. The PR body already names the required IDs (including INV-NAV-1 / INV-MEM-4 / INV-TASK-1). INV-TASK-2 is locked in the doc; the body’s |
…nd remove task execution (BasedHardware#11974) * feat(tasks): make AI capture suggestion-only and expire suggestions in 2 days Auto-generated tasks were landing directly in the user's task list through four independent paths. On one dogfood account, 121 of 124 surviving tasks were machine-written, and 340 of 353 accepted Candidates were accepted within 2 seconds of creation — machine acceptance, not a human gesture. Establish one invariant: an automatically extracted task is never written to the task list. Every AI-derived proposal is a pending Candidate that reaches the list only through an explicit user gesture. Backend: - capture_policy: drop the `auto_accept_silent` and `create_direct` outcomes. Self-reported model confidence now decides whether a proposal is worth surfacing, never whether it may bypass the user. - conversation_capture: stop create-then-accept, and handle policy rejection per item. A single ignored item no longer drops the whole conversation onto the legacy writer. - process_conversation: `_save_action_items` only proposes. The extracted items still live on `conversation.structured`, which is what the summary view renders. - Candidates carry a real `expires_at` (2 days), cleared on resolution so accepted rows survive as the audit link. Reads treat a lapsed pending Candidate as expired, deriving a deadline from `created_at` for rows written before the field existed, so the existing backlog ages out with no backfill. A Firestore TTL policy reclaims the storage. - Replaces the 14-day read-time freshness filter, which hid old suggestions without ever expiring them. Desktop: - No workflow mode routes captures onto legacy staging, whose end is automatic promotion. `.off` in particular is what /v1/candidates/control reports when its own read fails; a backend hiccup must not become unrequested tasks. Captures defer and retry instead. - Screen capture policy mirrors the backend change (both read the same frozen fixture). - Conversation summary: action items move directly under the summary and each carries an explicit "Add to Tasks". - Tasks page keeps category grouping in multi-select; only the row's selection control changes. Co-Authored-By: Claude Opus 5 <[email protected]> * feat(chat): replace the "Saved to Tasks" receipt with a suggested-task card The notch/chat receipt existed to acknowledge a task Omi had already written into the user's list. Under I1 nothing is written without the user, so the receipt announced something that no longer happens. Surface the proposal instead. A new pending Candidate seen while listening posts a moment carrying the candidate id and description; chat renders it as a native card with "Add to Tasks", which resolves the candidate through the same accept path the Tasks page's Suggested section uses. - SuggestedTaskChatCard encodes/parses the card payload inside the message text, the way BackgroundAgentSummary already does, so a card survives a transcript reload with no schema change. - SuggestedTasksStore gains a shared instance: the Tasks page and the chat card accept from the same pending set, so accepting in one place removes the row from the other. - NotchMomentsCoordinator observes suggestions rather than created tasks. Undo becomes a no-op: there is no longer a write to retract. Co-Authored-By: Claude Opus 5 <[email protected]> * feat(tasks): remove the ability to execute a task Tasks are a list the user keeps, not an agent surface. Both execute affordances are gone. The shipping one: "Execute with Omi" in the task detail panel, the inline "Execute" pill on each row, TasksPage.investigateTask, and TaskChatCoordinator.investigateInBackground. RecurringTaskScheduler goes with them — its only job was firing those investigations on a timer, and nothing ever called start(). The legacy one: the tmux/CLI Terminal Task Agent. TaskAgentManager and TaskAgentViews are deleted, along with the startup session-restore call and the "Terminal Task Agent" settings card — the last user-reachable remnant of a path that had no working launch button left. TaskAgentSettings keeps only what the surviving task chat thread uses: isChatEnabled, the working directory, and the canonical prompt. The dead agent* display goes too — status, plan, prompt, and edited-files rows in the detail panel and tooltip, the .execute action in TaskDetailPanelActionPolicy, and the agent column descriptions handed to the chat SQL tool, which otherwise invites queries against columns nothing writes. The local agent* SQLite columns are deliberately left in place. They are nullable and now unwritten, and GRDB decodes by name, so they cost nothing; dropping them needs a migration whose downside on a live user database is worse than the untidiness. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(tasks): admit only proposals the user will actually see Extraction wrote suggestions, but two capture kinds wrote ones nobody could read. The Suggested surface applies a 0.8 confidence floor; `direct_request` and `inferred_next_step` already gated on it, so below the floor they were ignored. `explicit_command` and `clear_commitment` did not, so a low-confidence item became a pending Candidate the surface would never show — stored forever, displayed never. That is the accumulation pattern that grew staged_tasks to five figures, and half of it was introduced when explicit_command stopped creating tasks and started proposing without picking up the floor. All four kinds now clear the same floor. What the policy admits, the user sees; anything below it is ignored rather than quietly stored. Fail-closed stays fail-closed: extraction that omits confidence still scores below the floor and is dropped. test_conversation_suggestion_visibility walks policy → Candidate → suggested projection for every capture kind, so "a Candidate exists" can no longer pass for "the user was offered something". Two further I1 gaps the desktop suite surfaced: - CanonicalScreenCandidateDelivery accepted its own candidate when the outcome said so. Inert once the policy stopped emitting those outcomes, but `accept` remained on the capture client's protocol. Both are gone: the capture pipeline now has no way to accept anything. - ScreenCapturePolicy had the outcome change but not the floor, so the two policies would have disagreed. They share one frozen fixture, which is what caught it. Also repoints the `recurrence` writer class at TasksStore, which owns recurrence rollover now that RecurringTaskScheduler is deleted. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(tasks): restore a constant lost with the legacy writer, and finish the removals Review pass over the branch (glm-5.3 via omp), findings verified independently. The serious one: removing the legacy action-item writer also removed the module-level TRANSCRIPT_CHUNK_INDEXING_ENABLED that happened to sit directly after it, while leaving its use in the finalization pipeline intact. Every conversation finalization would have raised NameError. Transcript-chunk indexing has nothing to do with action items; the deletion was collateral. Confirmed by reproduction: the name is defined on origin/main, absent at the previous commit, and test_process_conversation_usage_context fails 7 there and passes 40 here. That suite escaped the earlier sweep because its filename is test_process_conversation_*, not test_conversation_*. User-visible: the notch pill was the sole renderer for the suggestion moment and drew notification.title raw, so it showed the encoded card payload — candidate id and all — to the user, beside an Undo button wired to a now-empty handler. It parses the card now, shows the description, and offers Review only; there is nothing to undo because nothing was written. The suggestion moment also lost both guards the receipt path had: ids were never seeded and the 120s freshness gate was gone, so a store load landing mid-conversation could announce a days-old proposal as if Omi had just made it. Restored as a pure function with regression tests. The e2e conversation test still asserted extracted items land in users/{uid}/action_items — the exact write I1 forbids — and patched three attributes the branch had deleted. Removal fallout: updateAgentState, getActiveAgentSessions, updateAgentStartedAt, clearAgentState and getDueRecurringTasks were orphaned by deleting TaskAgentManager and RecurringTaskScheduler, as was StartupWarmupPolicy.recurringTaskSchedulerInitialDelay. All had zero callers. Two known gaps left unfixed and recorded in the tracker rather than patched over: the 14-day candidate reuse window now outlives the 2-day suggestion TTL, and "Add to Tasks" on a conversation summary does not resolve the twin pending candidate. Co-Authored-By: Claude Opus 5 <[email protected]> * docs(desktop): changelog entry for suggestion-only tasks Co-Authored-By: Claude Opus 5 <[email protected]> * fix(tasks): drop the hand-written Firestore TTL entry firebase_index_manifest generates fieldOverrides from FIELD_INDEXING_EXEMPTIONS and can only emit `ttl: false` indexing exemptions. A hand-added `ttl: true` policy is therefore not reproducible from the registry, would be wiped by the generator, and fails the manifest contract. Read-time expiry already delivers the behaviour: every read treats a lapsed pending Candidate as expired. What is lost is storage reclamation, which is recorded rather than papered over — enabling auto-deletion on a live collection group deserves its own decision, not a line in a generated file. Co-Authored-By: Claude Opus 5 <[email protected]> * test(desktop): cover TaskChatCoordinator in the task-thread flow The scenario-13 proof opens the real TaskChatPanel across first, second and resumed workstream projections; that behaviour is TaskChatCoordinator's, so the flow already exercises it and should say so. Co-Authored-By: Claude Opus 5 <[email protected]> * chore(api): regenerate the app-client OpenAPI spec for Candidate.expires_at Co-Authored-By: Claude Opus 5 <[email protected]> * chore(app): regenerate task-intelligence Dart wire models for expires_at Co-Authored-By: Claude Opus 5 <[email protected]> * chore(desktop): regenerate Swift OpenAPI types for Candidate.expires_at Co-Authored-By: Claude Opus 5 <[email protected]> * fix(desktop): let the flow lint see the notifications bridge actions ai-chat-settings.yaml still covered TaskAgentViews.swift, deleted with the execute feature. Separately, desktop-flow-lint was already red on origin/main: it builds its registered-action set by scanning ACTION_SOURCE_RELATIVE_PATHS, which omits DesktopAutomationBridge+Notifications.swift, so the two actions registered there read as unknown. Confirmed by running the lint on a clean origin/main worktree. Unrelated to this branch, but it blocks every desktop push. Co-Authored-By: Claude Opus 5 <[email protected]> * feat(invariants): register INV-TASK-2 and guard it in CI The rule this branch enforces by construction is now a named product invariant with a static guard, so the next change cannot quietly undo it. INV-TASK-2: a task the user did not ask for is never written to their task list. Automatic capture — conversation, screen, proactive — produces a pending Candidate that becomes an action item only through an explicit user gesture, and an unacted Candidate expires rather than accumulating. check_task_capture_authority.py asserts five structural facts, chosen as the shapes that actually shipped rather than as prose matching: - no capture-policy outcome constructs auto_accept_silent or create_direct (in either the Python policy or its Swift twin) - conversation_capture never calls accept_candidate - _save_action_items never calls an action-item writer - CanonicalScreenCandidateClient exposes no accept(); a delivery path that can accept eventually gets wired to one - no source governed by shared_capture_policy declares an action-item create anchor, so a new extraction writer cannot be registered without failing here Run against origin/main the guard reports all four original write paths plus the manifest anchor, and test_check_task_capture_authority.py pins that it still fails on each shape. It also has to tolerate the files naming those outcomes in comments that explain their removal, which is why the checks match construction sites rather than words. Status is `proposed`. The registry promotes to `locked` only after the rule and its guards stand unchanged for seven days; earliest promotion 2026-08-27. The behavior is CI-enforced today either way — `locked` adds the requirement to name the ID in PR bodies touching these paths. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(desktop): repair two source-grep contracts broken by the bridge split Both failures arrived with the rebase onto current main, not from this branch. d5596a6 relocated the notification bridge actions into DesktopAutomationBridge+Notifications.swift to satisfy the line-count ratchet, and two consumers still grep only the original file: - desktop-flow-lint's ACTION_SOURCE_RELATIVE_PATHS (fixed earlier on this branch, which is why the push gate went green) - DesktopAutomationSecondaryActionTests.bridgeSource(), which reports settings_notifications_snapshot and set_notification_settings as unregistered although both are registered bridgeSource now reads every DesktopAutomationBridge* source, so a future relocation to satisfy the same ratchet cannot break it again. Separately, the referral settings section landed on main without updating PermissionsPagePresentationTests' expected sidebar order. Neither reproduces in a full local `swift test` — CI runs each suite in isolation, and the full-suite log for this branch predates the rebase. Both reproduce in isolation and pass after these fixes. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
…2120) #11974 gave a pending Candidate a real deadline: two days, stored as `expires_at`, after which the Suggested surface stops showing it. Exactly one reader enforces it. `candidate_has_lapsed` says in its own docstring that "every read path must ask this rather than trusting `status`", and only `routers/candidates.py` does. What Matters Now does not. `_build_subjects` reads canonical state as raw documents and hardcodes `unexpired=True` for every candidate subject, so the deadline is repealed on that surface: a proposal the user was never shown because it aged out is judged, ranked, and rendered as a live recommendation, and accepting it writes the task the Suggested surface had already retired. The backlog makes it worse rather than rarer -- pre-deadline Candidates carry no `expires_at` at all (1,014 of them, measured in the INV-TASK-2 record, with no backfill), so months-old proposals stay permanently eligible here. - `unexpired` for a candidate subject now answers the real question. The field already exists for this; snapshots at line 584 compute it the same way. - The deadline moves into one predicate with two entry points: `candidate_has_lapsed` for a parsed record, `stored_candidate_has_lapsed` for a reader holding the stored document. A rule stated in a docstring is a rule the next reader ships without. Verified by executing the reader, not by reading it: a Candidate one day past its `expires_at`, and one from the pre-deadline backlog, both reach `filter_shortlist` on main and neither does after the fix. Failure-Class: new
…12121) A pending Candidate stops being readable two days after it is created: every suggested-surface read runs `candidate_has_lapsed` and drops it. Candidate creation did not ask the same question. A semantic claim was reusable for 14 days on `created_at` alone, so from day 2 to day 14 a fresh capture of the same task merged its evidence into a Candidate the Suggested surface will never show, and the merge refreshes neither `created_at` nor `expires_at` — the proposal stays invisible for the rest of the window no matter how often the user mentions the task again. That is the shape INV-TASK-2 forbids: "Admit a proposal the Suggested surface will not show. A stored, invisible Candidate is a dropped one that also costs storage." It was recorded as a known gap when the two-day TTL landed in #11974 ("the 14-day candidate reuse window now outlives the 2-day suggestion TTL"). Reuse is now bounded by the suggestion's own life: a lapsed pending claim is not reused, so the next capture creates a fresh Candidate, repoints the semantic claim at it, and the user is offered the task again. A live claim still merges exactly as before, so repeated mentions inside the window do not multiply rows. `PENDING_CANDIDATE_REUSE_WINDOW` had no other reader and is gone rather than left to disagree with the TTL. Failure-Class: none
…ted surface (#12424) ## Summary Since #11974 (Aug 23), action items extracted from a conversation stop existing for anyone on a phone. Two changes landed together in that PR and compound: 1. **The write disappeared.** `_save_action_items` proposes a Candidate per item and writes no `action_item`. 2. **The prompt got looser.** `task_intelligence_capture = capture_enabled(uid)` is `bool(uid)` — true for everyone — and that flag switches the extraction prompt from *"Only extract action items that are truly important and need tracking. When in doubt, DON'T extract"* to *"Always extract concrete explicit commands, direct requests, and clear commitments; Candidate policy decides whether they become tasks or quiet suggestions."* Filtering moved from the extractor into a review queue. Desktop has that queue (`SuggestedTasksStore`). Mobile has none — the Flutter app never calls `/v1/candidates`, and its generated wire models for candidates are imported by no file. So on a phone every proposal is invisible and expires after `SUGGESTION_TTL = 2 days`. Even "Hey Omi, remind me to call the dentist" only earns a suggestion: the policy comment says so directly — *"A command heard in ambient audio is still a model's reading of speech, not a user gesture against a surface. It proposes; it does not create."* ## What changed Capture is now scoped by conversation origin, using the seam `process_conversation.py` already uses twice for per-client policy (trial paywall, deferred processing): - **Desktop conversations** keep proposing Candidates into the Suggested surface. Unchanged. - **Every other client** — `omi`, `friend`, `phone`, `phone_call`, `apple_watch`, `sdcard`, and any source added later — writes its extracted items as tasks. The same predicate picks the prompt, so those conversations get the conservative filter back: explicit commands and the few concrete commitments, or nothing at all. Restoring the writer also restores what it drove — due-date notifications and task-integration sync. - Reprocessing replaces that conversation's items, as it did before #11974. **Screen capture is untouched.** It posts to `/v1/candidates` from `TaskAssistant.swift`, never enters this path, and stays suggestion-only — the guard rules that hold it there are unchanged. **No app release needed.** The items land in `/v1/action-items`, which the Tasks page already reads. ## Product invariants **INV-TASK-2** — rescoped, not deleted. It was written against a measured flood: ~100 Candidates/day on a dogfood account, four code paths auto-writing tasks. That volume is a property of screen capture, which samples continuously; conversation extraction is bounded by the conversation and gated by a prompt that returns nothing when nothing qualifies. The invariant now reads: capture proposes only where a Suggested surface exists to review the proposal on. Its own MUST NOT — *"Admit a proposal the Suggested surface will not show. A stored, invisible Candidate is a dropped one"* — is what mobile has been violating for a week; this enforces it one level up, by not proposing there at all. **INV-MEM-4** (canonical promotion is the sole Long-term authority) is matched by path: this diff touches `process_conversation.py`, which also hosts memory postprocessing. It changes no memory intake, consolidation, or promotion path — only how a conversation's action items are persisted. The guard changes shape with it. The static rule banning a writer inside `_save_action_items` cannot express which conversations propose, and a source-string check would be a tripwire rather than coverage, so it is replaced by behavioural tests that run both paths through the real function. The three facts the guard can prove — no creating outcome in the policy, no accept inside capture, no accept on the delivery client — plus the manifest rule that a shared-policy source declares no create anchor, all stay. The writer is registered as its own source (`mobile_conversation_extraction`, `direct_command`), so it is visible to that manifest rule rather than hidden from it. ## Verification Every command below was run locally in this worktree. | Suite | Result | |---|---| | `tests/unit/test_backend_candidate_capture.py` | both paths — desktop proposes and never writes; `omi`/`phone`/`phone_call`/`apple_watch`/`sdcard` write and never propose; reprocess replaces | | `testing/e2e/test_conversation_processing.py` | 5 passed — hermetic lifecycle drives `process_conversation` for an `omi` conversation and reads the written item back out of `action_items` | | `tests/unit/test_process_conversation_usage_context.py` | 51 passed | | `tests/unit/test_task_intelligence_contract_freeze.py` | 29 passed | | `tests/unit/test_conversation_suggestion_visibility.py` | 6 passed | | `tests/unit/test_surface_parity_capture.py`, `test_listen_parity_capture.py` | 14 passed | | `tests/unit/test_upstream_boundary.py` | 5 passed | | `.github/scripts/test_check_task_capture_authority.py` | 8 passed; guard exits 0 on this checkout | Environment note for anyone reproducing: the checked-in backend venv is missing `langchain-anthropic`, which `requirements.txt` pins at 1.1.0. Every task-intelligence test file fails collection without it, on `main` too. I ran with it supplied on `PYTHONPATH` rather than mutating the venv. Not verified: no device run. The behaviour is backend-side and covered by the hermetic lifecycle test, but seeing tasks appear on a phone after a real conversation is worth doing before this reaches users. ## Follow-up, deliberately not here Desktop conversations still propose, so their tasks are reviewable only on desktop. Surfacing those suggestions on mobile is the next piece; when it lands, the split this PR introduces can close in whichever direction the data supports. Line-Count-Exception: backend/utils/conversations/process_conversation.py | 2476 -> 2561 | restores the action-item writer #11974 deleted from this file; extracting it to a new module would still grow the file and would spread one conversation-postprocess decision across two places <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/12424?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->


Auto-created tasks were landing directly in the user's task list through four
independent paths, and the suggestion expiry the product promised was never
implemented. On one dogfood account, 121 of 124 surviving tasks were
machine-written, and 340 of 353 accepted Candidates were accepted within two
seconds of creation — machine acceptance, not a human gesture.
This establishes one invariant and rebuilds the task surfaces around it.
The invariant
I1 — an automatically extracted task is never written to the user's task
list. Every AI-derived proposal is a pending Candidate that becomes a real
task only through an explicit user gesture ("Add to Tasks"). Surfaces that
carry a real user gesture — manual create, chat/MCP tool invocation, the
developer API — are unchanged: telling Omi to add a task is the user asking.
Corollary: a suggestion nobody acts on expires after 2 days and is gone.
What was letting tasks through
auto_accept_silent/create_directin the capture policy created aCandidate and accepted it in the same request, so it never existed in a
user-visible pending state. The only gate was the extraction model's own
self-reported confidence.
Candidate, the whole conversation fell through to the legacy writer,
sweeping along items that had qualified as suggestions.
TaskPromotionServicepromoted staged tasks on atimer whenever
workflow_mode != .read, andGET /v1/candidates/controlreturns
offfrom twoexceptbranches — so a Firestore hiccup on oneendpoint became unrequested tasks.
CanonicalScreenCandidateDeliveryaccepted its own candidate when theoutcome said so.
All four are closed. No workflow mode reaches legacy staging; a non-canonical
mode defers and retries rather than falling back to a writer. The capture
client protocol no longer offers an
acceptat all.Expiry
Candidates carry a stored
expires_at(2 days), cleared on resolution soaccepted rows survive as the audit link to their task. Reads treat a lapsed
pending Candidate as expired and derive a deadline from
created_atfor rowswritten before the field existed, so the existing backlog ages out with no
backfill. Resolution clears the field, so a resolved Candidate has no deadline at all.
This replaces a 14-day read-time freshness filter that hid old suggestions
without ever expiring them.
Storage is not reclaimed here. A Firestore TTL policy on
expires_atwoulddo it, but
firebase_index_manifestcan only expressttl: falseindexingexemptions, so a TTL policy cannot be declared through the generated manifest
today — and turning on auto-deletion for a live collection group is not
something to smuggle in through a generated file. Expired Candidates stay
stored but unreadable until that is handled deliberately.
Suggestion visibility
The Suggested surface applies a 0.8 confidence floor.
direct_requestandinferred_next_stepgated on it;explicit_commandandclear_commitmentdidnot, so below the floor they produced a Candidate that could never be
displayed — stored forever, shown never. All four kinds now clear the same
floor: what the policy admits, the user sees; anything below is ignored rather
than quietly stored.
test_conversation_suggestion_visibility.pywalks policy-> Candidate -> suggested projection for every capture kind so "a Candidate
exists" cannot pass for "the user was offered something".
The rule is now registered and guarded
This lands as INV-TASK-2 in
docs/product/invariants/, with a static guardwired into the checks manifest (
task-capture-authority). The guard assertsfive structural facts rather than matching prose: no capture-policy outcome may
mean "create a task", extraction may not accept a Candidate,
_save_action_itemsmay not call a writer, the desktop capture client may not expose an
accept,and a source governed by the shared capture policy may not declare an
action-item create anchor — so a future extraction writer cannot be registered
without failing it.
Run against
origin/main, the guard fails on all four original paths plus themanifest anchor;
test_check_task_capture_authority.pypins that it stillfails on each of those shapes. A guard that cannot fail is decoration.
Status is
proposed, notlocked: the registry's promotion rule requires thebehavior and its guards to stand unchanged for seven days. Earliest promotion
2026-08-27. The behavior is enforced by CI today regardless — what
lockedadds is the PR-body citation requirement.
Product changes
with an explicit "Add to Tasks". Items on a summary are not tasks.
"Saved to Tasks" receipt that acknowledged a write the user never requested.
control changes.
button and the legacy tmux Terminal Task Agent, along with
RecurringTaskScheduler, whose only job was firing those investigations.Known gaps, deliberately not fixed here
PENDING_CANDIDATE_REUSE_WINDOW(14 days) now outlivesSUGGESTION_TTL(2 days), and the merge path does not refresh
expires_at. A re-extractionof the same thing between lapse and TTL deletion merges into an invisible
candidate, so no new suggestion appears. Self-heals once TTL reaps the doc.
This is dedup-vs-expiry semantics — a product call, not a defect.
Candidate, so the same proposal can be added from the summary and still sit
in the Suggested lane. Fixing it needs semantic matching against
suggested_candidate_semantic_identity.agent*desktop SQLite columns are left in place. They are nullableand unwritten and GRDB ignores them; dropping them needs a migration whose
failure mode on a live user database is worse than the untidiness.
One unrelated fix, called out deliberately
desktop-flow-lintwas already failing onorigin/mainwith two "unknownbridge action" errors:
settings_notifications_snapshotandset_notification_settingsare registered inDesktopAutomationBridge+Notifications.swift, which was never added toACTION_SOURCE_RELATIVE_PATHS, so the lint could not see them. Verified byrunning the lint on a clean
origin/mainworktree. It is one line and itblocks any desktop push, so it is fixed here rather than worked around.
Verification
Backend: 231 tests green across the capture, candidate, contract, parity,
staged and conversation-processing suites.
Desktop: builds clean; 129 tests green on the affected suites. A full run is
5,644 tests with one failure,
RewindCaptureExclusionGenerationTests.testOwnerSnapshotStaysCurrentWhenAuthLeadsUnresolvedRewindDatabase,which passes in isolation, is untouched by this branch, and varied across runs
— a pre-existing order-dependent flake.
Note: verified locally under Xcode 26.2; CI pins 16.4.
Product invariants affected
proposed)Failure class (fixes)
Failure-Class: none
Line-Count-Exception: desktop/macos/Desktop/Sources/MainWindow/Components/ChatBubble.swift | 2082 -> 2086 | Four lines add the suggested-task card branch to the existing proactive-push switch; splitting a 2082-line renderer is unrelated to this change.