Skip to content

[Feat] Remember routing corrections for ambiguous tasks#748

Draft
roomote-roomote[bot] wants to merge 2 commits into
developfrom
feat/routing-preference-memory-02sq9ue4ir14f
Draft

[Feat] Remember routing corrections for ambiguous tasks#748
roomote-roomote[bot] wants to merge 2 commits into
developfrom
feat/routing-preference-memory-02sq9ue4ir14f

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Daniel Riccio. Follow up by mentioning @roomote-roomote, in the web UI, or in Discord.

What changed

  • Remember each user's explicit environment-routing corrections in a dedicated preference record.
  • Use recent correction memory only for low-confidence environment routes, with a 30-day decay and capped correction weight.
  • Preserve explicit environment mentions, confident router decisions, and correction-mode routing; expose memory use and weight in router debug output.
  • Normalize Slack's env:<id> selection value before comparing it to the routed environment, so an unchanged reroute does not train memory.
  • Repair the pre-existing Drizzle snapshot chain so the generated preference migration can be created reliably.

Why this change was made

Users often correct ambiguous routing decisions toward the environment they prefer. Those corrections should help resolve future ambiguity without allowing past preferences to override current task intent.

Impact

Ambiguous requests can now route to a user's recent, repeatedly corrected environment. Confident or explicitly scoped requests retain their normal routing outcome, unchanged Slack reroutes no longer inflate preference weight, and classifier fallbacks never train the preference memory.

@roomote-roomote

roomote-roomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found. See task

  • packages/cloud-agents/src/server/router/follow-up-service.ts:80 Slack persists suggestions as env:<environmentId>, but this compares that value to the bare routed ID. It therefore records every non-fallback correction reroute as a preference even when the router selected the original environment; normalize or compare the same selection representation before persisting.

Reviewed 955bc1c

@roomote-roomote

roomote-roomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 955bc1c: Slack env:<environmentId> selections are normalized to the bare environment ID before the preference comparison. An unchanged Slack reroute no longer records or increments routing memory, with a focused regression test covering the prefixed value.

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