Make claudecode-timeout actually bound the analysis - #138
Closed
CedricConday wants to merge 1 commit into
Closed
CedricConday wants to merge 1 commit into
CedricConday wants to merge 1 commit into
Conversation
The action documents a `claudecode-timeout` input in minutes and exports it as CLAUDE_TIMEOUT, but nothing ever read that variable: the runner was constructed as SimpleClaudeRunner() with no argument, so it always used the built-in 20 minute SUBPROCESS_TIMEOUT. Setting the input to 10 changed nothing. The timeout was also applied per subprocess attempt while the audit retries up to three times, so even the default could run for an hour of wall clock. That is how a stalled scan reported in anthropicsgh-124 ran for about 27 minutes against a 20 minute default and a 10 minute input. Read CLAUDE_TIMEOUT when building the runner, ignoring values that are not positive integers, and treat the timeout as a budget for the whole audit by passing each attempt only the time remaining. Closes anthropics#124
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.
Two separate problems keep
claudecode-timeoutfrom bounding anything.The action documents the input in minutes and exports it as
CLAUDE_TIMEOUT, but nothing ever read that variable: the runner was constructed asSimpleClaudeRunner()with no argument, so it always used the built-in 20 minuteSUBPROCESS_TIMEOUT. Setting the input to 10 changed nothing.The timeout was also applied per subprocess attempt while the audit retries up to three times, so even the default could run for an hour of wall clock. That is how the stalled scan in #124 ran for about 27 minutes against a 20 minute default and a 10 minute input.
This reads
CLAUDE_TIMEOUTwhen building the runner, ignoring values that are not positive integers, and treats the timeout as a budget for the whole audit by passing each attempt only the time remaining.Two regression tests cover it; both fail on
main. The full suite is 182 passing.Closes #124