The current memory core protocol relies on a "save-then-respond" transactional model. However, this model can break down due to various factors, such as incorrect tool usage, API errors, or unexpected interruptions in the message-reply flow. When such a breakdown occurs, unpersisted messages can be lost, leading to incomplete session histories and hindering future analysis and learning.
This ticket aims to introduce a robust session recovery protocol within AGENTS.md. This protocol will provide clear instructions for the agent on how to handle memory persistence failures, ensuring that all previous messages are added to the memory core in chronological order, thereby preventing data loss and maintaining the integrity of the session history.
Acceptance Criteria
- A new section, "Session Recovery Protocol," is added to
AGENTS.md (e.g., under "Development Workflow" or as a new top-level section).
- This section clearly defines the scenarios that trigger the recovery protocol (e.g., tool errors, API failures, detected gaps in memory).
- The protocol instructs the agent to, upon detecting a memory persistence failure or gap, attempt to add all unpersisted previous messages of the current session to the memory core in chronological order.
- The protocol should specify how the agent identifies "unpersisted" messages (e.g., by comparing its internal conversation history with what's confirmed in memory).
- The protocol should emphasize the importance of this recovery step for maintaining a complete and analyzable session history.
- The agent's internal logic must be updated to implement and adhere to this session recovery protocol.
The current memory core protocol relies on a "save-then-respond" transactional model. However, this model can break down due to various factors, such as incorrect tool usage, API errors, or unexpected interruptions in the message-reply flow. When such a breakdown occurs, unpersisted messages can be lost, leading to incomplete session histories and hindering future analysis and learning.
This ticket aims to introduce a robust session recovery protocol within
AGENTS.md. This protocol will provide clear instructions for the agent on how to handle memory persistence failures, ensuring that all previous messages are added to the memory core in chronological order, thereby preventing data loss and maintaining the integrity of the session history.Acceptance Criteria
AGENTS.md(e.g., under "Development Workflow" or as a new top-level section).