odysseus-dev/odysseus · error · HTTPException
Failed to save compacted history
Error message
Failed to save compacted history
What it means
Error "Failed to save compacted history" thrown in odysseus-dev/odysseus.
Source
Thrown at routes/session_routes.py:1035
headers=headers,
timeout=60,
)
except Exception as e:
logger.error("Manual compaction failed: %s", e)
raise HTTPException(500, "Compaction failed")
summary_msg = ChatMessage(
role="system",
content=f"[Conversation summary]\n{summary}",
metadata={
"compacted": True,
"summarized_count": len(older),
"timestamp": utcnow_naive().isoformat(),
},
)
new_history = [summary_msg] + recent
if not session_manager.replace_messages(session_id, new_history):
raise HTTPException(500, "Failed to save compacted history")
return {
"ok": True,
"summarized": len(older),
"kept": len(recent),
"message_count": len(new_history),
}
@router.post("/sessions/auto-sort")
def auto_sort_sessions(request: Request, skip_llm: bool = False):
"""Use AI to categorize all sessions into folders.
Phase 1 deletes empty/throwaway sessions and Phase 2 asks the LLM
to assign folders. When `skip_llm=true` the endpoint returns
after Phase 1 — used by the "Tidy (no AI)" UI affordance so
users can clean junk without spending tokens.
"""
from src.llm_core import llm_callView on GitHub (pinned to f9235ebbf1)
Solutions
- Check disk space and storage permissions, then retry.
- Review server logs for the history save error.
When it happens
Trigger: Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.
Common situations: See trigger scenarios.
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/3bd14d7bddcda0c4.
Report an issue: GitHub.