Repository navigation
Print progress lines on stderr - #18
Merged
Merged
Conversation
Condense each session's stream-json output into one short stderr line per notable event (session start, skills, tool calls, commits, pushes), and print thirdshift's own steps. A result event doesn't end the session: the summary line comes when the process exits and reports the last result's totals. Unknown and malformed stream lines are skipped. stdout stays the PR URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One stderr line per tool call, so a message with many calls can't make one unbounded line. - Mark the cost as "at API prices" only on a claude.ai subscription (apiKeySource "none"); with an API key it is a real charge. - Recognise commits and pushes as git commands, not as substrings, so `grep "git push"` or `git commit-tree` isn't reported as one. - Always wait for claude, killing it first, if following its stream fails. - Route every "thirdshift: " line through progress::step, rename Progress::line to condense, and print the end-of-session line once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve src/main.rs and src/run.rs against the pre-flight checks (#15/#16) and the Base branch merge and conflict Repair (#17). Keep main's run structure and carry the progress lines into it: the session log line moves into run_session, the push line into Worktree::push, and the newly built steps (merging the Base branch, starting a Repair) print their lines as issue #10 asks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JacobStephens2
added a commit
that referenced
this pull request
Sep 25, 2026
Brings in the progress lines (#18) on top of the Failed run path. - session.rs: the stream is followed on its own thread, so the main thread can still poll for an interrupt and stop claude's process group. A follow error kills the group, as main's child.kill() did. - run.rs: keeps the Failed run structure and adds main's progress steps; session::run now takes the session kind. - main.rs, failed_run.rs: stderr lines go through progress::step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While a Run is going, stderr now shows its progress, and stdout still carries only the PR URL.
src/progress.rsholdsprogress::stepfor thirdshift's own steps, andProgress, a pure condenser that turns one stream line into zero or more lines:This follows the issue comment. A
resultevent doesn't end the session.total_cost_usdis taken from the last result, not summed. Only the firstinitprints "session started". "At API prices" appears only whenapiKeySourceis"none"(a claude.ai subscription).Seams tested:
Progressinterface (condenseandsummary), with unit tests insrc/progress.rsthirdshiftbinary's stderr and stdout, driven by the fakeclaudeemitting stream-json intests/progress_lines.rsEvidence
cargo test --test progress_lines: 3 failed.stderr: [], and "missing "thirdshift: implement: session started"".After:
cargo test: 14 unit + 8 fresh-run + 5 progress-lines tests pass. After merging main: all 45 tests pass, including mergeable and preflight. clippy and fmt are clean.Merge Danger
Door: two-way
The change only adds stderr output. The log file still gets every byte of the stream.
Blast Radius: stderr
Anything that parsed thirdshift's stderr now sees more lines.
claudestdout is now read through a pipe rather than written straight to the log file. If following the stream fails,claudeis killed and waited on before the error is returned.Unaddressed findings
Standards
session::runprints instead of returning results: the formatting logic is in the pureProgress, which is unit-tested. What remains insession::runis the I/O glue.stepandProgressshare a module: they are the two halves of "progress on stderr". Splitting them would add a module and no depth."implement"is passed to bothlog_pathandrun;session::runhas five positional params: the Repair (Keep the PR mergeable: merge the Base branch and conflict Repair #17) now shares therun_sessionclosure inrun.rs, which passeskindthrough, so the call sites stay short.tool_usetest helper is duplicated in unit and integration tests: unit tests can't reachtests/support, and the copy is small.Spec
claude's own stderr passes through without thethirdshift:prefix: that is claude's error output. Showing it raw is the most useful thing when a session fails, and stdout is unaffected.Closes #10
🤖 Generated with Claude Code