Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions includes/class-openclawp-claude-agent-runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,15 @@ private static function post( array $body ): array {
);
}

// A turn can take longer than PHP's max_execution_time (30 s by
// default), and on macOS that limit counts wall time spent waiting on
// the bridge. PHP-FPM then kills the worker mid-request and the client
// gets a bare 502. Give each bridge call its own timeout plus room to
// save the session. CLI runs have no limit and keep none.
if ( (int) ini_get( 'max_execution_time' ) > 0 && function_exists( 'set_time_limit' ) ) {
set_time_limit( $settings['timeout'] + 30 );
}

$response = wp_remote_post(
$settings['url'] . '/v1/turn',
array(
Expand Down
Loading