Skip to content

new context system#8

Merged
kevint-cerebras merged 1 commit intodevfrom
context-management
Dec 24, 2025
Merged

new context system#8
kevint-cerebras merged 1 commit intodevfrom
context-management

Conversation

@kevint-cerebras
Copy link
Owner

@kevint-cerebras kevint-cerebras commented Dec 20, 2025

The CLI has a few different dynamic variables that prevent prompt caching, contained in the environment system which contains info about the cwd, git status, file tree, etc.

As shown in the chart below, these dynamic variables appear before systems like custom and the user's conversation history, both of which are much less likely to change than environment, and thus much more cacheable.

So, this PR rearranges the order in which the systems are sent to the LLM so that environment appears as the last possible system before the most recent user message - meaning the only things NOT likely to be cached will be the environment system and the most recent user message.

This will provide a significant cache hit rate improvement, because custom instructions + the entire conversation history can now be easily cached.

Cache flow before PR:

Screenshot 2025-12-19 at 8 10 06 PM

Cache flow after PR:

image

@kevint-cerebras kevint-cerebras changed the title new caching system new context system Dec 20, 2025
@kevint-cerebras kevint-cerebras merged commit 64a886b into dev Dec 24, 2025
0 of 7 checks passed
kassieclaire added a commit to kassieclaire/cerebras-code-cli that referenced this pull request Feb 27, 2026
Phase 01: Exploration & Architecture Validation

Changes:
- 01-01: Added sidebar split pattern task, combined documentation, added ARCH verification
- 01-02: Split from old 01-02 (keyboard infrastructure only, 3 tasks)
- 01-03: NEW - keybind audit + documentation (split from old 01-02)
- 01-04: Renumbered from 01-03, fixed must_haves for store-agnostic design

Issues addressed:
- Blocker kevint-cerebras#1: Added sidebar split pattern task to 01-01 (Success Criteria kevint-cerebras#3)
- Blocker kevint-cerebras#2: Split 01-02 (5 tasks) into 01-02 (3) + 01-03 (2)
- Blocker kevint-cerebras#3: Fixed must_haves/key_links for store-agnostic prototype
- Warning kevint-cerebras#4: Fixed wave dependencies (01-02 wave 2, 01-03 wave 3)
- Warning kevint-cerebras#5: Added RESEARCH.md to <files> for exploration tasks
- Warning kevint-cerebras#6: Added test file to 01-04 files_modified
- Warning kevint-cerebras#8: Added ARCH constraint verification to 01-01 and 01-04

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant