Repository navigation
feat(contracts): a turn may be given up to two hours - #115
Merged
Merged
Conversation
The ceiling on a turn's timeoutMs was ten minutes, and a host could ask for no more. A coding agent's turn is a build, a test run and a fix, and on a managed machine one was cut off at ten minutes in the middle of real work, to start again from nothing in the next turn. The ceiling is now two hours, the longest Claude Code lets an unattended command run. What bounds a turn's work is the host's limit on each command and on each model call; the turn's own deadline is the backstop for a harness that stops answering. A host still chooses its deadline under the ceiling, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
MAX_EXECUTION_TIMEOUT_MSwas 10 minutes, so no host could give a turn longer than that. On the SharedOS Cloud demo machines, every turn that broke in a day (7 of 89) was cancelled at exactly 600 s, in the middle of a build or test run. The next turn then started over from nothing. Yu asked to follow Claude Code's model: there is no limit on a turn, only on each command and each model call.What
MAX_EXECUTION_TIMEOUT_MSchanges from600_000to7_200_000. Two hours is the longest Claude Code lets an unattended command run. The turn deadline becomes a backstop for a harness that stops answering, and each host still picks its own deadline under the ceiling.docs/api/sharedos-contracts.mdwas regenerated by typedoc; only this one line changed.docs/conformance/kernel-conformance.{md,json}were regenerated. Only the case-set and world-set hashes change, because theturn-drainingworld uses the ceiling as its drain grace. Every result stays the same.Code 1 line; docs 1 line; conformance report 4 generated lines.
Related
#114 drops the 24-turn cap from the Claude Code spec, so a long turn runs until this ceiling. The two are independent and either merges alone.
History
Written by waterdoog and merged as #111 into
fix/claude-code-max-turnsrather thanmain. This is the same commit rebased ontomain(git range-diffshows the patch unchanged), so it goes in on its own.Checks
pnpm checkis green on the rebased branch: format, typecheck, vitest 1135/1135, test:release 7/7,docs:api:checkandconformance:check.