-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature]: logical chat history across rolled sessions #43929
Copy link
Copy link
Closed as not planned
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
Add a logical-history mode to
chat.historyso long-lived chats can retain continuity across daily, idle, or manual session rollovers.Problem to solve
A stable session key such as
agent:main:maincan roll over to a newsessionIdafter daily, idle, or manual reset. That behavior is expected, butchat.historycurrently reads only the current transcript behind the currentsessionId.For WebChat / Control UI users, this makes one long-lived direct conversation look like it only contains the newest segment, even though older rolled transcript files still exist. From the user's point of view this is one ongoing chat, but from the current API point of view only the latest segment is visible.
Proposed solution
Keep reset behavior unchanged, but extend
chat.historywith an optional logical-history mode.Suggested direction:
chat.history(scope: "current")keeps existing behaviorchat.history(scope: "logical")returns the current segment plus previous rolled segments for the same logical session keyLogical mode should also return lightweight segment metadata, for example:
sessionIdstartedAtendedAtreasonThis would let WebChat / Control UI render continuity across rollovers without scanning transcript files directly, and it would work for both local and remote gateway setups.
Alternatives considered
UI-only recovery is weaker because clients cannot reliably scan transcript files directly, especially in remote gateway setups. Increasing the current
chat.historylimit also does not solve the root problem, because older rolled segments are in previous transcripts, not just outside the current limit window.Impact
Affected users/systems/channels:
Severity:
Frequency:
Consequence:
Evidence/examples
A long-lived direct chat can keep the same logical session key while rotating to a new
sessionId. After rollover,chat.historyonly returns the newest segment, while older rolled transcript files still exist on disk. This creates an API/UI continuity gap rather than actual transcript deletion.Additional information
No response