eca icon indicating copy to clipboard operation
eca copied to clipboard

Feature request: Configurable chat retention period

Open ovistoica opened this issue 7 months ago • 0 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Problem

Chat history is deleted after 7 days with no way to change this. The TTL is hardcoded in db.clj and called unconditionally on every server startup.

I often want to /resume sessions weeks or months later because they contain valuable context — architectural decisions, debugging breadcrumbs, task lists — that I don't want to lose or have to reconstruct. This is very useful for forking too

Proposed solution

Add a chatRetentionDays config key (defaulting to 7 for backwards compatibility):

{
  "chatRetentionDays": 90
}

Setting it to 0 or -1 should disable cleanup entirely.

Affected code

  • src/eca/db.clj — seven-days-ms constant and cleanup-old-chats!
  • src/eca/handlers.clj:150 — call site that should pass the config value through

ovistoica avatar Apr 05 '26 08:04 ovistoica