Repository navigation
Keep a long command's full log and read it back a page at a time (CF-5) - #311
Merged
Merged
Conversation
A reply's "From Codex memory" citation was display-only. Each one now has Show lines and Copy, which ask main (evidence:memory) for the cited lines. main/engine/memory-citations.ts reads only inside Codex's memories folder ($CODEX_HOME/memories, else ~/.codex/memories) and refuses an absolute path, any "..", a symlink that resolves outside, a directory, a file over 8 MiB, and a range past the end. It returns the 1-based, inclusive lines, cut to 64 KiB, and opens, runs and fetches nothing. The command is local-only: a paired desktop never reads this Mac's memory files. Streamer Mode masks the shown lines. Local codex-cli 0.163.0 sessions cite paths relative to the memories folder (MEMORY.md), and a one-line citation's note matched its line counted from 1, not 0. Tests first: memory-citations.test.ts (7) and two e2e cases in conversation-evidence.spec.ts (show/copy exact lines with nothing started; an escaping citation refused), red before the code. Part of #278. Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
* Keep each Codex file change's path, kind and share of the patch codex-cli 0.163.0 sends a fileChange's files with absolute paths and each file's diff separately. Modex joined the diffs into args.patch and dropped the paths, so a turn's patch could not be checked file by file. args.files now keeps each file's path, kind, move target and how many lines of args.patch are its diff, so the diffs are not stored twice. Coven-Harness: Claude Code / claude-opus-5-5 * Compare a turn's patch with the working tree, file by file A patch tool was labelled as the turn's, but nothing said whether the files still matched it. A patch the CLI reported as applied now has Compare with working tree. Main takes the patch from the thread's own record and reads only the files it names, inside the thread's folder, and answers per file: as this turn left it, still has this turn's edit, changed since, deleted since, or not compared with the reason. Only verdicts reach the window. Opening a row reads nothing; comparing writes and runs nothing. Links out of the folder, directories, files over 8 MiB, removal-only edits, notebook edits and Codex patches saved before per-file records are not compared, and say why. Part of #278 (CF-5), tracker #273. Coven-Harness: Claude Code / claude-opus-5-5
Both entries kept in docs/status.md. Coven-Harness: Claude Code / claude-opus-5-5
… slice Coven-Harness: Claude Code / claude-opus-5-5
The transcript keeps a tool's last 256 KiB; the rest of a long Codex command's output was dropped. Codex streams every chunk (item/commandExecution/outputDelta), so its backend now hands each raw chunk to an optional main-only sink hook, TurnSink.output. The runner maps it to the tool's transcript item and ToolLogStore keeps it. Output that fits in the preview is never written. Past that, the store keeps up to 10 MiB from the first byte in one file per item under app/tool-logs/<thread>/, records the total when the tool finishes, reads back 256 KiB pages ending on character boundaries, and is removed with its thread. Thread ids are checked and item ids are hex-encoded, so no id becomes a path. Nothing raw is journaled or sent to the window. Claude Code 2.1.302 hands Claude at most bashOutputMaxChars (default 30,000, up to 128,000 characters) and keeps the rest in its own file, so a Claude result never outgrows the preview and its backend does not call the hook. Part of #278 (CF-5), tracker #273. Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
…log slice Coven-Harness: Claude Code / claude-opus-5-5
A tool whose output passed the 256 KB preview now has Show full log under its truncation notice. It asks main (evidence:tool-log) for the kept output from the first byte, 256 KB per page, with Earlier, Later, Copy page and Hide. The status says whether all of it was kept, the first part of how much, or that the tool never finished. Streamer Mode masks the page; nothing is read until asked, and reading runs nothing. The page shape, sizes and byte formatter move to shared/evidence.ts. The offline Store demo refuses the command like its other evidence reads. Part of #278 (CF-5), tracker #273. Coven-Harness: Claude Code / claude-opus-5-5
…aude needs none Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 18, 2026
[P1][CF-5] Add provenance-aware citations, command evidence, and owned artifact actions to chat
#278
Closed
Coven-Harness: Claude Code / claude-opus-5-5
Code coverage overviewLanguages: TypeScript TypeScript / code-coverage-agent
View coverage of the 8 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
…ch-comparison slice Coven-Harness: Claude Code / claude-opus-5-5
…nd patch-comparison slice Coven-Harness: Claude Code / claude-opus-5-5
9 of 15 tasks
… patch-comparison slice Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Both entries kept in docs/status.md. Coven-Harness: Claude Code / claude-opus-5-5
| catch (err) { setError(err instanceof Error ? err.message : String(err)); } | ||
| }; | ||
|
|
||
| if (none) return <p className="tool-log-none" data-testid="tool-log-none">Modex kept nothing more than this. The CLI's own logs may have the rest.</p>; |
This branch was successfully deployed
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.
Part of #278 (CF-5), tracker #273. #299 has landed (
f85a5b3), and this now targetsmain. Againstmainit changes only its own 17 files: #299's final head was merged in, and its squash was recorded with-s ours, which leaves the tree unchanged. The claim is here.This takes CF-5's last runner-bound item, the retained full log. The acceptance line is: a log larger than the configured cap is visibly truncated with bounded updates and retained outcome; reopening it cannot execute anything.
What changes
A command whose output passed the transcript's 256 KB preview now has Show full log under "Showing the last 256 KB of …". It reads the output back from its first line, a page at a time:
What main keeps (
main/engine/tool-logs.ts):item/commandExecution/outputDeltachunk to a new optionalTurnSink.output. That's one line incodex.ts.toolItemId, which reads the conversation state's own native-id map.app/tool-logs/<thread>/<item id, hex>.log, and records the total when the tool finishes.What stays still:
evidence:tool-log.runner.toolLogreads only for a tool item of that thread.Claude needs none. Claude Code 2.1.302 hands Claude at most
bashOutputMaxCharsof a Bash result: 30,000 characters by default, clamped to 4,000–128,000. It keeps the rest in its own file and gives Claude the path; the source is the CLI's bundled settings text. So a Claude result never outgrows the preview, and the Claude backend doesn't call the hook. Modex doesn't read the path Claude Code names.Tests, red first
test/tool-logs.test.ts, 8 tests:It failed to compile before the module existed (
TS2307). Three tests first failed because of a bug in the tests: a kept log is always longer than one page, and they read only one. I fixed the tests, not the store.test/codex-backend.test.ts: a 12 MiB Codex stream reaches the hook in full, while everytool.updateandtool.donecarries at most the preview. The hook didn't exist before the change.test/evidence.test.ts: the runner keeps a fake backend's 840 KB of raw output for its item and pages it back whole. No event carries the raw log, non-tool and missing items are refused, and the logs go with the thread. It failed to compile before the change (TS2339: nooutput, notoolLog).e2e/tool-full-log.spec.ts, 2 tests, through the real app, main and the Codex backend, against a codex-cli 0.163.0-shaped app-server streaming 3.1 MB:4a1b1d6), both failed waiting fortool-log-show.Checks
The change is three signed commits plus a docs commit:
eb215b5: main side.0cd8a0e: the e2e test.40b41f5: UI.1829b4b: docs.4a1b1d6merges #299's branch, which carriesmainat3560064. macOS (Apple Silicon), Node 24.18.1, pnpm 10.34.5.pnpm typecheckpnpm buildpnpm --filter @modex/desktop testoneb215b5tool-logs,evidence,codex-backend,patch-stateon the merged head40b41f5:tool-full-log,conversation-evidence,turn-patch-state,transcript-measure,typed-turns,conversation-fidelityAfter the merge with
main(dd20818, which includes #299, #288, #304 and #315):tool-logs,evidence,codex-backendandnotes-projectspassed 52/52.tool-full-logandsidebar-workspacespassed 5/5.On
5bf7607(#299's final head and its recorded squash):Not run locally: the full
pnpm test:e2e. CI runs it.Still open on #278
resultsare opaque, and there's no local sample without a live Codex run.Coven-Harness: Claude Code / claude-opus-5-5