openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Agent does not use context from other chats by the same user

Open Al629176 opened this issue 6 months ago • 0 comments

Summary

The agent can use context from earlier messages in the same chat, but it does not retrieve relevant context from other chats belonging to the same user.

Problem

When a user continues a topic in the same chat, the agent appears to understand prior messages. However, if the same user has relevant context in another chat, the agent does not pick it up and behaves as if that context does not exist.

Expected behavior: user-level memory and chat history retrieval should allow the agent to find relevant context across chats for the same user, while still respecting privacy, workspace, and source boundaries.

Impact: users have to repeat information across conversations, and the agent’s personalization/memory feels limited to the current thread instead of the user’s broader history.

Steps to reproduce:

  1. Start Chat A as a user and share a durable fact, preference, or project context.
  2. Start Chat B as the same user.
  3. Ask a question or make a request in Chat B that depends on the context from Chat A.
  4. Observe that the agent does not use the relevant context from Chat A.
  5. Ask the same dependent question later inside Chat A.
  6. Observe that the agent can use the previous same-chat context.

Version / platform: OpenHuman app / agent memory behavior; exact build and platform to confirm.

Solution (optional)

Investigate the memory and conversation retrieval path to confirm whether retrieval is scoped only to the active chat/session. Add or fix user-level retrieval so relevant memories and prior chat summaries from the same user can be considered across chats, with source/session provenance and privacy boundaries preserved.

Acceptance criteria

  • [ ] Repro gone — The agent can retrieve relevant context from another chat belonging to the same user when it is useful for the current request.
  • [ ] Same-chat behavior preserved — Existing same-chat context handling continues to work.
  • [ ] User scope enforced — Cross-chat retrieval only uses chats/memories belonging to the same user and permitted workspace/source scope.
  • [ ] Relevance bounded — The agent retrieves relevant cross-chat context without dumping unrelated conversation history into prompts.
  • [ ] Provenance available — Retrieved cross-chat context keeps enough provenance to debug which chat/source supplied it.
  • [ ] Privacy safe — Cross-chat context does not leak across users, accounts, workspaces, or disconnected sources.
  • [ ] Regression safety — Unit, integration, or E2E coverage verifies same-user cross-chat retrieval, same-chat retrieval, and cross-user isolation.
  • [ ] Diff coverage ≥ 80% — the fix PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by .github/workflows/coverage.yml).

Related

  • Memory retrieval and user personalization workstream.

Al629176 avatar May 12 '26 01:05 Al629176