Skip to content

feat(contracts): a turn may be given up to two hours - #115

Merged
DaXu999 merged 1 commit into
mainfrom
fix/turn-ceiling-two-hours
Nov 8, 2026
Merged

DaXu999 merged 1 commit into
mainfrom
fix/turn-ceiling-two-hours

Conversation

@DaXu999

@DaXu999 DaXu999 commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Why

MAX_EXECUTION_TIMEOUT_MS was 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_MS changes from 600_000 to 7_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.md was 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 the turn-draining world 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-turns rather than main. This is the same commit rebased onto main (git range-diff shows the patch unchanged), so it goes in on its own.

Checks

pnpm check is green on the rebased branch: format, typecheck, vitest 1135/1135, test:release 7/7, docs:api:check and conformance:check.

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>
@DaXu999
DaXu999 merged commit b585bbc into main Nov 8, 2026
2 checks passed
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