fix(agent): add contacts domain to tool-RAG classifier#4178
Merged
pewdiepie-archdaemon merged 1 commit intoJun 15, 2026
Merged
Conversation
Contact-lookup requests ('What is X's contact?', 'What is Y's phone
number?') matched no domain in the classifier, were flagged low_signal,
and had tool retrieval skipped entirely — the model only received
ALWAYS_AVAILABLE (manage_memory, ask_user, update_plan) and never
resolve_contact/manage_contact.
Add a 'contacts' domain with:
- _DOMAIN_RULES: directs the model to resolve_contact/manage_contact
- _DOMAIN_TOOL_MAP: seeds resolve_contact + manage_contact
- _classify_agent_request: matches contact/contacts/phone/phone
number/address book/vcard keywords
Mirrors the pattern of the images domain fix (PR odysseus-dev#3606).
pewdiepie-archdaemon
approved these changes
Jun 15, 2026
pewdiepie-archdaemon
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Contact lookup and management prompts now deterministically seed resolve_contact/manage_contact instead of being treated as low-signal, and the focused classifier/rule-pack tests pass locally.
This was referenced Jun 15, 2026
Merged
vdmkenny
pushed a commit
that referenced
this pull request
Jun 15, 2026
…contact has no email (#4327) When a CardDAV contact matched the search query but had no email address (only phone numbers), the tool silently dropped it and returned 'No contacts found'. Fall back to the contact's phone number(s) so the caller still receives usable information. Refs: #4178 (the contacts-domain classifier fix that made the model actually call resolve_contact for contacts queries, surfacing this pre-existing gap)
kootenayalex
pushed a commit
to kootenayalex/odysseus-mlx
that referenced
this pull request
Jun 16, 2026
…contact has no email (odysseus-dev#4327) When a CardDAV contact matched the search query but had no email address (only phone numbers), the tool silently dropped it and returned 'No contacts found'. Fall back to the contact's phone number(s) so the caller still receives usable information. Refs: odysseus-dev#4178 (the contacts-domain classifier fix that made the model actually call resolve_contact for contacts queries, surfacing this pre-existing gap)
ToyVo
pushed a commit
to ToyVo/odysseus
that referenced
this pull request
Jul 7, 2026
…contact has no email (odysseus-dev#4327) When a CardDAV contact matched the search query but had no email address (only phone numbers), the tool silently dropped it and returned 'No contacts found'. Fall back to the contact's phone number(s) so the caller still receives usable information. Refs: odysseus-dev#4178 (the contacts-domain classifier fix that made the model actually call resolve_contact for contacts queries, surfacing this pre-existing gap)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
Contact-lookup requests like "What is X's contact?" or "What's Y's phone number?" matched no domain in
_classify_agent_request, were flaggedlow_signal=True, and had tool retrieval skipped entirely. The model only receivedALWAYS_AVAILABLE(manage_memory,ask_user,update_plan) — neverresolve_contactormanage_contact.This is the exact same class of bug as #3606 (images), just for the contacts domain.
The keyword hints in
tool_index.pyalready map{"contact", "address", "phone", "who is"}to{"resolve_contact", "manage_contact"}, but those hints are only evaluated as a fallback when_relevant_toolsis empty — the low-signal gate sets it toALWAYS_AVAILABLE(non-empty) before the fallback, so the hints are dead code for low-signal messages.Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Follows the pattern established in #3606 (same root cause, different domain). No issue filed yet — this is a regression discovered during use.
Type of Change
Checklist
devHow to Test
python -m pytest tests/test_tool_rag_contacts_domain.py -vdomains=["contacts"]andlow_signal=False, and thatresolve_contactis among the selected toolsChanges
Three additions, mirroring #3606 exactly:
_DOMAIN_RULES— contacts rule pack directing the model toresolve_contact/manage_contact_DOMAIN_TOOL_MAP—"contacts": {"resolve_contact", "manage_contact"}_classify_agent_request— domain detection:\b(contact|contacts|phone|phone number|address book|vcard)\bTests
tests/test_tool_rag_contacts_domain.py— 5 tests covering:_DOMAIN_TOOL_MAPseeds the correct tools_DOMAIN_RULESentry exists and is picked up by_domain_rules_for_toolsVisual / UI changes — REQUIRED if you touched anything that renders
Screenshots / clips
N/A (backend-only change, no UI touched)