Skip to content

feat: parameterize tools.timeout and tools.startup-timeout to accept GitHub Actions expressions#23888

Merged
pelikhan merged 5 commits intomainfrom
copilot/parameterize-tools-config-fields-again
Apr 1, 2026
Merged

feat: parameterize tools.timeout and tools.startup-timeout to accept GitHub Actions expressions#23888
pelikhan merged 5 commits intomainfrom
copilot/parameterize-tools-config-fields-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

tools.timeout and tools.startup-timeout only accepted literal integers, blocking reusable workflow_call workflows from customizing tool behavior at call time via inputs.

Changes

Type changes

  • ToolsConfig.Timeout/StartupTimeout: *int*string
  • WorkflowData.ToolsTimeout/ToolsStartupTimeout: intstring
  • toolsProcessingResult fields likewise changed to string

Parsing

  • parseTimeoutTool/parseStartupTimeoutTool handle expression strings alongside all numeric types
  • extractToolsTimeout/extractToolsStartupTimeout return string; accept expressions, reject non-expression strings with actionable error messages
  • New isExpressionString() helper in templatables.go consolidates the ${{…}} check

Engine behavior

  • Literal values (timeout: 60): unchanged — emitted as numeric string env vars; used for arithmetic (ms conversion in Claude)
  • Expressions (timeout: ${{ inputs.tool-timeout }}): emitted directly into env vars in compiled YAML; TOML-based configs (Codex MCP gateway) fall back to defaults since TOML has no expression syntax

Schema

tools.timeout and tools.startup-timeout relaxed to oneOf: [integer (min:1), string]

Example

tools:
  timeout: ${{ inputs.tool-timeout }}          # was: integers only
  startup-timeout: ${{ inputs.startup-timeout }}

Compiles to:

env:
  GH_AW_TOOL_TIMEOUT: ${{ inputs.tool-timeout }}
  GH_AW_STARTUP_TIMEOUT: ${{ inputs.startup-timeout }}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linu2 /usr/bin/git -json GO111MODULE ache/go/1.25.0/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw 993529/b430/imporev-parse ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel git /usr/bin/git --show-toplevel nly /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha user.name Test User /usr/bin/git ub/workflows **/*.cjs 64/bin/go git conf�� --get remote.origin.url /usr/bin/infocmp -json GO111MODULE x_amd64/compile infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go 64/bin/node git (http block)
    • Triggering command: `/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha 3b93b8a:pkg/workflow/tools_types.go 0/x64/bin/node /usr/local/bin/bash adata.go git ache/node/24.14.--show-toplevel bash --no�� --noprofile git /usr/bin/git --show-toplevel t expressions

Arev-parse ache/node/24.14.--show-toplevel git` (http block)

  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --name-only HEAD ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOSUMDB GOWORK 64/bin/go ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel infocmp /usr/bin/git xterm-color go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha ace-editor.md git ache/uv/0.11.2/x86_64/git elete ut, tools.starturev-parse aecdfb402ddae4ec--show-toplevel /usr/bin/gh api aecdfb402ddae4ec194c9148:pkg/workflow/compiler_types.go -f 0/x64/bin/node -f owner=github -f git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git e-analyzer.md GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git /ref/tags/v8 GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linu2 86_64/node -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git -C /tmp/gh-aw-test-runs/20260401-131921-44970/test-1861641107 status /usr/bin/git .github/workflowgit GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha ets.TOKEN }} -trimpath /usr/bin/git -p main -lang=go1.25 git chec�� .github/workflows/test.md -dwarf=false /usr/bin/git go1.25.0 -c=4 -nolocalimports git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel go /usr/bin/git 1921-44970/test-git GO111MODULE cfg git rev-�� --show-toplevel go /usr/bin/git blog-auditor.md GO111MODULE 0/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha Lz62Mqo1M GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE ortcfg k/gh�� g/workflow/featuGOINSECURE g/workflow/imporGOMOD 64/bin/go GOINSECURE GOMOD erignore ache/go/1.25.0/xGOPROXY (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha f9dd00c75c79c7baGOINSECURE GO111MODULE 64/bin/go GOINSECURE erignore GOMODCACHE ache/go/1.25.0/xGO111MODULE env 5848023/b426/_pkGOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/sh go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha -test.paniconexit0 -test.v=true /usr/bin/git -test.timeout=10git -test.run=^Test -test.short=true--show-toplevel git rev-�� --git-dir sh /usr/bin/git "prettier" --chegit GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha 3b93b8a2aa40ad9caecdfb402ddae4ec194c9148:pkg/workflow/compiler_orchestrator_tools.go git /home/REDACTED/work/_temp/uv-python-dir/git --show-toplevel git 0/x64/bin/node git show�� 3b93b8a2aa40ad9caecdfb402ddae4ec194c9148:pkg/workflow/tools_parser.go git /home/REDACTED/.cargo/bin/bash ithub/workflows/git git 64/bin/go bash (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha /tmp/shared-actions-test3730022357 config /usr/bin/git remote.origin.urgit GO111MODULE 64/bin/go git chec�� .github/workflows/test.md sh /usr/bin/git "prettier" --chegit GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel x_amd64/compile /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha 3b93b8a2aa40ad9caecdfb402ddae4ec194c9148:pkg/workflow/compiler_orchestrator_tools.go git /usr/sbin/git --show-toplevel git 0/x64/bin/node git show�� 3b93b8a2aa40ad9caecdfb402ddae4ec194c9148:pkg/workflow/mcp_renderer_github.go git /home/REDACTED/.local/bin/bash ithub/workflows/git git ache/node/24.14.--show-toplevel bash (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� ty-test.md git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� 1/001/test-complex-frontmatter-with-tools.md git r: $owner, name: $name) { hasDiscussionsEnabled } } --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0 --jq .object.sha --show-toplevel 67463e2d04c60bd1028a137d..HEAD /opt/hostedtoolcache/go/1.25.0/x64/bin/node --show-toplevel docker /usr/bin/git node /opt�� install --package-lock-o-d /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha /tmp/file-tracker-test1412974311/test1.md /tmp/file-tracker-test1412974311/test2.lock.yml /usr/bin/git -json GO111MODULE 64/bin/go git add .github/workflows/test.md node /usr/bin/git prettier --check 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha 3b93b8a2aa40ad9caecdfb402ddae4ec194c9148:pkg/workflow/compiler_o-c=4 git /opt/hostedtoolcache/go/1.25.0/x64/bin/git --show-toplevel git r: $owner, name:--show-toplevel git show�� 3b93b8a2aa40ad9caecdfb402ddae4ec194c9148:pkg/workflow/mcp_renderer_github.go git 0/x64/bin/node flow_test.go git ache/node/24.14.--show-toplevel 0/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha licyMinIntegrityOnlymin-integrity_with_explicit_repo2852395592/001 GO111MODULE 993529/b400/vet.cfg GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git /usr/bin/sed --git-dir sh eout|TestExtract--show-toplevel sed -n s/.*"branch"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: `/usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha 194c9148:pkg/workflow/frontmatter_extraction_metadata_test.go -f /usr/bin/infocmp -f owner=github -f infocmp -1 xterm-color ze tools.timeout, tools.startup-timeout to accept expressions

Allow tools.timeout, tools.startu/tmp/fuzz-expr-2673999044.js bin/git --show-toplevel git /usr/lib/git-cor--show-toplevel git` (http block)

  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha 1921-44970/test-1861641107 GO111MODULE 993529/b402/_pkg_.a l GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel git /usr/bin/git user.email test@example.comrev-parse /usr/bin/git git stat�� 64/bin/go git /usr/bin/git --git-dir go /usr/bin/git git (http block)
    • Triggering command: `/usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha 194c9148:pkg/workflow/frontmatter_extraction_metadata_test.go -f tnet/tools/git -f owner=github -f node /opt�� 3/001/inlined-b.md ze tools.timeout, tools.startup-timeout to accept expressions

A-U0 flow.test name git /usr/bin/git flow.test` (http block)

  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3462381400/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3462381400/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3462381400/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3462381400/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3462381400/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE ef/N6GE9dzJuLpfUe9tz4e_/ThKvzodBlPIPkS6j74YO (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel x_amd64/compile /usr/bin/git -json GO111MODULE At,event,headBra--show-toplevel git rev-�� --show-toplevel go /usr/bin/git edOutput37640583git GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel /home/REDACTED/work/gh-aw/gh-aw/pkg/workflow/activation_github_token_test.go /usr/bin/git ted-objects.md git k/_temp/uv-pytho--show-toplevel git rev-�� --show-toplevel node /usr/bin/git er.go git /opt/hostedtoolc--verify git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 8A/RFr094xa-M6ehmK-ZS-f/-nXLG8d-CyxHzcGHNa9W env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel go /usr/bin/git Q2Uj/fpWDtEEhc0egit GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ithub/workflows git ache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git git t-36�� rchestrator_workflow_test.go git /opt/hostedtoolcache/node/24.14.0/x64/bin/node --show-toplevel node ed } } node (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha e=false GO111MODULE 64/bin/go GOINSECURE %H %ct %D 196547c57d67c10a/tmp/go-build766993529/b408/envutil.test go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha e=false GO111MODULE 64/bin/go GOINSECURE %H %ct %D GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel git /usr/bin/git tsFQhE6/MhbvZGVUgNLDq5HDfdGs rev-�� --show-toplevel git 4ce79ec8b941540812b5435a6cbaba11-d --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel Qc8z-gXU0KCIe/DPelnGJTATj5cMeKBMX-/hppJ1OTUIhK8xiwcLC8v/0d8L4CPQc8z-gXU0KCIe /usr/bin/git licyMinIntegritygit GO111MODULE (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ithub/workflows git ache/node/24.14.0/x64/bin/node --show-toplevel version to accepshow /usr/bin/git git t-34�� rchestrator_workflow_test.go git /opt/hostedtoolcache/node/24.14.0/x64/bin/node --show-toplevel git /usr/bin/git node (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/node--noprofile go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go ache�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build766993529/b396/cli.test /tmp/go-build766993529/b396/cli.test -test.testlogfile=/tmp/go-build766993529/b396/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env ck '**/*.cjs' '*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 1, 2026

@copilot use TemplatableInt32

Copilot AI and others added 2 commits April 1, 2026 13:24
…ressions

Allow tools.timeout, tools.startup-timeout, and tools.playwright.version
to accept GitHub Actions expressions (e.g. ${{ inputs.tool-timeout }})
alongside their existing literal integer/string values, enabling
reusable workflow_call workflows to customize tool behavior at call time.

Changes:
- tools_types.go: Change Timeout/StartupTimeout from *int to *string
- tools_parser.go: parseTimeoutTool/parseStartupTimeoutTool accept expressions
- frontmatter_extraction_metadata.go: extractToolsTimeout/extractToolsStartupTimeout
  return string and accept expression strings
- compiler_orchestrator_tools.go: toolsTimeout/toolsStartupTimeout fields are string
- compiler_types.go: WorkflowData.ToolsTimeout/ToolsStartupTimeout are string
- claude/codex/copilot engines: use templatableIntValue for ms calculations;
  emit expressions directly as env var values
- mcp_renderer_github.go: use templatableIntValue for TOML config (falls back
  to default for expressions since TOML doesn't support expressions)
- main_workflow_schema.json: allow integer or string for timeout/startup-timeout
- Tests updated to use string types and added expression test cases

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bf733584-88a5-48c0-bb70-2bf490a2ec0d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Add isExpressionString() helper to templatables.go and use it in
tools_parser.go and frontmatter_extraction_metadata.go, eliminating
repeated inline expression validation checks.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bf733584-88a5-48c0-bb70-2bf490a2ec0d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Parameterize tools config fields to accept expressions feat: parameterize tools.timeout and tools.startup-timeout to accept GitHub Actions expressions Apr 1, 2026
Copilot AI requested a review from pelikhan April 1, 2026 13:30
…meout

Replace *string with *TemplatableInt32 for the Timeout and StartupTimeout
fields in ToolsConfig, using the established codebase pattern. Update
parseTimeoutTool/parseStartupTimeoutTool to return *TemplatableInt32,
and update ToMap() to emit the correct type via ToValue().

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e2f00122-6390-4882-990e-ec1c3399bc83

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

Copilot AI commented Apr 1, 2026

@copilot use TemplatableInt32

Done in 0a50063. ToolsConfig.Timeout and StartupTimeout now use *TemplatableInt32, and parseTimeoutTool/parseStartupTimeoutTool return *TemplatableInt32. ToMap() uses ToValue() to emit the correct type (int for literals, string for expressions).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -unreachable=false /tmp/go-build516284297/b049/vet.cfg 284297/b347/vet.cfg (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha get cfg 64/pkg/tool/linux_amd64/vet credential.userngit (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -t security /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet OUTPUT -d 168.63.129.16 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build516284297/b032/vet.cfg 284297/b291/vet.cfg 0 -j ACCEPT /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/compile /usr/bin/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -t security 284297/b157/vet.cfg -nxv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 284297/b313/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha -t security /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet OUTPUT -d 168.63.129.16 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build516284297/b039/vet.cfg 284297/b295/vet.cfg INVALID,NEW -j DROP /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha -t security 284297/b154/vet.cfg OUTPUT -d 168.63.129.16 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build516284297/b033/vet.cfg 284297/b293/vet.cfg INVALID,NEW -j DROP /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --noprofile (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel -tests /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan marked this pull request as ready for review April 1, 2026 14:18
Copilot AI review requested due to automatic review settings April 1, 2026 14:18
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

Enables tools.timeout and tools.startup-timeout to be specified as either literal integers or GitHub Actions expressions (e.g. ${{ inputs.tool-timeout }}), allowing reusable workflow_call workflows to parameterize tool timeouts at call time.

Changes:

  • Switched workflow timeout plumbing (WorkflowData, tools processing results, engines) from int to string to preserve expressions.
  • Updated parsing/extraction to accept ${{ ... }} strings while validating numeric literals (min 1) and rejecting non-expression strings.
  • Relaxed JSON schema for tools.timeout / tools.startup-timeout from integer-only to oneOf: [integer, string], and added helper isExpressionString().

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/workflow/tools_types.go Uses TemplatableInt32 for tools timeout fields and round-trips via ToValue()
pkg/workflow/tools_timeout_test.go Updates tests for string timeouts and adds expression coverage
pkg/workflow/tools_parser.go Parses timeout fields into TemplatableInt32, accepting numeric types + expression strings
pkg/workflow/templatables.go Adds isExpressionString() helper for strict ${{...}} detection
pkg/workflow/mcp_renderer_github.go Falls back to defaults for TOML-rendered timeouts when values are expressions
pkg/workflow/frontmatter_extraction_metadata.go Extracts tool timeouts as strings; validates expressions vs numeric literals
pkg/workflow/frontmatter_extraction_metadata_test.go Updates startup-timeout extraction tests for string return + expressions
pkg/workflow/copilot_engine_execution.go Emits timeout env vars as raw strings (literal or expression)
pkg/workflow/compiler_types.go Changes timeout fields in WorkflowData from int to string
pkg/workflow/compiler_orchestrator_workflow_test.go Updates orchestrator workflow tests for new timeout types
pkg/workflow/compiler_orchestrator_tools.go Changes tools processing result timeout fields to string
pkg/workflow/compiler_orchestrator_tools_test.go Updates assertions for string timeouts
pkg/workflow/codex_engine.go Emits timeout env vars as raw strings (literal or expression)
pkg/workflow/claude_engine.go Uses templatableIntValue() for ms conversion; emits timeout env vars as raw strings
pkg/parser/schemas/main_workflow_schema.json Relaxes schema for timeout fields to accept expressions via oneOf
Comments suppressed due to low confidence (1)

pkg/workflow/frontmatter_extraction_metadata.go:231

  • This error message says tools.startup-timeout "must be an integer" even though expression strings are now accepted. Consider updating it to "must be an integer or a GitHub Actions expression" to match the updated behavior and improve clarity.
		case float64:
			timeout = int(v)
		default:
			return "", fmt.Errorf("tools.startup-timeout must be an integer, got %T", timeoutValue)
		}

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

Comment on lines +4039 to +4042
{
"type": "string",
"description": "GitHub Actions expression (e.g. '${{ inputs.tool-timeout }}')"
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The schema allows a string for tools.timeout but doesn’t constrain it to a GitHub Actions expression. Other templatable int fields (e.g. top-level timeout-minutes) add a pattern like ^\$\{\{.*\}\}$ to prevent accepting arbitrary strings that will later fail compilation. Consider adding the same pattern to the string branch here.

Copilot uses AI. Check for mistakes.
},
{
"type": "string",
"description": "GitHub Actions expression (e.g. '${{ inputs.startup-timeout }}')"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The schema allows a string for tools.startup-timeout but doesn’t constrain it to a GitHub Actions expression. For consistency with other templatable integer fields (e.g. timeout-minutes uses a ^\$\{\{.*\}\}$ pattern), add a pattern here so non-expression strings are rejected by schema validation rather than at compile time.

Suggested change
"description": "GitHub Actions expression (e.g. '${{ inputs.startup-timeout }}')"
"description": "GitHub Actions expression (e.g. '${{ inputs.startup-timeout }}')",
"pattern": "^\\$\\{\\{.*\\}\\}$"

Copilot uses AI. Check for mistakes.
"minimum": 1,
"description": "Timeout in seconds for tool/MCP server operations. Applies to all tools and MCP servers if supported by the engine. Default varies by engine (Claude: 60s, Codex: 120s).",
"examples": [60, 120, 300]
"description": "Timeout in seconds for tool/MCP server operations. Applies to all tools and MCP servers if supported by the engine. Default varies by engine (Claude: 60s, Codex: 120s). Supports GitHub Actions expressions for reusable workflow_call workflows.",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The tools.timeout description says the Codex default is 120s, but the code uses constants.DefaultToolTimeout (60s) for tool timeouts (e.g. pkg/constants/constants.go defines DefaultToolTimeout = 60s, and Codex TOML rendering outputs tool_timeout_sec based on that). Please update the description to match actual behavior to avoid misleading users.

Suggested change
"description": "Timeout in seconds for tool/MCP server operations. Applies to all tools and MCP servers if supported by the engine. Default varies by engine (Claude: 60s, Codex: 120s). Supports GitHub Actions expressions for reusable workflow_call workflows.",
"description": "Timeout in seconds for tool/MCP server operations. Applies to all tools and MCP servers if supported by the engine. Default: 60 seconds (for both Claude and Codex). Supports GitHub Actions expressions for reusable workflow_call workflows.",

Copilot uses AI. Check for mistakes.
default:
frontmatterMetadataLog.Printf("Invalid tools.timeout type: %T", timeoutValue)
return 0, fmt.Errorf("tools.timeout must be an integer, got %T", timeoutValue)
return "", fmt.Errorf("tools.timeout must be an integer, got %T", timeoutValue)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

This error message says tools.timeout "must be an integer" even though expression strings are now accepted. Consider updating it to "must be an integer or a GitHub Actions expression" for consistency with the string-type error path and the updated schema.

This issue also appears on line 227 of the same file.

Suggested change
return "", fmt.Errorf("tools.timeout must be an integer, got %T", timeoutValue)
return "", fmt.Errorf("tools.timeout must be an integer or a GitHub Actions expression, got %T", timeoutValue)

Copilot uses AI. Check for mistakes.
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 1, 2026

@copilot review comments

- Add pattern constraint to schema string branches for tools.timeout and
  tools.startup-timeout so non-expression strings are rejected at schema
  validation time
- Fix tools.timeout description: default is 60s for both engines (not 120s
  for Codex)
- Update error messages in frontmatter_extraction_metadata.go to say
  "must be an integer or a GitHub Actions expression" consistently

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4d9980f1-e3e9-4ffd-842d-bbde52fa5558

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

Copilot AI commented Apr 1, 2026

@copilot review comments

Addressed all 4 review comments in 40787c1:

  • Added "pattern": "^\\$\\{\\{.*\\}\\}$" to the string branches of both tools.timeout and tools.startup-timeout in the schema
  • Fixed the tools.timeout description to say "Default: 60 seconds (for both Claude and Codex)"
  • Updated both error messages in frontmatter_extraction_metadata.go to "must be an integer or a GitHub Actions expression"

@pelikhan pelikhan merged commit 515c8ef into main Apr 1, 2026
@pelikhan pelikhan deleted the copilot/parameterize-tools-config-fields-again branch April 1, 2026 14:35
Copilot AI restored the copilot/parameterize-tools-config-fields-again branch April 1, 2026 14:36
Copilot stopped work on behalf of pelikhan due to an error April 1, 2026 14:36
github-actions bot added a commit that referenced this pull request Apr 1, 2026
…engine.version, and tools.timeout

- frontmatter.md: note that timeout-minutes accepts expressions for workflow_call parameterization
- engines.md: add example showing engine.version with ${{ inputs.engine-version }}, noting injection-safe env-var treatment
- tools.md: add Tool Timeout Configuration section documenting tools.timeout and tools.startup-timeout fields, including expression support and Codex TOML limitation

Covers: #23863, #23870, #23888

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

[plan] Parameterize tools config fields (timeout, startup-timeout, per-tool versions) to accept expressions

3 participants