fix: cache plugin tool factories by context

This commit is contained in:
Peter Steinberger
2026-05-02 12:19:23 +01:00
parent 335f870cd2
commit 40f2bf3950
4 changed files with 319 additions and 14 deletions

View File

@@ -368,6 +368,12 @@ including plugin id, declared tool names, result shape, and whether the tool is
optional. Slow lines are promoted to warnings when a single factory takes at
least 1s or total plugin tool factory prep takes at least 5s.
OpenClaw caches successful plugin tool factory results for repeated resolutions
with the same effective request context. The cache key includes the effective
runtime config, workspace, agent/session ids, sandbox policy, browser settings,
delivery context, requester identity, and ownership state, so factories that
depend on those trusted fields are re-run when the context changes.
If one plugin dominates the timing, inspect its runtime registrations:
```bash