编译代理对话!
(this readme is written by human)
Official implementation of "View-oriented Conversation Compiler for Agent Trace Analysis" (Paper)
This repo is for daily use. To reproduce academic experiments in the paper, see VCC-experiments.
VCC is a compiler that compiles your conversation logs (Claude Code's JSONL) into efficient and agent-friendly views. Then you will never fear Claude Code's /compact - CC now can finally see the original details of compacted context. It also supports searching across all your Claude Code conversations.
Things that tend to happen after you install VCC:
/compact./compact + /recall becomes your favorite combo.There is also a paper showing that VCC improves context learning and agent trace analysis and harness on some academic benchmark.
Currently We support Claude Code only. Codex and OpenClaw are coming soon.
To install, copy this to your Claude Code:
Please help me install the skills from
https://github.com/lllyasviel/VCC.git
just clone it then follow the INSTALL.mdTo update, copy this to your Claude Code:
Please help me update the skills from
https://github.com/lllyasviel/VCC.git
just clone it then follow the INSTALL.mdTo uninstall, copy this to your Claude Code:
Please help me uninstall VCC skills by deleting
`conversation-compiler`, `readchat`, `recall`, `searchchat`
from my `.claude/skills`Restart Claude Code after install, update, or uninstall.
When a compact is triggered (whether automaticaly or manually), you can immediately /recall.
For example, after an automatic compact or manual /compact, you will see somthing like (... compacted). You can then:
/recall
and CC will recall everything automatically, or you can
/recall let's review our conversation
/recall in those six rounds of analysis we just did, which access attempt causes the second layer of the server's three-layer log to crash?
/recall go through all six details I mentioned about the user survey again
/recall review my thought process so far
For new conversations, you can use /searchchat or /recall (which will fallback to search). For example:
/searchchat how did we handle the captcha in that browser listener system we discussed last time?
/recall did we decide to use React for that canvas solution we discussed last time?
These commands can find and recover the orginal chats accross months of conversation history.
/readchat is for advanced usage, see below.
A Claude Code JSONL like this (you can find lots of these things in your ~/.claude/projects):
{"type":"user","message":{"id":"msg_user1","content":"I have two pets.\nCan you write a P..."}}
{"type":"assistant","message":{"id":"msg_asst1","content":[{"type":"thinking","thinking":"The
user wants a pet tracking module.\nThey have a dog (Buddy) and a cat (Whiskers).\nLet me chec
k if there's an existing file first...gets compiled into these views:
This simulates what the user see in CC
[user]
I have two pets.
Can you write a Python module for tracking them?
One is a dog named Buddy and a cat named Whiskers.
[assistant]
Sure! Let me check if there's an existing file.
* Read "src/pets.py" (example.txt:18-20,23-25)
No existing file.
I'll create a module with Dog and Cat classes.
* Write "src/pets.py" (example.txt:40-63,66-68)
Created src/pets.py.The pointers like (example.txt:18-20,23-25) can jump to the exact lines for full detail as below.
The complete transcipt. Line numbers are assigned once and shared accross all views.
Lets say this is example.txt:
1 [user]
2
3 I have two pets.
4 Can you write a Python module for tracking them?
5 One is a dog named Buddy and a cat named Whiskers.
6
7 ══════════════════════════════
8 [assistant]
9
10 >>>thinking
11 The user wants a pet tracking module.
12 They have a dog (Buddy) and a cat (Whiskers).
13 Let me check if there's an existing file first.
14 >tool_call Read:tu01
19 file_path: src/pets.py
20 >>thinking
31 No existing file.
32 I'll create Dog and Cat subclasses.
33 The dog needs walk tracking.
34 The cat needs nap tracking.
35 >tool_call Write:tu02
41 file_path: src/pets.py
42 content: |
43 class Pet:
44 def __init__(self, name, species):
45 self.name = name
46 self.species = species
47
48 class Dog(Pet):
49 def __init__(self, name):
50 super().__init__(name, 'dog')
51 self.walks = []
52
53 def log_walk(self, duration, distance):
54 self.walks.append({'min': duration, 'km': distance})
55
56 class Cat(Pet):
57 def __init__(self, name):
58 super().__init__(name, 'cat')
59 self.naps = []
60
61 def log_nap(self, duration, spot):
62 self.naps.append({'min': duration, 'spot': spot})
63 >>thinking
(example.txt:11-13)
12: They have a dog (Buddy) and a cat (Whiskers).
>thinking
(example.txt:31-34)
33: The dog needs walk tracking.
>tool_call Write:tu02
(example.txt:41-62)
50: super().__init__(name, 'dog')
`, ``, etc), filters internal tools (`TodoWrite`, `ToolSearch`), cleans ANSI escape codes, and hides pure-markup user turns
* The emitter produces three views sharing one line-number coordinate system
the IR stage assign line numbers once to ensure that everything si consistent. After that, lowering can only select, truncate, or annotate. The line numbers cannot reorder or renumber. So cross-view pointers are always consistent.
# Cite
I haven't submitted VCC to any conferences or journals; just want it to be publicly available:
@article{zhang2026vcc,
title={View-oriented Conversation Compiler for Agent Trace Analysis},
author={Lvmin Zhang and Maneesh Agrawala},
year={2026},
url={https://github.com/lllyasviel/VCC}
}暂无开放 Issues,或尚未同步最近议题。