feat(core): add no-omit mode#199
Merged
Merged
Conversation
Add a mechanism to suppress all omission/truncation behavior while
preserving formatting transformations (stripAnsi, dedupe, filter,
rewrite, fact-counting). This gives agent workflows a middle ground
between full compaction (default) and --raw (which skips everything).
Motivation: In high-cost agent workflows like OpenClaw auto-review,
omission markers can cause agents to lose critical information that is
expensive or impossible to re-acquire. --raw is too coarse since it
also skips useful formatting. The new flag preserves transformations
but never omits or truncates content.
Changes:
- Add TOKENJUICE_NO_OMISSION env var (truthy: 1, true, TRUE, yes, YES)
read via shared helper in src/core/env.ts
- Add --no-omit CLI flag to wrap and reduce commands
- Add noOmit?: boolean to ReduceOptions and WrapOptions
- Thread noOmit through all reduce pipeline functions:
headTail, clampTextWithMetadata, clampTextMiddleWithMetadata,
clipMiddleWithHash, clipMiddleWithHashStrict, compactWholeJsonText,
rewriteGitDiffLines, rewriteGhLines, rewriteSearchLines,
filterGhRunLogSignalLines, formatGhStatusCheckRollup,
formatCommandList, buildInspectionSummary, formatInline, selectInlineText
- Add CompactionKind passthrough variants:
no-omit-head-tail-passthrough, no-omit-char-clip-passthrough,
no-omit-domain-passthrough (all authoritative: false)
- Add createPassthroughCompactionMetadata() for non-authoritative metadata
- Update mergeCompactionMetadata() to preserve authoritativeness
semantics when merging passthrough with real compaction
- Suppress WRAP_AUTHORITATIVE_FOOTER when noOmit is active
- Include facts in formatInline when noOmit is true (previously relied
on summary.includes('omitted') which would be empty)
- Remove redundant provisional clamp computation in reduceExecutionWithRules
- Pass --no-omit through runWrap to runWrappedCommand (bugfix: was only
passed to decorateWrapInlineText, not the reduce pipeline)
- Pass noOmit to buildPackageLockSummary so package samples are not
truncated when noOmit is active
Tests: env var parsing, headTail/clamp/clip passthrough, domain-level
omission suppression (git diff, gh status, gh run log, GitHub Actions
command list), reduce integration, compactBashResult env var + flag,
wrap --no-omit propagation, inspection summary passthrough.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vincentkoc
marked this pull request as ready for review
May 25, 2026 00:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation