{"record":{"id":"1770940ca4e1fa8a","repo":"HKUDS/DeepTutor","slug":"preferences-is-written-by-the-write-memory-tool-n","errorCode":null,"errorMessage":"preferences is written by the write_memory tool, not consolidated","messagePattern":"preferences is written by the write_memory tool, not consolidated","errorType":"http","errorClass":"HTTPException","httpStatus":405,"severity":"error","filePath":"deeptutor/api/routers/memory.py","lineNumber":318,"sourceCode":"                language=req.language,\n                on_event=on_event,\n            )\n\n        return go\n    raise HTTPException(status_code=400, detail=f\"unknown mode {req.mode!r}\")\n\n\n@router.post(\"/runs/start\")\nasync def start_run(req: RunStartRequest):\n    \"\"\"Start one consolidator mode and return a run handle.\n\n    The run survives client disconnects; reconnect via\n    ``GET /runs/{id}/events?since=N``.\n    \"\"\"\n    lyr = _validate_layer(req.layer)\n    _validate_doc_key(lyr, req.key)\n    if lyr == \"L3\" and req.key == \"preferences\" and req.mode not in (\"dedup\", \"merge\"):\n        raise HTTPException(\n            status_code=405,\n            detail=\"preferences is written by the write_memory tool, not consolidated\",\n        )\n    from deeptutor.services.memory.consolidator.runs import (\n        RunBusyError,\n        get_run_manager,\n    )\n\n    manager = get_run_manager()\n    runner = _runner_for(req)\n    selection = (\n        {\"profile_id\": req.llm_selection.profile_id, \"model_id\": req.llm_selection.model_id}\n        if req.llm_selection\n        else None\n    )\n    try:\n        run = await manager.start(\n            layer=lyr,","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/memory.py#L300-L336","documentation":"Error \"preferences is written by the write_memory tool, not consolidated\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/api/routers/memory.py:318 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}