Repository navigation
0.7.0 - 2026-10-13
Highlights. expect used to time out on every live prompt: REPL prompts never reach the log file until later output arrives, so >>> always waited the full 10s. It now matches unflushed output instantly (0.6s measured) and reports it with "line_number": null. The OpenCode plugin is new: 16 native tools plus ready/exit notifications back into the originating session, so agents fire-and-continue instead of blocking in wait.
Added
- Add OpenCode plugin (
plugins/opencode, install withopencode plugin add 'github:bethropolis/bgrun#main::path:plugins/opencode'): 16 native tools,bgrunskill,/bg-runand/bg-tailcommands, ready/exit session notifications, long-runner prompt steering. - Add
screen --strip-ansi(also in MCPscreenand pluginbgrun_screen). - Add
bgrun watch(plugin-only): opt an already-running job into completion notifications. - Add
pty_colsandpty_rowsto the pluginruntool.
Changed
tail --digestwithoutlinesreturns only the summary. It previously attached 50 log lines, which made the token-saving call the most expensive one. Pass--lines Nfor digest plus lines.listreturns trimmed records (id, name, state, pid, short command, workspace). Passverbose: truefor full records.- MCP tool output is compact JSON with a 64KB ceiling and a 1000-line cap per log call. Oversized output names how to re-query narrower.
run(MCP and plugin) acceptswaitandwait_timeout_msto fold run plus wait into one call.expectmatches mid-line prompts immediately. Such matches return"line_number": null.- Spawned jobs no longer inherit
OPENCODE_SESSION_ID. A nestedopencode miniused to resolve the parent session's project and work in the wrong directory. - Old
screenclients keep working against the new daemon (missingstrip_ansidefaults to false).
Fixed
- Fix
expectnever matching live prompts.
Known issues
- Cursor-addressed fullscreen apps read only partly: static views decode with
--strip-ansi, redraws garble, and\r-drawn apps needexpectas a frame reader. Line-oriented programs work fully.
Upgrading
- No config changes. Restart the daemon (
pkill -x bgrun-daemon; it autostarts) to pick up the daemon-side fixes.
For plugin authors
- MCP
screeninput gainsstrip_ansi.expectmatches can carry"line_number": null; handle the null before treating it as a line number.