You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa145a3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(tui): make stderr capture concurrency-safe and restore idempotent
restore() ran its dup2/close sequence on every call; the fd numbers it
closed can be reused by other descriptors between calls, so a second
call could corrupt unrelated fds. acquireRelease fires it once, and a
guard keeps a repeated call a no-op.
tui-stderr.log is shared by every TUI on the host. Truncating per run
overwrote a live or crashed run's capture; switch to O_APPEND with a
single rotation past 10 MiB (the size-cap option from review) and
surface the capture's starting size so the exit note reports what the
current run wrote rather than any pre-existing bytes.
Cover the capture path in tests: while captured, fd 2 maps to the
capture file, a write to fd 2 lands in the log, restore() stops the
mapping, and a repeated restore is a no-op.
Add the variable to the V2 docs (services/www/src/docs/content/cli/
config.mdx, Terminal section) alongside the v1 docs row.
While a session runs, output a native library or child process sends to the terminal's stderr is captured to `log/tui-stderr.log` in the data directory instead of painting over the interface. When the session ends and something was captured, the file's path is printed on the terminal. Set `OPENCODE_TUI_STDERR=inherit` to keep process stderr on the terminal.
279
+
278
280
## Mini
279
281
280
282
The `mini` group controls [`opencode mini`](/cli#mini), the minimal interactive interface:
0 commit comments