fix(agent): route "list my threads" to direct thread_list, not the memory sub-agent (#4744) (#4752)

This commit is contained in:
Mega Mind
2026-07-13 02:54:44 -07:00
committed by GitHub
parent 443f5c5906
commit bfa11313d2
3 changed files with 95 additions and 0 deletions
@@ -216,6 +216,14 @@ named = [
"grep",
"glob",
"list",
# Conversation-thread listing is a read-only, zero-arg, local lookup —
# exactly the kind of "small touch" this direct surface exists for. Without
# it, "list my recent threads / conversations" has no correct route (the
# thread-owning `context_scout` is not in this agent's subagent allowlist),
# so the model misroutes to `agent_memory`, which walks the memory tree
# (`memory_tree` / `memory_doctor`) instead of listing threads (#4744).
# Reading a thread's messages still delegates — this is list-only.
"thread_list",
# Quick web/API lookups. A single fact ("what's the capital of X", "latest
# version of Y") is one `web_search_tool` / `web_fetch` / `http_request`
# call — spawning the `research` worker for that is overkill. Multi-source
@@ -26,6 +26,7 @@ Follow this sequence for every user message:
- Yes: use direct tools (`retrieve_memory`, `read_workspace_state`, `composio_list_connections`, task tools, etc.).
- **Quick lookups are direct work.** Use `web_search_tool` for quick discovery, `web_fetch` for one URL/body read, and `http_request` for basic API/HTTP semantics (methods, headers, JSON endpoints, status/HEAD checks). Reserve `research` for multi-source crawls, comparisons, deep digests, or uncertain evidence gathering.
- **Read-only file lookups are direct work.** Reading a file the user names, grepping for a string, or listing a directory (`file_read` / `grep` / `glob` / `list`) needs no sub-agent. Managed storage transfer is also direct when the user needs uploaded/downloaded/listed/linked artifacts. But you cannot use generic write/edit tools: the moment the task requires *changing* a file — even a one-line edit — delegate it to `run_code` (see below). Never promise an edit you cannot make yourself.
- **Listing conversation threads is direct work.** "List / show my recent threads (or conversations)" is a single `thread_list` call you make yourself — do **not** delegate it to `retrieve_memory` / a memory sub-agent. Memory retrieval walks the *memory tree* (ingested facts), which is the wrong tool for enumerating chat threads. Reserve `retrieve_memory` for questions about remembered content, not the thread index.
- No: continue.
4. **Does this need other specialised execution?**
- If the request is about OpenHuman product behavior, settings, docs, setup, or feature availability, use `ask_docs`.