Skip to content
GitHub Agentic Workflows

TrialOps

TrialOps extends SideRepoOps with temporary trial repositories for safely validating and iterating on workflows before production deployment. The trial command creates isolated private repos where workflows execute and capture safe outputs (issues, PRs, comments) without affecting your actual codebase.

Terminal window
gh aw trial githubnext/agentics/weekly-research

The CLI creates a temporary private repository (default: gh-aw-trial), installs and executes the workflow via workflow_dispatch. Results are saved locally in trials/weekly-research.DATETIME-ID.json, in the trial repository on GitHub, and summarized in the console.

ModeFlagDescription
Default(none)github.repository points to your repo; outputs go to trial repo
Direct--repo myorg/test-repoRuns in specified repo; creates real issues/PRs there
Logical--logical-repo myorg/target-repoSimulates running against specified repo; outputs in trial repo
Clone--clone-repo myorg/real-repoClones repo contents so workflows can analyze actual code

Preview what would happen without executing workflows or creating repositories:

Terminal window
gh aw trial ./my-workflow.md --dry-run
Terminal window
gh aw trial githubnext/agentics/weekly-research # From GitHub
gh aw trial ./my-workflow.md # Local file

Compare workflows side-by-side with combined results:

Terminal window
gh aw trial githubnext/agentics/daily-plan githubnext/agentics/weekly-research

Outputs: individual result files plus trials/combined-results.DATETIME.json.

Test consistency by running multiple times:

Terminal window
gh aw trial githubnext/agentics/my-workflow --repeat 3
Terminal window
gh aw trial githubnext/agentics/my-workflow --host-repo my-custom-trial
gh aw trial ./my-workflow.md --host-repo . # Use current repo

Provide issue context for issue-triggered workflows:

Terminal window
gh aw trial githubnext/agentics/triage-workflow \
--trigger-context "https://github.com/myorg/repo/issues/123"

Automatically merge created PRs (useful for testing multi-step workflows):

Terminal window
gh aw trial githubnext/agentics/feature-workflow --auto-merge-prs

Test workflow responses to additional constraints without modifying the source:

Terminal window
gh aw trial githubnext/agentics/my-workflow \
--append "Focus on security issues and create detailed reports."
Terminal window
gh aw trial ./my-workflow.md --delete-host-repo-after # Delete after completion
gh aw trial ./my-workflow.md --force-delete-host-repo-before # Clean slate before running

Results are saved in trials/*.json with workflow runs, issues, PRs, and comments viewable in the trial repository’s Actions and Issues tabs.

Result file structure:

{
"workflow_name": "weekly-research",
"run_id": "12345678",
"safe_outputs": {
"issues_created": [{
"number": 5,
"title": "Research quantum computing trends",
"url": "https://github.com/user/gh-aw-trial/issues/5"
}]
},
"agentic_run_info": {
"duration_seconds": 45,
"token_usage": 2500
}
}

Success indicators: Green checkmark, expected outputs created, no errors in logs.

Common issues:

  • Workflow dispatch failed - Add workflow_dispatch trigger
  • No safe outputs - Configure safe outputs in workflow
  • Permission errors - Verify API keys
  • Timeout - Use --timeout 60 (minutes)

Run multiple workflows to compare quality, quantity, performance, and consistency:

Terminal window
gh aw trial v1.md v2.md v3.md --repeat 2
cat trials/combined-results.*.json | jq '.results[] | {workflow: .workflow_name, issues: .safe_outputs.issues_created | length}'
  • Requires workflow_dispatch trigger - Add to workflows that only trigger on issues/PRs/schedules
  • Safe outputs needed - Workflows without safe outputs execute but create no visible results
  • No simulated events - Use --trigger-context to provide event context like issue payloads
  • Private repositories - Trial repos count toward your private repository quota
  • API rate limits - Space out large runs or use --repeat instead of separate invocations

Iterate locally: write the workflow, preview with --dry-run, run a trial, adjust, compare variants side-by-side, validate consistency with --repeat, then deploy.

Terminal window
# Unit testing - individual workflows
gh aw trial ./workflows/triage.md --delete-host-repo-after
# Integration testing - with actual content
gh aw trial ./workflows/code-review.md --clone-repo myorg/real-repo
# Regression testing - before/after comparison
gh aw trial ./workflow.md --host-repo regression-baseline
gh aw trial ./workflow.md --host-repo regression-test
# Performance testing - execution time and tokens
gh aw trial ./workflow.md --repeat 5

Iteratively refine prompts: run baseline → modify prompt → test variant → compare outputs → repeat.

name: Test Workflows
on: [pull_request]
jobs:
trial:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install gh-aw
run: gh extension install github/gh-aw
- name: Trial workflow
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
run: gh aw trial ./.github/workflows/my-workflow.md --delete-host-repo-after --yes
IssueSolution
workflow not foundUse correct format: owner/repo/workflow-name, owner/repo/.github/workflows/workflow.md, or ./local-workflow.md
workflow_dispatch not supportedAdd workflow_dispatch: to workflow frontmatter on: section
authentication failedSee Authentication. Trial automatically prompts for missing secrets and uploads them to the trial repo
failed to create trial repositoryCheck gh auth status, verify quota with gh api user | jq .plan, try explicit --host-repo name
execution timed outIncrease with --timeout 60 (minutes, default: 30)
No issues/PRs createdConfigure safe-outputs in workflow frontmatter, check Actions logs for errors