|
Entropic 2.14.3
Local-first agentic inference engine
|
Which prompt messages to log in full, and which to reference. More...
#include <cstdlib>#include <string>#include <unordered_set>

Go to the source code of this file.
Classes | |
| class | entropic::PromptLogDedup |
| Remembers which message bodies a session's log has already shown. More... | |
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Functions | |
| bool | entropic::prompt_log_unabridged () |
| Whether the operator has demanded unabridged prompt logs. | |
| std::string | entropic::prompt_log_reference (size_t index, const std::string &role, size_t size_chars, size_t content_hash) |
| The one-line stand-in for a body already shown earlier in the log. | |
Which prompt messages to log in full, and which to reference.
gh#152: log_prompt wrote every message in the list on every turn. The list grows monotonically, so a message emitted at turn 5 is re-logged by turns 6, 7, 8 … and anyone counting model output by grepping the log over-counts by roughly the number of remaining turns.
That is not hypothetical. A consumer counting finding-shaped lines across two arms of an A/B got 147 against 380 and read it as the second arm looping 2.6x more — a serious defect in their own code, which is where they went looking. It was re-emission: 36 and 38 "End prompt" markers against 36 and 38 generation turns. Their conclusion is the right one: the log is not a transcript, and it reads like one.
The rule already existed for the system message, which is hashed and elided when unchanged. It was applied to the one message known to be large and invariant, and never to the ones that ACCUMULATE — which are precisely the ones a reader is trying to count. This generalises it.
Pure so the decision is CPU-unit-testable with no logger, no model and no conversation — the same reason warm_keep_util.h and partial_offload.h are.
Definition in file prompt_log_util.h.