#Agent seems to not save memory overnight

1 messages · Page 1 of 1 (latest)

last ridge
#

When working with my agent on codex gpt 5.5 i might be working on something and then say ill go to bed, ill give you that api token in the morning. I come back in the morning with the token and it just has no clue what its looking at. my assumption is the session is like timing out and its saving nothing like it should? i am on 4.23

fast pewterBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

formal basaltBOT
#

Rose Gold — your assumption is close, but I’d phrase it as: it’s probably starting a fresh session overnight, not necessarily failing to save anything.

OpenClaw sessions reset by default on a daily boundary at 4:00 AM local time. The old transcript should still be on disk under:
~/.openclaw/agents/<agentId>/sessions/

So if you say “I’ll give you the token in the morning,” then come back after the daily reset, the agent may be in a new session and won’t have the prior working context loaded.

Two things to check:

openclaw --version
openclaw sessions --all-agents
openclaw status --all

For your workflow, I’d change session reset behavior to idle-based instead of daily, especially for Discord/forum threads. Example config:

#
{
  session: {
    reset: { mode: "idle", idleMinutes: 10080 }, // 7 days
    resetByType: {
      thread: { mode: "idle", idleMinutes: 10080 },
      direct: { mode: "idle", idleMinutes: 10080 },
    },
  },
}

If you’re using focused Discord thread bindings/subagents, also check the binding idle timeout — docs default that to 24h. In the thread you can use:

/session idle off
#

One practical habit: before bed, ask it to write a short handoff note to the repo/workspace like HANDOFF.md with “what we’re doing, what token is missing, next command.” Don’t store the actual API token in memory; configure it in env/auth when you come back.

last ridge
#

im using telegram. im totally fine with waiting until i run /new. i might want to work with it over a day or two in small focused sessions. Can i just turn that off? I will make something to warn me on compactions and when im nearing context limits but id like to work until im maxed out on context without being stopped like this

formal basaltBOT
#

Yep — for Telegram, the practical answer is: don’t use daily reset; switch Telegram/session reset to idle with a very large window. Then it’ll keep the same session until you explicitly /new or /reset — or until you finally hit context/compaction behavior.

I don’t think there’s a clean mode: "off" reset mode in current config; the safe equivalent is a huge positive idleMinutes.

Example, Telegram-only:

{
  session: {
    resetByChannel: {
      telegram: {
        mode: "idle",
        idleMinutes: 525600, // 1 year
      },
    },
  },
#
}

Or globally for everything:

{
  session: {
    reset: {
      mode: "idle",
      idleMinutes: 525600,
    },
  },
}
#

After changing config, restart the gateway.

Then your workflow becomes exactly what you described:

  • keep working over multiple days
  • no overnight 4am daily reset cutting the session
  • manually send /new when you want a clean slate
  • use /compact manually if you want to force a summary
  • use /status to watch context/model/session state

One caveat: long sessions can still compact or get squeezed by the model context window. So your “warn me near compaction/context limit” idea is the right layer to build. This config stops the time-based interruption; it doesn’t make the model context infinite.

Docs: https://docs.openclaw.ai/concepts/session

lusty orbit
#

Install the lossless-claw plugin and your claw will remember everything (across reboots, restarts, new sessions).


openclaw plugins install @martian-engineering/lossless-claw
openclaw gateway restart

You can read more details about LCM at https://github.com/Martian-Engineering/lossless-claw