Skip to content

roam v0.2.1 — a binary tool result no longer kills the run

Choose a tag to compare

@javimosch javimosch released this 06 Aug 21:01
· 24 commits to main since this release

One fix, but a fatal one for any agent that touches a filesystem.

`jstr` escaped five characters and passed every other byte through raw. A JSON string cannot carry a raw control byte, and the request body must be valid UTF-8 — so a single tool result containing either produced a malformed request and the API answered 400 JSON parsing failed. The job died with an error that named nothing about the cause.

One cat on a binary was enough. It surfaced on a live disk-audit run whose agent ran cat on a symlink to /usr/bin/du.

Two changes:

  • jstr escapes control bytes as \u00XX and replaces any byte sequence that is not well-formed UTF-8 with U+FFFD. It can no longer emit anything JSON cannot carry — including a multi-byte character sliced in half by truncation.
  • run_shell and read_file detect non-text output and return a note naming the size and suggesting file, strings | head, xxd | head or wc -c, instead of the bytes. Escaping alone would be legal JSON but would spend the whole token budget describing an ELF header one \u00XX at a time.

Reproduced deterministically before, green after: cat /usr/bin/du, head -c 200 /usr/bin/ls, and a command emitting raw \377\376 — plus a plain task as a regression check. With the note in place the agent read it and reached for xxd | head on its own.

curl -fsSL https://github.com/javimosch/roam/releases/latest/download/roam-x86_64-linux -o roam
chmod +x roam && ./roam help

This release also rolls a changelog that had drifted: everything previously under [Unreleased] had already shipped in v0.2.0, whose own headline (opt-in telemetry) was documented only in its release notes.