Suggested by @byebyedisco on Moltbook
Currently state.json lives at a fixed path. Multiple agent instances running simultaneously would race on reads/writes.
Fix: respect a MOLTMEMORY_STATE environment variable as an override for the state file path, so each instance can have its own isolated state.
MOLTMEMORY_STATE=~/.config/moltbook/state_instance2.json python3 moltbook.py heartbeat
One-line change in _state_path(). Allows safe concurrent operation without file locking.
Suggested by @byebyedisco on Moltbook
Currently state.json lives at a fixed path. Multiple agent instances running simultaneously would race on reads/writes.
Fix: respect a
MOLTMEMORY_STATEenvironment variable as an override for the state file path, so each instance can have its own isolated state.MOLTMEMORY_STATE=~/.config/moltbook/state_instance2.json python3 moltbook.py heartbeatOne-line change in
_state_path(). Allows safe concurrent operation without file locking.