Summary
When bindings are added or removed via config.patch, the gateway always performs a full restart. For use cases that dynamically create and destroy agent-channel bindings at runtime (e.g., task channel orchestration), this causes unnecessary downtime on every routing change.
Use Case
We're building a Discord Channel Orchestrator that:
- Creates Discord channels on-demand (e.g.,
#task-tesla-research, #task-audi-research)
- Binds a specific agent to each new channel via
config.patch
- Archives channels and removes bindings when tasks are complete
This pattern requires a binding update per task batch. Each update triggers a ~3-5 second gateway restart. For infrequent use, this is tolerable. At higher frequency (multiple parallel task batches per day), the restart overhead becomes disruptive — especially since existing sessions must reconnect after each restart.
Proposed Solution
Add a hot binding reload path: a signal or API call that causes the gateway to re-read the bindings[] array from config and update its routing table without restarting.
Option A — SIGUSR2 for binding reload
# Send SIGUSR2 to reload only the bindings section
kill -USR2
# or
openclaw gateway reload-bindings
Option B — Dedicated config.reload method
openclaw gateway call config.reload --params '{sections: [bindings]}'
This would:
- Re-read the config file on disk
- Diff the
bindings[] array against the current in-memory state
- Update routing tables atomically
- Return
{ ok: true, added: 2, removed: 0 }
- No restart. No session disruption. No reconnect.
Why This Is Safe
Bindings are routing rules only — they don't affect model config, auth, channels, or agent definitions. Updating them at runtime doesn't require tearing down sessions or reconnecting to providers. It's a pure in-memory routing table update.
A failed binding reload (invalid config) should return an error and leave existing bindings intact, with no gateway restart.
What Would Change in config.patch
Add an optional field restartRequired to the response:
{
"ok": true,
"restart": { "required": false, "reason": "bindings-only-change" }
}
Or expose a config.patch --no-restart flag for binding-only patches that the caller can use when they know a restart isn't needed.
Environment
- OpenClaw version: 2026.2.25
- OS: macOS (arm64), Darwin 25.3.0
- Channel: Discord (guild channels)
Related
Summary
When bindings are added or removed via
config.patch, the gateway always performs a full restart. For use cases that dynamically create and destroy agent-channel bindings at runtime (e.g., task channel orchestration), this causes unnecessary downtime on every routing change.Use Case
We're building a Discord Channel Orchestrator that:
#task-tesla-research,#task-audi-research)config.patchThis pattern requires a binding update per task batch. Each update triggers a ~3-5 second gateway restart. For infrequent use, this is tolerable. At higher frequency (multiple parallel task batches per day), the restart overhead becomes disruptive — especially since existing sessions must reconnect after each restart.
Proposed Solution
Add a hot binding reload path: a signal or API call that causes the gateway to re-read the
bindings[]array from config and update its routing table without restarting.Option A — SIGUSR2 for binding reload
Option B — Dedicated
config.reloadmethodopenclaw gateway call config.reload --params '{sections: [bindings]}'This would:
bindings[]array against the current in-memory state{ ok: true, added: 2, removed: 0 }Why This Is Safe
Bindings are routing rules only — they don't affect model config, auth, channels, or agent definitions. Updating them at runtime doesn't require tearing down sessions or reconnecting to providers. It's a pure in-memory routing table update.
A failed binding reload (invalid config) should return an error and leave existing bindings intact, with no gateway restart.
What Would Change in
config.patchAdd an optional field
restartRequiredto the response:{ "ok": true, "restart": { "required": false, "reason": "bindings-only-change" } }Or expose a
config.patch --no-restartflag for binding-only patches that the caller can use when they know a restart isn't needed.Environment
Related
restartReason=config.patchin gateway-cli source