Say which user entries Claude Code writes itself in loop-claude --help
This commit was merged in pull request #14.
This commit is contained in:
+7
-7
@@ -14,17 +14,17 @@ three times running. Exit 2: the human is needed and no terminal is attached, or
|
||||
without them typing anything. Before a handoff every worktree is marked trusted in ~/.claude.json.
|
||||
|
||||
Each project has one session, "A ~/code/<path> auto-mode" (the absolute path outside ~/code),
|
||||
resumed while present and deleted when the chunk finishes. Its transcript is archived under
|
||||
$AUTO_MODE_TRANSCRIPTS (default ~/.claude/auto-mode-transcripts/<path>/) whenever the human is asked
|
||||
and when the chunk finishes. JUDGE_MODEL and WORKER_MODEL override the model the project's
|
||||
Claude Code settings pick. A change to this file takes effect at the next round boundary, once the
|
||||
new file answers --help.
|
||||
deleted when the chunk finishes. Its transcript is archived under $AUTO_MODE_TRANSCRIPTS (default
|
||||
~/.claude/auto-mode-transcripts/<path>/) whenever the human is asked and when the chunk finishes.
|
||||
JUDGE_MODEL and WORKER_MODEL override the model the project's Claude Code settings pick. A change to
|
||||
this file takes effect at the next round boundary, once the new file answers --help.
|
||||
|
||||
Claude Code internals this rests on, observed on 2.1.282:
|
||||
- The transcript is ~/.claude/projects/*/<session-id>.jsonl, one JSON object per line. A <session-id>/
|
||||
folder and <session-id>.superseded-*/ and .orphaned-*.jsonl siblings belong to the same session.
|
||||
- A typed human turn is a "user" entry without isMeta whose message.content is a string not starting
|
||||
with "<", or a list of "text" parts none of which starts with "[Request interrupted".
|
||||
- Claude Code writes "user" entries of its own: isMeta ones, tool_result lists, strings starting with
|
||||
"<" (<command-name> and its kind) and text parts starting with "[Request interrupted". A typed human
|
||||
turn is any other "user" entry.
|
||||
- An "assistant" entry, in the transcript and in --output-format stream-json, carries message.content
|
||||
parts of type "text" (text) and "tool_use" (name, input); stream-json ends with a "result" event.
|
||||
- `claude -p --output-format json --json-schema` returns the verdict under "structured_output".
|
||||
|
||||
Reference in New Issue
Block a user