Skip to content

fix: stabilize chat execution and scope memory recall - #207

Open
dzc-bit wants to merge 1 commit into
OpenBMB:mainfrom
dzc-bit:fix/conversation-memory-and-log-deletion
Open

fix: stabilize chat execution and scope memory recall#207
dzc-bit wants to merge 1 commit into
OpenBMB:mainfrom
dzc-bit:fix/conversation-memory-and-log-deletion

Conversation

@dzc-bit

@dzc-bit dzc-bit commented Aug 21, 2026

Copy link
Copy Markdown

Summary

This update rebases the fix onto the latest OpenBMB/StaffDeck main (008fff39) and refreshes the fork branch so the PR no longer depends on the stale base.

  • Keep the active chat route stable when scheduled/background work completes or a session lookup/delete fails.
  • Add enterprise conversation-log batch deletion with deduplication, visibility checks, confirmation/loading states, and Harness workspace cleanup.
  • Delete only memories associated with a deleted session, including the related Human Handoff request; preserve memories from other sessions.
  • Scope memory recall by agent_id in the database candidate query before truncation, then apply bounded lexical recall (Chinese two-character fragments and English word matching), up to 12 records and about 6000 characters, while retaining high-priority profile memories.
  • Add direct memory insertion and enterprise memory management UI.
  • Skip the extra Response Generator call for awaiting-user and human-handoff replies.
  • Keep background employee tasks from taking focus from the current conversation.
  • Harden Windows UTF-8 subprocess/MCP/skill execution and runtime-lock handling; rebuild retired WeCom workers after credential changes.

Validation

  • Backend suite: 1992 passed, 9 skipped, 91 warnings.
  • Ruff import/upgrade checks on changed backend files: passed.
  • Python compile check: passed.
  • Frontend production build: passed.
  • i18n:check: passed.
  • config:check: passed.
  • Targeted chat routing tests: passed.

The skipped backend tests are Windows capability differences (for example, symlink permission and Bash availability), not test failures.

@hm1229
hm1229 self-requested a review August 24, 2026 02:24
@hm1229 hm1229 self-assigned this Aug 24, 2026
@hm1229

hm1229 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator
  1. Agent filtering happens after the candidate set is truncated. The query first retrieves the 80 most recent memories across all agents for the user, and only then filters them by agent_id in Python. As a result, memories from other agents can push the current agent’s memories out of the candidate set.
    2。 Deleting a conversation does not delete its associated human handoff records. _delete_chat_session_records() deletes messages, events, feedback, memories, and Harness records, but omits HumanHandoffRequest.

@dzc-bit
dzc-bit force-pushed the fix/conversation-memory-and-log-deletion branch from 9a490c1 to f5acac8 Compare August 25, 2026 05:57
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.

2 participants