3 ms·
We discuss token limits and context windows extensively, yet we rarely talk about the least complicated issue: Claude Code simply forgets everything between ses
by nihalwashere 7mo ago
We discuss token limits and context windows extensively, yet we rarely talk about the least complicated issue: Claude Code simply forgets everything between sessions. It does not recall the bug you solved last week. It is not aware of which package manager your team uses. It does not understand that restarting the worker will resolve the flakey test, nor does it understand that the method it is going to attempt to use again had previously failed during the previous 3 sessions. Each session is a blank slate.
This would likely be sufficient if you were to only develop for a single repository. However, when developing for what most actual projects resemble, a front-end application consuming a back-end application utilizing a common library, and an SDK using the APIs of both, then this represents the difference between an assistive tool and one that wastes the initial 20 minutes attempting to rediscover what it could have recalled from prior sessions.
The model is intelligent. The problem lies within the institution. The same reason a highly capable new employee is nearly useless for their first month is due to lack of context. They may be able to accomplish the tasks, however they have no context to draw upon.
forge addresses this issue by enabling Claude Code to persistently retain contextual information.
Upon cloning Forge into your workspace, running ./forge/setup is all that is required. No dependencies. Only markdown, bash, and git. It generates a {project}-context/ directory. This directory is Claude Code's persistent memory. Hooks automatically inject context when a session begins and immediately following compaction. There is no need for manually injecting context. As soon as you begin working, the context will already be available. Rules, wiki index, current project status, backlog, and learnings from previous sessions.
/compile-wiki reads your complete codebase and constructs structurally organized wiki articles optimized for LLM ingestion. Architecture, API endpoints, service integration, and data flow. Each subsequent session adds to the knowledge base. Following ten sessions, the wiki understands your system better than any documentation you'd produce by hand.
/checkpoint saves what was accomplished, what failed and why, and what remains. The next session will read this automatically. You will not need to repeat dead ends.
/rule never force push to main saves the rule indefinitely and loads it in each session. It also ensures that it is enforced upon git commit through a
pre-commit hook.
Learnings are saved along with confidence levels based upon their age. Confidence score decays at a rate of 1 point every thirty days. Six months old stale advice is less valuable than learnings generated yesterday.
/test-fix executes your tests, identifies failure points, fixes issues with atomic commits, and verifies. Unattended, it continuously loops until completion. It includes safeguards: three strike rule per bug, twenty fix cap, and WTF-likelihood scores every five fixes. Prior to execution, it checks against the backlog. Therefore it will never reuse documented dead end approaches.
Forge provides something I could not find elsewhere: multi-repository awareness. Forge views all repositories within your workspace as one unified system. The wiki records how services interact with each other, shared data models, inter-service failure modes, and dependency chains. When a bug in service A was created due to service B's API contract, forge follows the chain across boundaries. The wiki was created by parsing all the repositories, not just the one that happens to currently reside in your workspace.
forge compounds knowledge. It does not create knowledge. The quality of the wiki is dependent on the quality of the codebase being parsed. The effectiveness of the rules is dependent upon the lessons you have learned. If you have not considered your architecture, forge cannot consider it for you either.