Skip to content

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

Open
waterdoog wants to merge 1 commit into
fix/claude-code-max-turnsfrom
fix/turn-ceiling-two-hours
Open

waterdoog wants to merge 1 commit into
fix/claude-code-max-turnsfrom
fix/turn-ceiling-two-hours

Conversation

@waterdoog

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 in a normal clone; 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.

Base

This PR targets fix/claude-code-max-turns because that branch is the line Cloud-Core pins (e8721ad). It is one commit on top of it. Cloud-Core pins it by commit in systemind-team/SharedOS-Cloud-Core core/turn-two-hours.

Checks

  • pnpm check: format, typecheck, vitest 1142/1142 and test:release 7/7 all pass.
  • docs:api:check and conformance:check were run in a normal clone (a worktree drops typedoc's source links) and both pass.

🤖 Generated with Claude Code

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>
@waterdoog
waterdoog requested a review from DaXu999 November 8, 2026 05:36
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