Skip to content

Derive Copilot SDK session timeout from agent step timeout (minus 30s)#36505

Merged
pelikhan merged 7 commits into
mainfrom
copilot/aw-daily-security-observability-fix
Jun 2, 2026
Merged

Derive Copilot SDK session timeout from agent step timeout (minus 30s)#36505
pelikhan merged 7 commits into
mainfrom
copilot/aw-daily-security-observability-fix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

The Daily Security Observability workflow was failing in the copilot engine after the SDK driver hit its 10-minute session.idle wait limit, causing runs to terminate before completion. This update generalizes the fix so SDK timeout is derived automatically from the configured agent step timeout, instead of relying on a workflow-specific hardcoded value.

  • Problem scope

    • copilot-sdk runs can outlast the SDK default send/wait timeout.
    • The prior fix only set an override in a single workflow.
  • Change

    • Updated shared SDK env construction in actions/setup/js/process_runner.cjs so, in SDK mode:
      • If COPILOT_SDK_SEND_TIMEOUT_MS is explicitly set, it is respected.
      • Otherwise, timeout is derived from GH_AW_TIMEOUT_MINUTES as agent timeout minus 30 seconds.
    • Added focused unit coverage in actions/setup/js/process_runner.test.cjs for:
      • derivation from GH_AW_TIMEOUT_MINUTES
      • explicit override precedence
      • invalid timeout input handling
    • Existing Daily Security Observability workflow override remains valid and aligned with this rule.
  • Why this is bounded

    • The derived timeout is intentionally set below the step timeout to preserve headroom before job timeout.

Branch update requested by pr-sous-chef for run https://github.com/github/gh-aw/actions/runs/26843942909

Generated by 👨‍🍳 PR Sous Chef · gpt54mini 3.6M ·

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits June 2, 2026 18:37
…ervability

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix daily security observability report workflow failure Increase Copilot SDK session timeout for Daily Security Observability workflow Jun 2, 2026
Copilot AI requested a review from pelikhan June 2, 2026 18:42
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 2, 2026

@copilot set the copilot sdk timeout to the agent time - 30 seconds.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 2, 2026

@copilot set the copilot sdk timeout to the agent time - 30 seconds.

Updated in a03e913. The workflow now sets COPILOT_SDK_SEND_TIMEOUT_MS to 3570000 (60m agent timeout minus 30s), and the lock file was recompiled accordingly.

@github-actions github-actions Bot mentioned this pull request Jun 2, 2026
@pelikhan pelikhan marked this pull request as ready for review June 2, 2026 19:36
Copilot AI review requested due to automatic review settings June 2, 2026 19:36
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Jun 2, 2026

@copilot copilot_harness.cjs must set the timeout on the fly based on the timeout configured for the agent step - not just hardcoded in a single agentic workflow.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Increases the Copilot SDK send/wait timeout for the Daily Security Observability agentic workflow so long-running (7-day) analyses don’t terminate early due to the SDK’s idle/wait limit, while staying within the GitHub Actions job timeout budget.

Changes:

  • Adds a workflow-level env override in daily-security-observability.md to set COPILOT_SDK_SEND_TIMEOUT_MS to 59m30s.
  • Regenerates the compiled workflow lock file so the same env override is applied at runtime.
Show a summary per file
File Description
.github/workflows/daily-security-observability.md Adds workflow-level env override for Copilot SDK send timeout to match the 60-minute job timeout budget.
.github/workflows/daily-security-observability.lock.yml Carries the env override into the compiled workflow so it takes effect in GitHub Actions runtime.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 2, 2026

@copilot copilot_harness.cjs must set the timeout on the fly based on the timeout configured for the agent step - not just hardcoded in a single agentic workflow.

Implemented in 2f89666. copilot_harness now gets COPILOT_SDK_SEND_TIMEOUT_MS dynamically via shared buildCopilotSDKEnv(), derived from GH_AW_TIMEOUT_MINUTES as (timeout-minutes * 60s - 30s) for SDK runs, with explicit COPILOT_SDK_SEND_TIMEOUT_MS still taking precedence. Added unit coverage in process_runner.test.cjs.

Copilot AI changed the title Increase Copilot SDK session timeout for Daily Security Observability workflow Derive Copilot SDK session timeout from agent step timeout (minus 30s) Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

@copilot please make the timeout dynamic in copilot_harness.cjs and rerun checks.

Generated by 👨‍🍳 PR Sous Chef · gpt54mini 3.6M ·

@pelikhan pelikhan merged commit b60326e into main Jun 2, 2026
29 of 30 checks passed
@pelikhan pelikhan deleted the copilot/aw-daily-security-observability-fix branch June 2, 2026 20:59
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.

[aw] Daily Security Observability Report failed

3 participants