Almond
Debug with Déjà Vu
Created on 15th February 2026
•
Almond
Debug with Déjà Vu
The problem Almond solves
Project Description
Almond is an Institutional Memory Engine designed to solve "Context Rot" in engineering teams. It stops developers from solving the same bug twice by turning passive logs and git history into an active, recursive intelligence.
Unlike standard RAG (Retrieval-Augmented Generation) which "chunks" data and loses sequential logic, Almond uses a Recursive Language Model (RLM) architecture. It treats your entire engineering history as a Programmable State Variable that it can programmatically grep, slice, and analyze to find the exact root cause of an error, just like a Senior Engineer would.
Link to the Arxiv Paper : RECURSIVE LANGUAGE MODELS Dec 2025
The Problem: Institutional Amnesia
The average engineer stays at a company for ~2 years. When they leave, their "tribal knowledge" leaves with them.
- The Cost: New hires waste hours debugging "Ghost Bugs", issues that were solved years ago, but the context is buried in closed PRs or Slack threads.
- The RAG Failure: Standard RAG vector databases retrieve similar looking errors (e.g., matching "Error 500" to another "Error 500"), often missing the causal link (e.g., "The database migration in PR #402 caused this").
The Solution: Recursive Memory
Almond replaces vector similarity with Recursive Code Execution.
- The Vault (Librarian): We ingest raw logs, PR descriptions, and post-mortems into a linear, time-series "Memory Vault."
- The Brain (Orchestrator): Using Anthropic’s Context Caching, we load this massive context efficiently. The RLM engine writes Python scripts to recursively "search and narrow" the history finding the exact commit that introduced a regression.
- The Tool (Integrator): A simple CLI (almond fix) that sits in your terminal. When you hit a bug, Almond tells you: "This happened 6 months ago. Here is the fix."
What can people use it for?
- Instant Debugging:
Almond doesn't just give generic advice; it points to the specific pull request or config change in your history that likely caused the issue. - Onboarding New Engineers:
Junior developers can query the "Vault" to understand why a legacy system was built a certain way, without needing to distract senior staff. - Post-Mortem Analysis:
Automatically correlate a live production incident with recent deployments or infrastructure changes to speed up Mean Time To Resolution (MTTR).
How it makes tasks Easier & Safer
- Eliminates Redundancy : Prevents the "Groundhog Day" scenario of fixing the same bug multiple times across different teams.
- Context-Aware Safety: Unlike generic AI coding assistants that might suggest dangerous commands, Almond bases its suggestions on your team's proven successful fixes.
- Deep Reasoning : By using RLM instead of RAG, Almond can follow complex chains of causality (e.g., Ticket A -> Commits B -> Bug C) that vector search misses completely.
- Cost Efficient : Leveraging Context Caching, we avoid reprocessing the entire history for every query, making "Infinite Memory" economically viable.
Tech Stack
- Core Logic: Recursive Language Model (RLM) based on Zhang et al.
- LLM Backend: Anthropic Claude 3.5 Sonnet (via Context Caching API).
- Environment: Sandboxed Python REPL for safe recursive code execution.
- Interface: Python-based CLI tool.
Challenges we ran into
Challenge 1: The Cost of "Infinite" Context
Processing massive engineering logs for every query was prohibitively expensive and slow (~45s latency).
- How we got over it: We implemented Anthropic’s Context Caching (Beta). By caching our "Memory Vault" once, we reduced query latency to ~2s and cut token costs by nearly 90%, making the architecture economically viable.
Challenge 2: Infinite Recursion Loops
The Recursive Language Model (RLM) would sometimes get stuck in "rabbit holes," endlessly querying itself for minor details.
- How we got over it: We built a "Supervisor State Machine" with a strict recursion depth limit (max depth = 15). If the model's confidence score doesn't improve after a hop, the Supervisor terminates the branch and forces a synthesis.
Challenge 3: Hallucinated Fixes
Early versions would confidently cite non-existent PRs or commits as fixes.
- How we got over it: We shifted from "Chatting" to "Executing." We forced the RLM to write and run actual Python code (using grep and git show) to verify a fix existed in the history before presenting it to the user.
Tracks Applied (1)
