beetlebug▾
/

jcode read

Synopsis

jcode read ID ?--since N? ?--full? ?--json?

Description

Prints the entries of the transcript of the agent ID after the entry N, one line each: the number, the kind, and the text, cut to one line, with each control character replaced. A coordinator keeps the last number that it read, and gives it to --since.

The kinds of an entry: brief, agent (text of the model), tool (a tool call), result, ask, user (a message of a person), note, state, error, and report (The state folder).

Options

Option Description
--since N Only the entries after the entry N. The default is 0.
--full The full text of each entry.
--json The JSON of the API: state, last, and entries.

Examples

$ jcode start --dir hello --model fake:run.json --brief brief.md --run all
a1
$ jcode wait a1 --timeout 20 > /dev/null
$ jcode read a1
1 brief: Change hello.sh so that it takes a name as its first argument and prints "hello, NAME". With no argument it prints "hello, world". Run it to check both cases, …
2 agent: I look at the script first.
3 tool: list_files {"path":"."}
4 result: ok: …
5 tool: read_file {"path":"hello.sh"}
6 result: ok: #!/bin/sh # Prints a greeting. echo "hello"
7 tool: write_file {"path":"hello.sh","content":"#!/bin/sh\n# Prints a greeting: hello, NAME, or hello, world.\necho \"hello, ${1:-world}\"\n"}
8 result: ok: wrote 87 characters to hello.sh
9 tool: run {"command":"sh hello.sh Alice; sh hello.sh"}
10 result: ok: exit 0 hello, Alice hello, world
11 ask: Both cases work. Shall I also add a --help option?
$ jcode read a1 --since 10 --json
{"state":"asks","last":11,"entries":[{"n":11,"t":…,"kind":"ask","text":"Both cases work. Shall I also add a --help option?"}]}