Skip to content

feat: Tiered history retrieval (hot/cold layer pattern) #595

Closed as duplicate

Description

@tamirdresher

Feature Proposal: Tiered History Retrieval

Problem

Agent history.md files grow unbounded. Currently Scribe summarizes at 12KB, but agents read everything — no distinction between recent context and archived knowledge. This wastes context window tokens and slows agent startup.

Proposed Solution

Formalize a two-tier retrieval pattern inspired by ClawMongo's tiered projection model:

Hot layer (history.md): Last ~20 entries. Always read at spawn time. Fresh, actionable context.
Cold layer (history-archive.md): Summarized older entries. Read only when agent explicitly needs historical context.

Implementation

  1. Spawn prompt change: agents read history.md (hot) by default. Only read history-archive.md when the task references past decisions or old patterns.
  2. Scribe summarization: when history.md exceeds threshold, move old entries to archive with summaries (already partially implemented).
  3. Search cold: add a 'search archive' pattern agents can invoke when they need historical context.

Benefits

  • Reduced context window usage (~60% less tokens for history)
  • Faster agent startup
  • No external DB required — pure file-based

Prior Art

Inspired by ClawMongo's tiered retrieval model (https://clawmongo.site) which uses ID-only projections for 10x context reduction. Adapted for Squad's file-based architecture.

Activity

  1. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    📋 Assigned to Procedures (Prompt Engineer)

    Issue: #595 — feat: Tiered history retrieval (hot/cold layer pattern)

    Procedures will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    Procedures, work on issue #595

  2. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #595 — feat: Tiered history retrieval (hot/cold layer pattern)
    Assigned to: DSKY (TUI Engineer)
    Reason: Issue relates to frontend/UI work

    @copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  3. bradygaster commented on Mar 26, 2026

    @bradygaster
    Collaborator

    Triage: Contributor-submitted tiered history retrieval feature. Hot/cold layer pattern for context management. Assigned to Procedures (agent memory architecture).

  4. diberry commented on Mar 31, 2026

    @diberry
    Contributor

    🔄 Ralph status: Feature — 2-tier history retrieval. Research done in #686. Subset of #600 (which adds wiki tier). No implementation PR yet.

  5. 1 remaining item

  6. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  7. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  8. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  9. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  10. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  11. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  12. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: architect
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  13. bradygaster commented on Sep 23, 2026

    @bradygaster
    Collaborator

    Closing as a duplicate of #600 — issue comments on this thread explicitly state #595 is a subset of #600 and #600 is the superset covering this work. The shipped tiered-memory docs/skill track the combined scope under #600 (and #1264).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions