Skip to content

feat: concurrent multi-instance support via MOLTMEMORY_STATE env var #6

Description

@ubgb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions