Skip to content

[Bug] flush crashes with TypeError: DetectionResult.__new__() missing 1 required positional argument on fresh pip 1.2.3 install — recall always empty #415

Description

@Yunkuboom

Summary

POST /api/v1/memory/flush (and the memorize extract path in general) crashes with TypeError: DetectionResult.__new__() missing 1 required positional argument on a fresh pip-installed EverOS 1.2.3 deployment, so buffered messages never become episodes and recall always returns empty.

Environment

  • EverOS 1.2.3 via pip install everos==1.2.3 (Docker, python:3.12-slim)
  • Installed dependency versions (from pip list):
    • everalgo-boundary 0.3.0
    • everalgo-core 0.5.0
    • everalgo-agent-memory 0.4.0
    • everalgo-user-memory 0.4.0
  • Config: [llm] model=MiniMax-M3, base_url=https://api.minimaxi.com/v1; embedding/rerank/multimodal not configured (keyword-only mode)
  • Server: everos server start --host 0.0.0.0 --port 8000

Reproduction

  1. Start server with a bare [llm] config (no embedding).
  2. Add a message:
curl -s -X POST localhost:8000/api/v1/memory/add -H 'Content-Type: application/json' \
  -d '{"session_id":"e2e-probe","app_id":"hermes","project_id":"default",
       "messages":[{"sender_id":"hermes-default","sender_name":"大拿","role":"assistant",
                    "timestamp":1787298814000,"content":"云哥的 NAS 是 HPStudioBJ,IP 192.168.3.144,Tailscale 100.81.224.74。"}]}'

Returns 200 {"data":{"message_count":1,"status":"accumulated"}} — so far so good.

  1. Flush to trigger extraction:
curl -s -X POST localhost:8000/api/v1/memory/flush -H 'Content-Type: application/json' \
  -d '{"session_id":"e2e-probe","app_id":"hermes","project_id":"default"}'

Returns 500 {"error":{"code":"INTERNAL_ERROR",...}}. Server log:

FileNotFoundError? no —
TypeError: DetectionResult.__new__() missing 1 required positional argument:
│ ze.py:195 in flush_memory

(Full traceback below.)

  1. Search for the content:
curl -s -X POST localhost:8000/api/v1/memory/search -H 'Content-Type: application/json' \
  -d '{"agent_id":"hermes-default","app_id":"hermes","query":"HPStudioBJ","method":"keyword","top_k":10}'

Returns {"episodes":[],"profiles":[],"agent_cases":[],"agent_skills":[],"unprocessed_messages":[]} — nothing recallable, even though the message IS durable in unprocessed_buffer (SQLite).

Expected behavior

  • Flush should not 500 on the default pip install; buffered messages should become memcells → episodes/atomic_facts so search can recall them.
  • If keyword-only mode is unsupported for extraction, the server should say so at startup or in /health, not crash on flush.

Suspected cause

DetectionResult is a NamedTuple(cells, tail) (per everalgo-boundary README). Something in the boundary-detection call path (everos.service.memorize.flush_memory → everalgo) constructs it with the wrong arity or the installed everalgo-boundary 0.3.0 / everalgo-core 0.5.0 pair disagree on its shape. This is a fresh pip install — no upgrade path, no legacy state — so it reproduces out of the box.

Extra context

This makes the OSS server's core memorize→search loop unusable for a brand-new user (write works, recall never does). It also affects the proposed Hermes integration (PR #329) which relies on on_session_end → /memory/flush. Happy to provide full stacktrace logs or run any diagnostic commands if helpful.

Full server traceback (truncated):

TypeError: DetectionResult.__new__() missing 1 required positional argument:
│ /usr/local/lib/python3.12/site-packages/.../ze.py:195 in flush_memory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions