openclaw - 💡(How to fix) Fix session.reset: support mode: "never" for manual-only session reset behavior [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#57369Fetched 2026-04-08 01:50:34
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
subscribed ×1

Please add a proper mode: "never" option to session reset configuration so sessions can be configured for true manual-only reset behavior.

Right now the closest workaround is to use mode: "idle" with a very large idleMinutes value, but that is only an approximation and not a real "never reset automatically" mode.


Root Cause

However, that is still only a workaround because:

  • it is semantically wrong
  • it is fragile / surprising
  • it still technically resets eventually
  • it forces users to pick arbitrary huge numbers
  • config intent is less readable than an explicit never

Fix Action

Fix / Workaround

Right now the closest workaround is to use mode: "idle" with a very large idleMinutes value, but that is only an approximation and not a real "never reset automatically" mode.

Example workaround currently possible:

However, that is still only a workaround because:

  • it is semantically wrong
  • it is fragile / surprising
  • it still technically resets eventually
  • it forces users to pick arbitrary huge numbers
  • config intent is less readable than an explicit never

Code Example

{
  "session": {
    "resetByChannel": {
      "signal": {
        "mode": "idle",
        "idleMinutes": 52560000
      }
    }
  }
}

---

{
  "session": {
    "reset": {
      "mode": "never"
    }
  }
}

---

{
  "session": {
    "resetByType": {
      "group": {
        "mode": "never"
      }
    },
    "resetByChannel": {
      "signal": {
        "mode": "never"
      }
    }
  }
}

---

type SessionResetConfig =
  | { mode: "daily"; atHour?: number }
  | { mode: "idle"; idleMinutes: number }
  | { mode: "never" };

---

{
  "mode": "never"
}

---

{ "mode": "idle", "idleMinutes": 52560000 }
RAW_BUFFERClick to expand / collapse

Summary

Please add a proper mode: "never" option to session reset configuration so sessions can be configured for true manual-only reset behavior.

Right now the closest workaround is to use mode: "idle" with a very large idleMinutes value, but that is only an approximation and not a real "never reset automatically" mode.


Motivation

For some channels, especially personal messaging channels like Signal, I want sessions to persist indefinitely unless I explicitly reset them.

This is useful when:

  • long-lived conversational continuity matters
  • the assistant should retain context across long gaps
  • daily resets are too aggressive
  • even idle-based resets are undesirable

A manual-only mode would make OpenClaw much better for persistent, relationship-style chat surfaces.


Current behavior

The current session reset schema appears to support only:

  • mode: "daily"
  • mode: "idle"

Example workaround currently possible:

{
  "session": {
    "resetByChannel": {
      "signal": {
        "mode": "idle",
        "idleMinutes": 52560000
      }
    }
  }
}

This approximates "never" by setting the idle timeout to ~100 years.

However, that is still only a workaround because:

  • it is semantically wrong
  • it is fragile / surprising
  • it still technically resets eventually
  • it forces users to pick arbitrary huge numbers
  • config intent is less readable than an explicit never

Expected behavior

OpenClaw should support a true non-automatic-reset mode, for example:

{
  "session": {
    "reset": {
      "mode": "never"
    }
  }
}

And similarly in overrides:

{
  "session": {
    "resetByType": {
      "group": {
        "mode": "never"
      }
    },
    "resetByChannel": {
      "signal": {
        "mode": "never"
      }
    }
  }
}

Meaning:

  • no daily automatic reset
  • no idle automatic reset
  • session remains fresh until explicitly reset by the user/operator or another explicit mechanism

Suggested config shape

Current schema seems to be roughly:

  • daily
  • idle

Suggested extension:

type SessionResetConfig =
  | { mode: "daily"; atHour?: number }
  | { mode: "idle"; idleMinutes: number }
  | { mode: "never" };

Or, if preserving the existing object style:

{
  "mode": "never"
}

with atHour / idleMinutes ignored or rejected in that mode.


Why the very-large-idle workaround is not enough

Using:

{ "mode": "idle", "idleMinutes": 52560000 }

is not a real substitute because:

  1. Wrong semantics

    • "never reset automatically" is different from "reset after a giant timeout"
  2. Poor readability

    • future operators have to reverse-engineer why a huge number was chosen
  3. Still eventually expires

    • technically not manual-only
  4. Potential implementation edge cases

    • giant values may interact oddly with tooling, validation, UI, docs, or future refactors
  5. Hard to document

    • users should not need to encode intent through arbitrary huge idle durations

Backward compatibility

This should be a backward-compatible additive change:

  • existing daily and idle configs continue to work unchanged
  • never is simply a new allowed mode

Nice-to-have

It would also help if docs/examples explicitly covered:

  • base session.reset
  • session.resetByType
  • session.resetByChannel
  • when channel overrides take precedence over type/base policy

Environment

Observed on an installed OpenClaw build where:

  • session.resetByChannel is accepted by schema
  • SessionResetConfig appears limited to daily | idle
  • channel-specific override works, but there is no explicit never mode yet

extent analysis

Fix Plan

To implement the mode: "never" option for session reset configuration, follow these steps:

  • Update the SessionResetConfig type to include the new mode:
type SessionResetConfig =
  | { mode: "daily"; atHour?: number }
  | { mode: "idle"; idleMinutes: number }
  | { mode: "never" };
  • Modify the session reset logic to handle the new mode:
function resetSession(config: SessionResetConfig) {
  switch (config.mode) {
    case "daily":
      // daily reset logic
      break;
    case "idle":
      // idle reset logic
      break;
    case "never":
      // do not reset session automatically
      return;
    default:
      throw new Error(`Invalid session reset mode: ${config.mode}`);
  }
}
  • Update the configuration parsing to accept the new mode:
function parseSessionConfig(config: any): SessionResetConfig {
  if (config.mode === "never") {
    return { mode: "never" };
  } else if (config.mode === "daily") {
    return { mode: "daily", atHour: config.atHour };
  } else if (config.mode === "idle") {
    return { mode: "idle", idleMinutes: config.idleMinutes };
  } else {
    throw new Error(`Invalid session reset mode: ${config.mode}`);
  }
}
  • Add documentation and examples for the new mode:
### Session Reset Configuration

The session reset configuration can be set to one of the following modes:

* `daily`: Reset the session daily at a specified hour.
* `idle`: Reset the session after a specified idle time.
* `never`: Do not reset the session automatically.

Example configurations:
```json
{
  "session": {
    "reset": {
      "mode": "never"
    }
  }
}
{
  "session": {
    "resetByType": {
      "group": {
        "mode": "never"
      }
    },
    "resetByChannel": {
      "signal": {
        "mode": "never"
      }
    }
  }
}

Verification

To verify that the fix worked, test the following scenarios:

  • Set the session reset mode to never and verify that the session is not reset automatically.
  • Set the session reset mode to daily or idle and verify that the session is reset accordingly.
  • Test the resetByType and resetByChannel overrides to ensure they take precedence over the base policy.

Extra Tips

  • Make sure to update the documentation and examples to reflect the new never mode.
  • Consider adding a warning or error message when a user attempts to set an invalid session reset mode.
  • Test the fix thoroughly to ensure it works as expected

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

OpenClaw should support a true non-automatic-reset mode, for example:

{
  "session": {
    "reset": {
      "mode": "never"
    }
  }
}

And similarly in overrides:

{
  "session": {
    "resetByType": {
      "group": {
        "mode": "never"
      }
    },
    "resetByChannel": {
      "signal": {
        "mode": "never"
      }
    }
  }
}

Meaning:

  • no daily automatic reset
  • no idle automatic reset
  • session remains fresh until explicitly reset by the user/operator or another explicit mechanism

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix session.reset: support mode: "never" for manual-only session reset behavior [1 participants]