Skip to content

v0.4.0

Choose a tag to compare

@lifrary lifrary released this 10 Oct 15:06
· 4 commits to main since this release

Fixed

  • Output written to a pipe could be cut short. The CLI exited before an
    asynchronous pipe drained, so agent-tree --json | jq or a large
    --sessions --json catalog could receive only the first 64 KiB, or
    another multiple of it (65536 of 378774 bytes in one export measured on
    macOS; Linux showed the same for larger exports). The CLI now waits for
    stdout and stderr to flush. A stdout reader that stops early (| head)
    ends it with status 0 instead of an EPIPE error, and a closed stderr only
    drops diagnostics instead of ending the export.

Added

  • Search across sessions. --search <text> and the MCP tool
    agent_tree_search find the session and the numbered step where a text
    appears in prompts, replies and tool inputs (tool results with
    --include-tool-output), newest session first, with redacted snippets.
    Every project and both agents by default; --cwd, --source,
    --since <days> and --limit narrow it, and --json prints the results.
    A raw-byte prefilter keeps a scan of every local session fast (19.9 GiB in
    about 15 s on one machine). Matching runs on redacted text, so a search
    can neither find nor confirm a secret. MCP replies are capped near 20 KB.
    The MCP server now has seven tools.
  • Token usage per step. Every mindmap node carries usage whenever the
    session logged it: calls, prompt tokens with cache reads and writes,
    output and reasoning tokens, the largest context, the model's window for
    Codex, compactions, and subagent usage reported beside the main numbers.
    --usage adds these columns to the text tree, and agent_tree_list
    accepts usage: true. Claude Code writes one response as several records
    with the same usage, so each response counts once. Codex usage comes from
    token_usage_record where present, otherwise from token_count. Claude
    Code subagent transcripts count toward the step that started them.
  • Open a session from any step. --open <step>, with --mode,
    --agent claude|codex and --open-dir, starts the agent with the
    continue or fork prompt in the step's directory, without a shell, and
    exits with the agent's status. For a --file session it first shows the
    directory and the instruction and waits for Enter; --yes skips that. It
    refuses without a terminal, inside an agent session (CLAUDECODE=1) and
    for prompts over 100,000 bytes, and exits 127 when the agent is not on
    PATH. No MCP tool starts an agent; agent_tree_snapshot and the
    interactive --snapshot suggest the --open command instead.
  • agent-tree --help ends with the project's GitHub link.
  • After the first successful resume from the interactive tree, the CLI
    prints a short note asking for a GitHub star, once per machine. It goes to
    stderr only and stays silent for piped output, CI, Claude Code, --json
    and --dump-json; AGENT_TREE_NO_STAR_HINT=1 turns it off. A marker under
    ~/.cache/agent-tree/ records that it was shown. The MCP server never
    prints it.

Known limits

  • Search reads main transcripts only: not Claude Code subagent transcripts
    or Codex sessions archived under ~/.codex/session_archives/. Case
    folding covers ASCII letters only. Search skips its own agent-tree --search commands and agent_tree_search calls, but other text that
    quotes the query still matches.
  • Claude Code logs no context window, so Claude rows show context size
    without a limit. Codex subagent sessions are not counted toward a step.
  • --open runs on macOS and Linux, and its prompt is a command-line
    argument that other local users can see in ps.

Changed

  • --cwd naming a missing directory exits 2, like other usage errors,
    instead of 1.
  • The Claude Code reader no longer warns on stderr about a missing
    permission-mode line; current Claude Code omits it in many valid sessions
    (122 of the newest 300 on one machine). --verbose still shows it.

Docs

  • The README covers search, token usage and --open, ticks the 0.4 roadmap
    items and adds the next ones; every list of MCP tools now has seven.
  • The README is reorganized around the supported agents, features, a
    first-class "For AI agents" section (identity, isolated install and
    self-test, MCP wiring for any client, tools, recipes and rules) and a new
    roadmap: search across sessions, token usage per step, and opening a
    session from any step. The npm page now shows 0.2.1 and 0.3.0 as published
    instead of "publication pending".
  • RELEASING.md records the npm web 2FA path for scripted publishes, that a
    prebuilt-tarball publish skips prepublishOnly, and that a new tarball can
    return 404 for minutes after npm view lists the version.
  • RELEASING.md notes that an npm login lasts two hours, so the login and
    the publish approvals belong in one sitting, and that web login works
    without a TTY. CONTRIBUTING.md warns that building from a worktree whose
    node_modules is a symlink embeds the other checkout's paths in dist/.