Skip to content

fix: await stdout() and stderr() async functions from sandbox#20

Closed
sweetmantech wants to merge 1 commit intomainfrom
fix/include-stdout-stderr-in-response
Closed

fix: await stdout() and stderr() async functions from sandbox#20
sweetmantech wants to merge 1 commit intomainfrom
fix/include-stdout-stderr-in-response

Conversation

@sweetmantech
Copy link
Contributor

@sweetmantech sweetmantech commented Feb 4, 2026

Summary

  • Fix stdout and stderr not being included in task response
  • The Vercel Sandbox SDK returns stdout and stderr as async functions that need to be called and awaited, not direct string properties

Test plan

  • Run task with find . command - verified stdout returns file listing
  • Verify exitCode, stdout, stderr, and snapshot all returned correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Internal improvements to command execution handling with no impact to user-facing functionality.

The Vercel Sandbox SDK returns stdout and stderr as async functions
that need to be called and awaited, not direct string properties.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

Updated runSandboxCommandTask.ts to retrieve command output asynchronously by awaiting stdout() and stderr() method calls instead of accessing them as synchronous properties, aligning the implementation with a Promise-based API.

Changes

Cohort / File(s) Summary
Async API Update
src/tasks/runSandboxCommandTask.ts
Changed from synchronous property access to asynchronous method invocation for retrieving command output; now awaits commandResult.stdout() and commandResult.stderr() with nullish-coalesce fallback to empty strings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A rabbit awaits the command's reply,
Where stdout() and stderr() dance in the sky,
No longer sync, but promises held dear,
Async and gentle—the code's crystal clear! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change—fixing async function calls for stdout() and stderr() from the sandbox.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/include-stdout-stderr-in-response

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sweetmantech sweetmantech deleted the fix/include-stdout-stderr-in-response branch February 4, 2026 16:22
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

Comments