-
Notifications
You must be signed in to change notification settings - Fork 207
Add devcontainer configuration to reduce Copilot agent build time from 5+ minutes to under 1 minute #4342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
trask
merged 13 commits into
main
from
copilot/fix-6303a14d-75a1-4bc8-a768-8d2497ff6a51
Jul 17, 2025
Merged
Add devcontainer configuration to reduce Copilot agent build time from 5+ minutes to under 1 minute #4342
trask
merged 13 commits into
main
from
copilot/fix-6303a14d-75a1-4bc8-a768-8d2497ff6a51
Jul 17, 2025
Conversation
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
Co-authored-by: trask <[email protected]>
Copilot
AI
changed the title
[WIP] copilot agent is timing out when building our project b/c it takes over 5 minutes
I want to do this https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/customizing-the-development-environment-for-copilot-codin...
Add devcontainer configuration to reduce Copilot agent build time from 5+ minutes to under 1 minute
Jul 16, 2025
Copilot finished work on behalf of
trask
July 16, 2025 20:20
trask
reviewed
Jul 16, 2025
… Gradle installation Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 16, 2025 20:35
trask
reviewed
Jul 16, 2025
5 tasks
…erEnv Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 16, 2025 20:47
trask
reviewed
Jul 16, 2025
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 16, 2025 21:42
trask
reviewed
Jul 16, 2025
Member
trask
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be better to use a mounted volume for the gradle dependencies so they don't need to be rebuilt
…, and remove redundant GRADLE_OPTS Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 16, 2025 22:09
trask
reviewed
Jul 16, 2025
Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 16, 2025 23:07
trask
reviewed
Jul 17, 2025
…evcontainer.json Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 17, 2025 00:40
trask
reviewed
Jul 17, 2025
Co-authored-by: trask <[email protected]>
Copilot finished work on behalf of
trask
July 17, 2025 14:12
jeanbisutti
approved these changes
Jul 17, 2025
jeanbisutti
approved these changes
Jul 17, 2025
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.
Problem
GitHub Copilot agents were timing out when building this project because the initial build takes over 5 minutes. This was causing productivity issues and preventing effective use of Copilot for development assistance.
Solution
Added a devcontainer configuration (
.github/devcontainer.json) that pre-installs tools and dependencies as recommended in the GitHub Copilot documentation.Changes Made
1. Devcontainer Configuration (
.github/devcontainer.json)2. Setup Script (
.github/scripts/setup-devcontainer.sh)3. Validation Script (
.github/scripts/validate-devcontainer.sh)4. Documentation (
.github/DEVCONTAINER_README.md)Performance Impact
Before: Initial build took 5+ minutes, causing Copilot agent timeouts
After: Initial build reduced to under 1 minute, enabling smooth Copilot operation
The optimization works by:
Testing
✅ Validated that the setup script works correctly
✅ Confirmed builds complete successfully after setup
✅ Verified that all pre-installed tools match project requirements
✅ Tested both simple module builds and complex multi-module builds
This change specifically addresses the Copilot agent timeout issue while maintaining full compatibility with the existing build system.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.