Add optional "args" field to engine configuration for all engines#1793
Merged
Add optional "args" field to engine configuration for all engines#1793
Conversation
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] Add optional args field to engine configuration
Add optional "args" field to engine configuration
Oct 16, 2025
Collaborator
|
@copilot add support for claude and codex |
Collaborator
|
@copilot add support for custom agentic engine |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added support for claude and codex engines in commit 9e12adc. The |
Copilot
AI
changed the title
Add optional "args" field to engine configuration
Add optional "args" field to engine configuration for all engines
Oct 16, 2025
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot stopped work on behalf of
pelikhan due to an error
October 16, 2025 05:46
Contributor
|
Agentic Changeset Generator triggered by this pull request |
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.
Overview
This PR adds support for an optional
argsfield in the engine configuration that allows users to inject custom command-line arguments into the AI engine CLI command. The arguments are inserted after all default and tool-specific arguments but before the prompt/instruction for all supported engines (Copilot, Claude, and Codex).Motivation
Users need fine-grained control over AI engine command-line arguments for advanced use cases such as:
--add-dir--verboseor--debugChanges
1. Schema Update
Updated
pkg/parser/schemas/main_workflow_schema.jsonto include theargsfield in theengine_configdefinition:2. Engine Configuration
Modified
pkg/workflow/engine.go:Args []stringfield to theEngineConfigstructExtractEngineConfigto parse the args field from both[]anyand[]stringformats3. Engine Implementations
Updated all three AI engines to support custom args:
Copilot Engine (
pkg/workflow/copilot_engine.go):GetExecutionStepsto inject custom args before the--promptflagClaude Engine (
pkg/workflow/claude_engine.go):GetExecutionStepsto inject custom args before the prompt argumentclaudeArgsslice before the command is builtCodex Engine (
pkg/workflow/codex_engine.go):GetExecutionStepsto inject custom args before the"$INSTRUCTION"4. Documentation
Added comprehensive documentation in
docs/src/content/docs/reference/engines.md:Usage Examples
Copilot:
Claude:
Codex:
Generated CLI Commands
Copilot:
copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/.copilot/logs/ \ [tool-args...] \ --add-dir /workspace --verbose \ --prompt "$COPILOT_CLI_INSTRUCTION"Claude:
claude --print [default-args] --custom-flag value "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"Codex:
Testing
Added comprehensive test coverage for all engines:
pkg/workflow/engine_args_test.go): Test cases covering args field extraction and injection for Copilot, Claude, and Codexpkg/workflow/engine_args_integration_test.go): End-to-end workflow compilation tests for all three enginesmake agent-finishcompleted successfully with 0 errorsValidation
✅ All unit tests pass (9.833s)
✅ All integration tests pass for all engines
✅ Schema validation works correctly
✅ Manual testing confirms proper arg injection for Copilot, Claude, and Codex
✅ Documentation complete and accurate for all engines
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.