agentscope-ai / agentscope-ai/AgentTeams
Plugins enabled via `openclaw plugins enable` are lost after gateway in-process restart
- Lenguaje dominante
- Go
- Estrellas
- 5.6k
- Forks
- 692
- Merge medio
- 5 d 4 h
- PR fusionados (30 d)
- 23
Descripción
## Bug Description
Plugins added via `openclaw plugins enable` (e.g., `active-memory`) are lost after gateway in-process restart. The config file reverts to its previous state within ~3-4 minutes of the write.
## Environment
- HiClaw: v1.1.1 (installed 2026-05-26, includes PR #732)
- OpenClaw: 2026.4.14 (2f35b6f)
- Platform: Docker Desktop on Windows with 9p mount (D:\ → /root/manager-workspace)
- Runtime: Manager Agent in embedded mode
## Steps to Reproduce
1. `openclaw plugins enable active-memory`
2. Config file updates correctly (e.g., 8590 bytes, `active-memory` entry present, `meta` field added)
3. Gateway detects config change via chokidar watcher → triggers in-process restart (SIGUSR1)
4. ~3-4 minutes later, config file reverts to previous state (8425 bytes, `active-memory` gone, `meta` gone)
5. No additional `config.write` audit event is recorded — the file change does not go through `writeConfigFile`
## What We've Verified
- PR #732's fix is present: `config-health.json` is deleted at container startup
- Deleting `config-health.json` manually before step 1 does **not** prevent the clobber
- `config-audit.jsonl` shows only 1 write (the CLI write) and 1 observe (detecting missing-meta)
- No additional write events between the CLI write and the observe ~3 minutes later
- The file content changes (different size, different hash) but no OpenClaw code path writes it
- All internal `writeConfigFile` calls have been traced and excluded as the cause
- `chmod 444` on the config file does **not** prevent the change (9p filesystem ignores Unix permissions)
## Suspected Root Cause
The clobber appears to happen during the gateway in-process restart cycle triggered by the chokidar config watcher. The meta field added by `stampConfigVersion` (called inside `writeConfigFile`) disappears after restart, but the restart path (`loadConfig` → `loadGatewayStartupConfigSnapshot` → `applyPluginAutoEnable`) does not call `writeConfigFile` when there are no auto-enable changes.
Given the 9p filesystem mount and the lack of any audited write, the most likely explanation is either:
1. A filesystem-level interaction between 9p cache coherency and the gateway restart sequence
2. An undiscovered code path in the restart flow that modifies the config without going through `writeConfigFile`
## Expected Behavior
`openclaw plugins enable ` should persist plugin configuration across gateway restarts.
## Workaround
None found. Config changes that don't require a restart (e.g., model switching via `config.patch`) work correctly because the hot-reload path is used instead of the restart path.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.