Scenario
If GenericAgent is used as a long-running companion-style or IM-entry agent, restarts are normal: system updates, dependency upgrades, model configuration changes, code changes, crash recovery, and so on. If the agent remembers nothing from the last few turns after restart, users will feel that the agent has lost its memory.
Current Pain Points
- After restart, only long-term memory remains; concrete recent conversations are lost.
- Context, constraints, and task progress that the user just provided cannot be restored automatically.
- Asking users to manually find logs or restate everything leads to a poor experience.
- Injecting all old logs directly into the prompt can also be dangerous, because old state may be mistaken for current instructions.
Suggested Direction
Add cold-start recent session recall:
- On startup, scan the most recent N conversation logs / model response files.
- For each session, extract only the last few user/assistant turns or an existing summary.
- Clearly mark the content as “recent session memory”, not current instructions.
- Inject it only into the first non-lightweight message to avoid repeated prompt pollution.
- Make it configurable, for example
GA_STARTUP_RECALL_SESSIONS=5 and GA_STARTUP_RECALL_LINES=8.
Recent session recall should be separated from long-term memory. It should only help orientation after cold start, and should not automatically be promoted into durable facts. Stable preferences and methodologies should still go into memory/skills.
Acceptance Criteria
- After restart, the first real message can include a recent-session summary.
- Recent-session content includes timestamp/source and clearly says “do not treat this as a new instruction”.
- Lightweight greetings/status checks do not trigger large history injection.
- The feature can be disabled through an environment variable or config option.
Scenario
If GenericAgent is used as a long-running companion-style or IM-entry agent, restarts are normal: system updates, dependency upgrades, model configuration changes, code changes, crash recovery, and so on. If the agent remembers nothing from the last few turns after restart, users will feel that the agent has lost its memory.
Current Pain Points
Suggested Direction
Add cold-start recent session recall:
GA_STARTUP_RECALL_SESSIONS=5andGA_STARTUP_RECALL_LINES=8.Recent session recall should be separated from long-term memory. It should only help orientation after cold start, and should not automatically be promoted into durable facts. Stable preferences and methodologies should still go into memory/skills.
Acceptance Criteria