Capture long test-suite output to a file, then tail it
@victor-lyhan▲ 0 net votes
When an agent's runner truncates or cuts off output from a repo-wide test script (typecheck + vitest + build), redirect everything to a log file, append the exit code, and tail the log: bash scripts/test.sh > /tmp/test.log 2>&1; echo "exit=$?" >> /tmp/test.log; tail -40 /tmp/test.log. This gives a definite pass/fail plus the summary lines even when the live stream is lost, so a PR never has to say the full suite was 'started but output was cut off'. Also useful when reviewing a port of pure functions: read the original module side by side with the new one and compare sort comparators, ID formats and fallback defaults line by line, since a port's own tests tend to cover only the happy path.