Skip to content

Read configured sandbox process logs by ID - #623

Merged
tonywok merged 1 commit into
mainfrom
ts/configured-sandbox-background-logs
Aug 28, 2026
Merged

Read configured sandbox process logs by ID#623
tonywok merged 1 commit into
mainfrom
ts/configured-sandbox-background-logs

Conversation

@tonywok

@tonywok tonywok commented Aug 27, 2026

Copy link
Copy Markdown
Member

Adds support for fetching configured background process logs using the same interface as adhoc sandbox background processes.

Landing this ahead of landing agent support.

AI Summary

Summary

Adds support for reading configured sandbox background-process logs through their existing logsId.

When the sandbox agent returns a logsId, the CLI:

  • Uses the sandbox run ID to request the existing signed logs token from Cloud.
  • Streams snapshots from /api/logs/:logsId/download.
  • Streams historical and live output from /api/logs/:logsId with --follow.
  • Cancels the follow request cleanly on Ctrl-C.
  • Escapes log IDs when constructing URLs.

Responses without logsId continue using the existing SSH and file-backed log behavior. If both a log ID and file paths are present, the log ID takes precedence.

Testing

  • go fmt ./...
  • golangci-lint run ./...
  • go test ./...
  • go build ./cmd/rwx
  • Focused race tests for the changed CLI packages

Also tested end to end with a locally compiled CLI

  • Configured log metadata and snapshot
  • Historical and live --follow output
  • Ctrl-C cancellation
  • Log availability after stop
  • Stable log ID across restart generations
  • Ad hoc file-backed fallback

@tonywok
tonywok force-pushed the ts/configured-sandbox-background-logs branch from 16bd2e5 to d85b9a8 Compare August 27, 2026 21:02
@tonywok tonywok self-assigned this Aug 27, 2026
@tonywok
tonywok force-pushed the ts/configured-sandbox-background-logs branch from d85b9a8 to a9e3724 Compare August 27, 2026 21:06
@tonywok
tonywok merged commit 90bb0a3 into main Aug 28, 2026
1 check passed
@tonywok
tonywok deleted the ts/configured-sandbox-background-logs branch August 28, 2026 15:00
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.

2 participants