Skip to content

fix: agent turn presentation and terminal output for 0.9.1 - #127

Merged
tfcace merged 22 commits into
masterfrom
chore-0-9-1
Nov 6, 2026
Merged

tfcace merged 22 commits into
masterfrom
chore-0-9-1

Conversation

@tfcace

@tfcace tfcace commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes for how ?? turns and command output look in the terminal, found by driving hash in Rex and reading the traces. Patch release material for 0.9.1.

?? turn
  stream      markdown renders the same however chunks split; replies word-wrap to the pane
              (URLs, paths and code kept whole); short replies show as they arrive
  chrome      spinner, permission prompt, footers and banners fit the pane; one hint style
              ("enter to run · tab to edit · esc to cancel"); Esc cancels a stream
  safety      prose, denied commands and edited ?? lines are never one Enter from running;
              inline `cmd ?? …` keeps the space before the suggestion
  learning    a fix is pre-typed only after it worked twice, on one prompt only;
              unrelated or mistyped-word matches no longer suggest a fix
prompt        clock stays current; wrapped input lines redraw cleanly
executor      a command gets a terminal for the output that goes to one (as in bash)
trace         HASH_TRACE logs the ?? turn: raw chunk, rendered bytes, tools, outcome

Evidence

  • Before: prog < file ran with stdout not a terminal (no animation), prog > file got a terminal (escape codes in the file), prog 2> file sent stderr to the screen and left the file empty.
    After: all three match bash (TestExecute_StdinRedirectKeepsTerminalOutput, …StdoutRedirectIsNotATerminal, …StderrRedirectReachesFile).
  • Before: a heading or code fence split across stream chunks rendered wrong (half-styled heading, fence leaking into the rest of the reply).
    After: TestStreamingRenderer_ChunkSplitInvariant and FuzzStreamingRendererSplit: rendering a reply split at any point equals rendering it whole.
  • Before: jj stauts pre-typed jj git fetch; a revset typo offered jj git push -b … one keystroke away.
    After: TestExtractPattern_KeepsQuotedWordFromCommand, TestShell_TentativeFixIsNotGhosted.
  • Before: TestPluginCompleter_ServesStaleWhileRefreshing failed about 1 run in 200 (on master too).
    After: 0 in 1000; the stale entry is read before the refresh starts.
  • Locally: go test ./..., go vet ./..., golangci-lint v2.14.0 (0 issues), the five PR fuzz targets for 30s each.

Merge Danger

Door: two-way

All changes are behavioral fixes with no stored-data or config migrations. Revert by reverting the commits.

Blast Radius: terminal-presentation

Every ?? turn renders through the new wrapper, and every interactive external command goes through the new terminal rule in the executor. A regression would show as garbled agent output or a program that no longer sees a terminal. One known difference from bash remains: an upstream pipeline stage's stderr is not a terminal (hash keeps capturing it for learned fixes).

tfcace and others added 22 commits November 6, 2026 17:32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBTe1N41dch5obbPEEoBvy
@tfcace
tfcace merged commit f151d32 into master Nov 6, 2026
14 checks passed
@tfcace
tfcace deleted the chore-0-9-1 branch November 6, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant