You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running goal: Improve and optimize time to start of coding agent and overall workflow time #12543
The introduction of multiple pre-stages, the firewall and MCP gateway plus general drift have together increased the "Time to Start of Coding Agent", and the overall run time of a hello-world agentic workflow.
changed the title [-]Time to start of agent need to be reduced[/-][+]Time to start of agent need to be reduced - docker image caching[/+]on Jan 29, 2026
changed the title [-]Time to start of agent need to be reduced - docker image caching[/-][+]Running goal: Improve and optimize time to start of coding agent and overall workflow time [/+]on Jan 29, 2026
Workflow: Daily Repo Status Run ID:21479574343 Date: January 29, 2026 Total Duration: 3.8 minutes (225.9 seconds)
Executive Summary
The workflow consists of 6 jobs running sequentially. The agent job dominates execution time at 64.7% (146.2s), with actual coding agent work taking 85.4s after a 32.7s startup delay. Pre-activation and activation jobs are minimal overhead (2.2% and 2.7% respectively).
Impact: Save 8-12s (5-8% of agent job) Current: Sequential execution of independent tasks
Parallelization Opportunities:
Docker image downloads (Stage 3) can run during dependency installation (Stage 2)
MCP gateway start can overlap with Claude CLI installation
Safe outputs config generation can run in parallel with Docker pulls
Implementation:
# Run independent operations in parallel
npm install -g @anthropic-ai/claude-code@2.1.22 &
docker pull ghcr.io/github/github-mcp-server:v0.30.2 &
docker pull ghcr.io/githubnext/gh-aw-mcpg:v0.0.84 &wait# Wait for all background jobs
3. Optimize Agent Startup (Stage 4)
Impact: Save 5-8s (3-6% of agent job) Current: 32.7s from "Execute Agent" to "Containers Started"
Bottlenecks:
AWF firewall initialization: 0.9s
iptables rules setup: 0.2s
Container layer pulling: ~30s (overlaps with rejig docs #1)
Network bridge creation: ~0.5s
Solutions:
Pre-create AWF network bridges (persist across runs)
Cache iptables configurations
Use faster container runtime (containerd vs Docker)
Reduce MCP connection timeouts (current: 120s, 60s for tools)
Configuration Change:
env:
MCP_TIMEOUT: 30000# Reduce from 120s to 30sMCP_TOOL_TIMEOUT: 20000# Reduce from 60s to 20s
4. Streamline JavaScript File Copying
Impact: Save 2-3s (1-2% of agent job) Current: 1.1s to copy 334 JavaScript files in Stage 1
Problem:
Setup Scripts copies all 334 .cjs files individually
No compression or bundling
Redundant test files (.test.cjs) copied to production
Solutions:
Bundle JavaScript files into single archive
Use tarball extraction instead of individual cp commands
Exclude test files from production deployment
Pre-install common files in runner image
5. Reduce Detection Job Time
Impact: Save 8-10s (3-4% of workflow) Current: 21.7s for threat detection (9.6% of total workflow)
Analysis Needed:
What does the detection job analyze? (logs, artifacts, code)
Can it run in parallel with agent job?
Are all detection rules necessary?
Potential Solutions:
Run detection concurrently with agent (non-blocking)
Cache detection patterns/rules
Use incremental analysis (only changed files)
Reduce timeout thresholds
Impact Summary
Optimization
Time Saved
% Reduction
Effort
Priority
Docker image pre-caching
15-20s
10-14%
Medium
🔴 High
Parallelize setup
8-12s
5-8%
Low
🔴 High
Optimize agent startup
5-8s
3-6%
Medium
🟡 Medium
JS file bundling
2-3s
1-2%
Low
🟢 Low
Detection optimization
8-10s
3-4%
High
🟡 Medium
TOTAL POTENTIAL
38-53s
22-30%
Expected New Total: 173-188 seconds (2.9-3.1 minutes) vs Current: 225.9 seconds (3.8 minutes)
Activity
[-]Time to start of agent need to be reduced[/-][+]Time to start of agent need to be reduced - docker image caching[/+][-]Time to start of agent need to be reduced - docker image caching[/-][+]Running goal: Improve and optimize time to start of coding agent and overall workflow time [/+]dsyme commentedon Jan 29, 2026
Here's the analysis of the "agent" job of the out-of-repo gh-aw-trial-hono
Workflow Execution Timing Analysis
Stage 1: Setup & Infrastructure (45s)
Time: 13:15:45 - 13:16:30
Stage 2: MCP Gateway & Configuration (35s)
Time: 13:16:30 - 13:17:05
Stage 3: Container Startup (32s)
Time: 13:16:05 - 13:16:37
Stage 4: ⭐ Start Coding Agent (1s)
Time: 13:16:37 - 13:16:38
Stage 5: Agent Execution & Processing (74s)
Time: 13:16:38 - 13:17:52
Key Insights for Optimization
Docker image download (32s) is the single largest bottleneck - caching these images could save significant time
Time to Start Coding Agent: Only ~112s from workflow start to agent execution (Stages 1-4)
Agent execution time (74s) is dominated by:
MCP server initialization (10s)
Repository data gathering via GitHub MCP (25s)
Report generation (35s)
Prompt preparation (24s) is relatively fast given the complexity of interpolation and templating
Total execution time: 186s (3 minutes)
The workflow is well-optimized with the main opportunity being Docker image caching to reduce Stage 1 by 30-50%.
dsyme commentedon Jan 29, 2026
Another analysis of https://github.com/githubnext/gh-aw-trial-hono/actions/runs/21479574343/job/61872167759
Workflow Timing Analysis
Workflow: Daily Repo Status
Run ID: 21479574343
Date: January 29, 2026
Total Duration: 3.8 minutes (225.9 seconds)
Executive Summary
The workflow consists of 6 jobs running sequentially. The agent job dominates execution time at 64.7% (146.2s), with actual coding agent work taking 85.4s after a 32.7s startup delay. Pre-activation and activation jobs are minimal overhead (2.2% and 2.7% respectively).
Critical Path: Pre-activation → Activation → Agent → Detection → Safe Outputs → Conclusion
Complete Workflow Timeline
Job-Level Breakdown
Note: Gaps between jobs (e.g., 7s between activation and agent) represent GitHub Actions job scheduling overhead.
Agent Job Deep Dive (146.2s, 64.7% of workflow)
The agent job is the performance bottleneck. Breaking it into 5 key stages:
Stage-by-Stage Breakdown
Detailed Agent Job Timeline
🎯 Top 5 Optimization Opportunities
1. Pre-cache Docker Images
Impact: Save 15-20s (10-14% of agent job)
Current: Stage 3 + Stage 4 spend 32.7s pulling containers on every run
Problem:
ghcr.io/github/github-mcp-server:v0.30.2(~30MB)ghcr.io/githubnext/gh-aw-mcpg:v0.0.84(~268MB)node:lts-alpine(~40MB)Solutions:
docker pullcommands to workflow startup (runs once, cached)Implementation:
2. Parallelize Setup Operations
Impact: Save 8-12s (5-8% of agent job)
Current: Sequential execution of independent tasks
Parallelization Opportunities:
Implementation:
3. Optimize Agent Startup (Stage 4)
Impact: Save 5-8s (3-6% of agent job)
Current: 32.7s from "Execute Agent" to "Containers Started"
Bottlenecks:
Solutions:
Configuration Change:
4. Streamline JavaScript File Copying
Impact: Save 2-3s (1-2% of agent job)
Current: 1.1s to copy 334 JavaScript files in Stage 1
Problem:
Solutions:
5. Reduce Detection Job Time
Impact: Save 8-10s (3-4% of workflow)
Current: 21.7s for threat detection (9.6% of total workflow)
Analysis Needed:
Potential Solutions:
Impact Summary
Expected New Total: 173-188 seconds (2.9-3.1 minutes)
vs Current: 225.9 seconds (3.8 minutes)
Quick Wins (Implement First)
Week 1: Immediate Improvements
Expected savings: 20-25 seconds
Week 2: Medium Effort
Expected savings: 5-8 seconds
Future Optimization
Job Dependencies & Parallelization
Current: All jobs run sequentially (226s total)
Potential Parallel Execution:
New Critical Path: 171s (save 22s from detection not blocking safe_outputs)
Time to Start Coding Agent
Current: 65.2 seconds from job start to containers ready
With Optimizations: ~40-45 seconds (37% improvement)
Monitoring & Metrics
Key Performance Indicators (KPIs)
Time to Code (TC): Job start → Agent starts coding
Agent Startup Time (AST): Execute command → Containers ready
Total Workflow Time (TWT): First job start → Last job end
Agent Efficiency (AE): Agent execution / Total agent job time
Recommended Tracking
Add timing annotations to workflow:
Conclusion
The workflow's performance bottleneck is the agent job (146.2s, 64.7%), specifically:
Pre-activation (5.0s) and activation (6.2s) jobs are already optimized and represent minimal overhead (4.9% combined).
Recommended Action Plan:
Expected Outcome: Reduce total workflow time by 22-30% (from 3.8min to 2.9-3.1min) and improve "time to start coding" by 37% (from 65s to 40-45s).
dsyme commentedon Jan 29, 2026
/plan
github-actions commentedon Jan 29, 2026
🎉 Yo ho ho! Plan Command found the treasure and completed successfully! ⚓💰