bytedance/deer-flow · error · HTTPException
Failed to read history: {str(e)}
Error message
Failed to read history: {str(e)} What it means
Error "Failed to read history: {str(e)}" thrown in bytedance/deer-flow.
Source
Thrown at backend/app/gateway/routers/skills.py:357
def _read_history() -> list[dict] | None:
# Worker thread: storage construction, the existence probes, and the
# history-file read are blocking filesystem IO that must stay off the
# event loop. None signals 404 to the caller.
storage = _get_user_skill_storage(config)
if not storage.custom_skill_exists(skill_name) and not storage.get_skill_history_file(skill_name).exists():
return None
return storage.read_history(skill_name)
history = await asyncio.to_thread(_read_history)
if history is None:
raise HTTPException(status_code=404, detail=f"Custom skill '{skill_name}' not found")
return CustomSkillHistoryResponse(history=history)
except HTTPException:
raise
except Exception as e:
logger.error("Failed to read history for %s: %s", skill_name, e, exc_info=True)
raise HTTPException(status_code=500, detail=f"Failed to read history: {str(e)}")
@router.post("/skills/custom/{skill_name}/rollback", response_model=CustomSkillContentResponse, summary="Rollback Custom Skill")
async def rollback_custom_skill(skill_name: str, body: SkillRollbackRequest, request: Request, config: AppConfig = Depends(get_config)) -> CustomSkillContentResponse:
await require_admin_user(request, detail=_ADMIN_REQUIRED_DETAIL)
try:
storage = _get_user_skill_storage(config)
if not storage.custom_skill_exists(skill_name) and not storage.get_skill_history_file(skill_name).exists():
raise HTTPException(status_code=404, detail=f"Custom skill '{skill_name}' not found")
history = storage.read_history(skill_name)
if not history:
raise HTTPException(status_code=400, detail=f"Custom skill '{skill_name}' has no history")
record = history[body.history_index]
target_content = record.get("prev_content")
if target_content is None:
raise HTTPException(status_code=400, detail="Selected history entry has no previous content to roll back to")
storage.validate_skill_markdown_content(skill_name, target_content)
static_findings = await _scan_static_skill_markdown_or_raise(skill_name, target_content, app_config=config)View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Check the Gateway logs for the history read error; the history store may be corrupted.
- Verify the skill history directory under the custom skills path is readable.
When it happens
Trigger: Thrown at backend/app/gateway/routers/skills.py:357 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/03f63395814edaa4.
Report an issue: GitHub.