fix(gateway): pass max_total_size_mb and max_file_size_mb to CheckpointManager

The /rollback command handler in gateway/run.py was constructing
CheckpointManager with only enabled and max_snapshots, omitting
max_total_size_mb and max_file_size_mb that the __init__ expects.
This caused a TypeError on every /rollback invocation when checkpoints
were enabled.

Fixes: NousResearch/hermes-agent#18841
This commit is contained in:
Daniel Marta 2026-05-09 20:54:36 +00:00 committed by Teknium
parent 4ca7c2104d
commit 1fb9f7c68c

View file

@ -9561,6 +9561,8 @@ class GatewayRunner:
mgr = CheckpointManager(
enabled=True,
max_snapshots=cp_cfg.get("max_snapshots", 50),
max_total_size_mb=cp_cfg.get("max_total_size_mb", 500),
max_file_size_mb=cp_cfg.get("max_file_size_mb", 10),
)
cwd = os.getenv("TERMINAL_CWD", str(Path.home()))