Extract logs into run directory by default, add --zip flag#434
Merged
Extract logs into run directory by default, add --zip flag#434
Conversation
Server now always returns zip archives with a run_id. The CLI now always extracts into <output-dir>/<run-id>/ by default; --zip saves the raw archive instead. --auto-extract is retained as a hidden no-op for backward compatibility.
dan-manges
approved these changes
Mar 18, 2026
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.
Background
Server-side RFC-166 standardizes log downloads to always return zip archives with a
run_idfield. This PR is the CLI side of that change (RWX-164).Problem
The CLI had dual GET/POST logic and optional extraction (
--auto-extract). This made it impossible to deliver background process and ready-check logs alongside the main task log — a zip archive is the natural container for multiple files, but the old behavior only extracted when explicitly requested.With RFC-166, the server always returns a zip with a
run_id, so the dual path is unnecessary and the default behavior should always extract into a structured directory, making background process logs available automatically.Solution
<output-dir>/<run-id>/and prints the directory path + each extracted file--zipflag: new flag to skip extraction and save the raw zip archive instead--auto-extract: retained as a hidden no-op flag for backward compatibilityDownloadLogs; now always POSTs{token, filename, contents}as form dataLogDownloadRequestResult:Contentschanged from*string→string; addedRunID stringFurther confirmation needed
rwx logs <task-id>should extract to.rwx/downloads/<run-id>/, andrwx logs <task-id> --zipshould save the raw archive