{"record":{"id":"a4d4111b7f27034c","repo":"bytedance/deer-flow","slug":"failed-to-reload-skill-skill-name-after-update","errorCode":null,"errorMessage":"Failed to reload skill '{skill_name}' after update","messagePattern":"Failed to reload skill '(.+?)' after update","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"backend/app/gateway/routers/skills.py","lineNumber":551,"sourceCode":"        # invalidated. CUSTOM/LEGACY skill state is per-user so only that\n        # user's cache needs to be dropped.\n        if skill.category == SkillCategory.PUBLIC:\n            # clear_skills_system_prompt_cache is sync; run it in a worker\n            # thread to avoid blocking the event loop. The lock inside it is\n            # cheap, but the async drop also keeps the test mock surface\n            # consistent (tests patch the async variant).\n            await asyncio.to_thread(clear_skills_system_prompt_cache)\n        else:\n            await refresh_user_skills_system_prompt_cache_async(get_effective_user_id())\n\n        def _reload_skills() -> list[Skill]:\n            return _get_user_skill_storage(config).load_skills(enabled_only=False)\n\n        skills = await asyncio.to_thread(_reload_skills)\n        updated_skill = next((s for s in skills if s.name == skill_name), None)\n\n        if updated_skill is None:\n            raise HTTPException(status_code=500, detail=f\"Failed to reload skill '{skill_name}' after update\")\n\n        logger.info(f\"Skill '{skill_name}' enabled status updated to {body.enabled}\")\n        return _skill_to_response(updated_skill)\n\n    except HTTPException:\n        raise\n    except Exception as e:\n        logger.error(f\"Failed to update skill {skill_name}: {e}\", exc_info=True)\n        raise HTTPException(status_code=500, detail=f\"Failed to update skill: {str(e)}\")\n","sourceCodeStart":533,"sourceCodeEnd":561,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/routers/skills.py#L533-L561","documentation":"Error \"Failed to reload skill '{skill_name}' after update\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/app/gateway/routers/skills.py:551 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the skill's content for syntax or schema errors that prevent reload.","Restart the Gateway to force a clean skill reload, then reapply the update."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}