llama.cpp compaction message after every input
Open
Nobody has claimed this yet.
bug
needs-info
triage: unclear
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
I get basically always after the first input the following compaction message
📦 Emergency compaction - older messages were dropped to recover from context pressure. Recent context was kept.
Took 0ms · before ~17,562 tokens · now ~142 tokens (0.1% of window) · saved ~17,420 tokens · dropped 1 message · summary 147 chars · kept 3 recent
messages live
jcode provider add local-ai --auth bearer --base-url http://localhost:11434/v1 --model-catalog -m gemma-4-26B-A4B-it-qat-UD-Q4_K_XL --set-default --api-key **************** --context-window 131072 --overwrite
cat ~/.jcode/config.toml | sprunge
https://paste.rs/Yul41
Llama is in router mode and the models work fine with claude & opencode and OpenWebui.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the repeated compaction with the provided jcode provider command and inspect the referenced ~/.jcode/config.toml configuration. Trace the request's context-window and compaction handling for the local-ai provider, then compare the observed token counts with the configured 131072 window. Done means normal input does not trigger emergency compaction after the first message, or the configuration mismatch is clearly reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100