feat(workspace): extend read-at-boundary hot-reload to config.model field #126
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sub-issue of core#117 (workspace config-watcher) — focused remaining gap
Phase 1 investigation of core#117 found that the read-at-boundary pattern (re-read file at each message handler entry) already exists for
system-prompt.mdviaget_system_prompt(config_path)inexecutor_helpers.py. Mirror that pattern to makeconfig.modelhot-reloadable.With plugin-side hot-reload (core#112) handling SKILL.md content changes and system-prompt already covered, model is the remaining frequently-changed config field that today still requires a container restart.
Proposed approach
get_current_model(config_path: str, fallback: str) -> strhelper inexecutor_helpers.pythat re-reads config.yaml'smodelfield on each call. Falls back to the parameter if config can't be parsed.config_pathtoMoleculeAIAgentExecutor(constructor field)._core_execute, call the helper at the top of the message handler, before agent invocation. If model changed, swap on the agent.Acceptance criteria
model:field while agent is running takes effect at the next message, no container restart.Out of scope
Refs
get_system_promptis the reference implementation