Objective
Allow commonly used numeric and boolean fields within tools configuration (e.g. tools.timeout, tools.startup-timeout, tool-specific version fields) to accept GitHub Actions expression strings, enabling reusable workflow_call workflows to customize tool behavior at call time.
Context
Tracked in issue #23724. The tools field is complex (many sub-fields with different types) so this issue focuses on the highest-value fields: timeouts and per-tool version overrides. The templatables.go helpers (preprocessIntFieldAsString, AddTemplatableInt, preprocessBoolFieldAsString, AddTemplatableBool) should be applied to these fields.
Target Fields
| Field |
Type |
Use Case |
tools.timeout |
integer (seconds) |
Per-workflow tool timeout |
tools.startup-timeout |
integer (seconds) |
Tool startup timeout |
tools.playwright.version |
string |
Pin Playwright version per workflow |
tools.github.toolsets |
array of strings |
Could be expression (list) |
Current Behavior
tools:
timeout: 60 # Only literal integers
startup-timeout: 30 # Only literal integers
playwright:
version: "1.41.0" # Only literal strings
Expected Behavior
tools:
timeout: ${{ inputs.tool-timeout }} # ✅ Expression for integer
startup-timeout: ${{ inputs.startup-timeout }} # ✅
playwright:
version: ${{ inputs.playwright-version }} # ✅
Approach
-
tools.timeout and tools.startup-timeout (integers):
- Apply
preprocessIntFieldAsString pattern in pkg/workflow/tools_parser.go (NewTools).
- Change
ToolsConfig.Timeout and ToolsConfig.StartupTimeout from *int to *string.
- Use
AddTemplatableInt when building the handler config.
- Update JSON schema items for
timeout and startup-timeout to accept integer or expression string.
-
tools.playwright.version (string):
PlaywrightToolConfig.Version is already a string; check if expression detection is needed.
- Update the schema to explicitly allow
${{ ... }} strings if not already.
- Ensure the version string is passed safely to the compiled YAML (not shell-injected).
-
tools.github.toolsets (array):
- Allow
${{ inputs.toolsets }} as an alternative to a literal array (similar to network.allowed approach).
- Lower priority; include if straightforward.
-
Update JSON schema in pkg/parser/schemas/main_workflow_schema.json for each field.
-
Update pkg/workflow/tools_parser.go to preprocess and validate expression values.
-
Update compilation to emit expressions correctly in the compiled YAML.
-
Add tests for each changed field.
Files to Modify
pkg/workflow/tools_parser.go — preprocess fields before unmarshaling
pkg/workflow/tools_types.go — change field types where needed (*int → *string)
pkg/parser/schemas/main_workflow_schema.json — relax type constraints
- Compilation code emitting tool config — use templatable helpers
- Tests in
pkg/workflow/
Acceptance Criteria
Generated by Plan Command for issue #23724 · ◷
Objective
Allow commonly used numeric and boolean fields within
toolsconfiguration (e.g.tools.timeout,tools.startup-timeout, tool-specificversionfields) to accept GitHub Actions expression strings, enabling reusableworkflow_callworkflows to customize tool behavior at call time.Context
Tracked in issue #23724. The
toolsfield is complex (many sub-fields with different types) so this issue focuses on the highest-value fields: timeouts and per-tool version overrides. Thetemplatables.gohelpers (preprocessIntFieldAsString,AddTemplatableInt,preprocessBoolFieldAsString,AddTemplatableBool) should be applied to these fields.Target Fields
tools.timeouttools.startup-timeouttools.playwright.versiontools.github.toolsetsCurrent Behavior
Expected Behavior
Approach
tools.timeoutandtools.startup-timeout(integers):preprocessIntFieldAsStringpattern inpkg/workflow/tools_parser.go(NewTools).ToolsConfig.TimeoutandToolsConfig.StartupTimeoutfrom*intto*string.AddTemplatableIntwhen building the handler config.timeoutandstartup-timeoutto accept integer or expression string.tools.playwright.version(string):PlaywrightToolConfig.Versionis already a string; check if expression detection is needed.${{ ... }}strings if not already.tools.github.toolsets(array):${{ inputs.toolsets }}as an alternative to a literal array (similar tonetwork.allowedapproach).Update JSON schema in
pkg/parser/schemas/main_workflow_schema.jsonfor each field.Update
pkg/workflow/tools_parser.goto preprocess and validate expression values.Update compilation to emit expressions correctly in the compiled YAML.
Add tests for each changed field.
Files to Modify
pkg/workflow/tools_parser.go— preprocess fields before unmarshalingpkg/workflow/tools_types.go— change field types where needed (*int→*string)pkg/parser/schemas/main_workflow_schema.json— relax type constraintspkg/workflow/Acceptance Criteria
tools.timeout: 60still works (backward compatible)tools.timeout: ${{ inputs.tool-timeout }}compiles and expression appears correctly in compiled.lock.ymltools.startup-timeoutandtools.playwright.versionmake agent-finishRelated to Ask: Runtime Parameterization of Compile-Time Frontmatter Fields #23724