Skip to content

improvement(mothership): let a code call run for up to fifteen minutes - #9588

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/run-code-long-timeout
Nov 3, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
improvement/run-code-long-timeout

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Raise the Mothership code-call ceiling (run_code / run_function) from 300 s to 900 s
  • A render or build that needed more than five minutes was cut off at the ceiling and failed. The model then either started over in smaller pieces or escaped the call with a background process, which stalled once the idle workbench paused. Over a recent week, calls that ran into the ceiling failed about 83% of the time, and they took about a sixth of all code-call time
  • No behavior changes until the worker raises its own schema maximum (companion PR). Until then the worker never requests more than 300 s
  • Every other layer already scales with the requested budget: the deadline header, the session sandbox lease (idle window + remaining budget), the provider command timeout, and per-second sandbox metering

Type of Change

  • Improvement

Testing

  • function-execute-session.test.ts: the timeout table now covers 900 and 901 s through the dispatcher and the real handler; it fails on the 300 s ceiling and passes on 900 s
  • Live E2B probe: a command that printed nothing for 420 s ran to completion (exit 0, stdout intact). The command stream carried a keepalive frame every 50 s throughout, so a 350 s idle cut on the network path never fires
  • Lint on the changed files; CI runs the rest

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Companion: simstudioai/mothership#902 (the worker raises its schema maximum; merge and release this PR first)

A render or build that needs more than five minutes was cut off at the
ceiling and failed, and the model started over in smaller pieces or
escaped the call with a background process the paused workbench then
stalled. Mothership code calls now run up to 900 seconds. The worker's
schema still decides what a model may request, so this is inert until
the worker raises its own maximum.
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 3, 2026 12:50am UTC

Request Review

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Cross-repo companion check

All declared companion PRs are merged into staging.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Raises the run_code and run_function ceiling from five to fifteen minutes.

  • Mothership code calls can use a timeout of up to fifteen minutes.
  • Callback access and project upload bindings stay available during long code calls.

Reviews (3) · Last reviewed commit: "fix(mothership): keep a long code call's..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 78cd332 into staging Nov 3, 2026
67 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/run-code-long-timeout branch November 3, 2026 00:58

This branch was previously deployed

1 inactive deployment
Preview — 90ee0e3a Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant