llama.cpp rejects a prompt that exceeds its allocated context
A 518-token prompt failed in a 512-token allocation. A 2,048-token allocation preserved the entire source and restored the three tested facts.
Retained qualification evidence · October 15, 2026Tested by the author and rerun by a separate agent on the same Mac. These are bounded task results, not a second-machine or human reproduction. This release reuses those runs; no new model inference was performed.
Download evidence ZIP
114,231 bytes
SHA-256: b57cd227a27d4fb92d9ae88de7f4a9591c3a3bb0dac4a6eae148395597e9e57a
The unchanged report below describes the original pilot. Statements that production was unchanged refer to that pilot, before this publication. Files mentioned in the report are inside the ZIP.
Context-overflow repair: measured results
Qualified October 15, 2026 Pacific on llama.cpp 0.6.0 build 11429 (d81235049), the pinned Qwen3-4B Q4_K_M GGUF, macOS 26.3 arm64 and CPU inference. A separate agent extracted the frozen runner ZIP into a fresh directory and independently reran every phase on the same physical Mac.
The complete chat template contains 518 tokens. With an allocated 512-token context, the server rejects the original input:
{"error":{"code":400,"message":"request (518 tokens) exceeds the available context size (512 tokens), try increasing it","type":"exceed_context_size_error","n_prompt_tokens":518,"n_ctx":512}}
Changing only --ctx-size 512 to --ctx-size 2048 preserves the full 1,861-character source document and its entire rendered prompt. The 518-token input plus 128-token output reserve totals 646, within the corrected allocation. All corrected answers recover the exact beginning, middle and end codes:
{"start_code":"ALPHA-17","middle_code":"BRAVO-42","end_code":"CHARLIE-93"}
| Executor | Baseline task passes | Corrected task passes | Reverted task passes |
| Author | 0/3 | 3/3 | 0/1 |
| Independent agent | 0/3 | 3/3 | 0/1 |
Each baseline/reversion produced the same exact HTTP 400 overflow, not an unrelated failure. Every corrected task stopped normally, used 36 completion tokens, reported 518 prompt tokens and zero cached tokens. The input requests, rendered prompt bytes and token-ID sequences remain identical across all arms; only the allocated context changes. No source was dropped, summarized or replaced. The checker also rejects wrong/missing/extra code fields; the independent evidence audit performs stricter duplicate-key checks.
Reproduce or inspect offline
README.md provides the fresh-inference command. To audit the included independent receipts without loading a model, run from this extracted distribution:
python3 evidence/independent-audit.py \
--archive evidence/verifier-input.zip \
--package . \
--results evidence/independent-run-001 \
--port 18086 \
--out /tmp/kingy-fix-002-offline-audit.json
The unchanged frozen seven-file input is retained at evidence/verifier-input.zip. The author run is evidence/author-run-001 and used 18085. INDEPENDENT-VERIFICATION.md records the clean extraction, input hash, direct observations and offline rejection controls. SHA256SUMS covers the distribution; the outer archive has a separate checksum receipt.
Limits
The public lead, issue #17284, used a different model, build and GPU configuration. This is a newly measured bounded analogue on explicitly identified artifacts. It does not establish an upstream software defect or exact recreation of that environment. A larger context requires sufficient memory; 2048 is a tested allocation, not a measured minimum or universal recommendation. Checking three synthetic fields does not establish arbitrary-document accuracy. Three fixed repeats are not a reliability estimate.
Independent execution is by a separate agent on the same host, not a person or second machine. All source/model/runtime identities were captured and checked again after execution. The runner never installed/downloaded prerequisites, called a paid provider, enabled executable tools or changed production. Local path redactions are disclosed and do not alter task inputs, token counts or answers.
Read the repair steps in Fix Finder →