fix: dogfood friction — trace truncation, view pipes and indent, content search - #32
Merged
Conversation
--full and --turn capped sidechains[].summary at 240 runes; for research sessions the subagent final report is the value, so the complete bundle was incomplete exactly where it mattered. The top-level sidechains list now carries the untruncated (ANSI-stripped) report; step-level entries stay bounded light refs keyed by agent_id. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two terminal-render fixes from the same dogfood report: - ANSI codes were emitted unconditionally, so piped output read as binary to grep (silent false-negatives without -a). New --color=auto|always|never; auto follows whether stdout is a TTY via os.ModeCharDevice — stdlib only, no isatty dependency. - Every message nested one level under its parentUuid predecessor, so long linear sessions drifted 400+ columns right. Sequential messages are siblings; depth now increments only on branch descent (main -> sidechain, agent -> other agent). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Search covered names, paths, and summaries only; content questions fell back to raw grep over the store, losing session identity, provider abstraction, and date filters. --content streams each candidate session file plus its subagent files (grep parity: raw-line match, no parse, any provider format), ranks by hit count, and composes with --after/--before/-p/--model. A crawl for now — the db stores stars/tags only; a content index is the follow-up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-up: --color=never silenced ccx's own ANSI, but tool results are untrusted terminal input — escapes and control bytes embedded in session content still leaked, retitling windows and flipping grep to binary. All content now passes sanitizeContent (SGR/OSC sequences and stray control bytes dropped, \n and \t kept) in every color mode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-ups on the content scan: - bufio.Reader with unbounded line reads replaces the 10MB Scanner: image-carrying transcript lines exceed any fixed budget, and the silent early stop was the false-negative class --content exists to kill. Unreadable files warn on stderr instead of lying 0. - Truncated result lists say so on stderr (no silent caps). - Subagent layout knowledge moves to parser.SubagentFiles (agent- prefix parity with what view --show-agents actually renders); contentMatches renamed countContentMatches; stable sort. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keep a Changelog wants one heading per category — the dogfood entries now share the existing Added/Fixed sections. stripANSI extracted for the two strip sites in trace. Devlog records the review follow-ups and the known deferral (file-based sidechains render flat; correct nesting needs a parser tree change, tracked separately). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Four flaws hit during real topic-mining across the session store, plus follow-ups from a two-axis (standards/spec) review.
Fixes
--full/--turncappedsidechains[].summaryat 240 runes; for research sessions the subagent final report IS the value. Top-level sidechain entries now carry the whole (ANSI-stripped) report; step-level refs stay bounded, keyed byagent_id.--color=auto|always|never(auto = stdout is a TTY, stdlib-only detection). Session content is also scrubbed of embedded escapes/control bytes in every mode — piped output greps clean without-a.--contentstreams transcript lines of every candidate session plus its subagent files (grep parity: raw-line match, unbounded line reads so image-carrying lines can't silently drop matches), ranked by hit count, composing with date/provider filters. Truncated result lists say so on stderr.Verification
[243,243,242]→[33258,21629,32984]; piped view greps its topic terms with zero escape bytes; max indent 5 spaces;--contentfinds sessions raw grep finds across 15+ projects.go test ./...green (15 packages); new tests cover the truncation contract, content-scan parity (incl. >10MB lines,agent-prefix parity), and content sanitization.Known deferrals
viewshows sidechains flat after the main chain; correct nesting needs a parser tree change (affects turns/web) — separate issue.--contentis a ~15s full-store crawl; an FTS index would make it a query — separate issue.🤖 Generated with Claude Code