1jehuang / 1jehuang/jcode

llama.cpp compaction message after every input

Open
#860 3 comments 0 reactions 0 assignees View on GitHub

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
Image
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.