Table of Contents
Sync and Import Course Repositories
On the course repositories screen, you can connect course repositories on GitHub to Exercode and import them after reviewing the differences. The processing after you confirm an import runs in the background, so it continues even if you close the screen.
Target Audience
- Course authors (members of the course repository)
- Organization administrators of the organization that registered the course repository
- The person who registered a repository that is not registered to an organization (they can still delete it even if they are no longer a member)
What You Can Do
- Add course repositories via the GitHub App
- Register course repositories you added to Exercode to an organization you manage
- Sync the latest state from GitHub
- Review differences before importing
- Check the status of imports
- Import through Exercode MCP from an AI agent
- Open imported courses
- Delete a course repository and its imported data, and re-link a deleted registration
How to Open
- From the menu under your email address at the top right of the screen (or the person icon if the screen is narrow), open
Course Repositories. - Check the target repository in the list.
Workflow
- To add a new course repository, use
Add from My GitHub. - To reflect repositories added on GitHub or changes to the repositories the GitHub App can read, run
Sync with My GitHub. You are taken to GitHub, and course repositories where you have write permission (Write or higher) on GitHub and that containcourse.yamlorcourse.ymlbut have not yet been added to Exercode are added as your course repositories. Course repositories already added have only their information such as the GitHub name updated; their members do not change. Removing your permission on GitHub does not remove you from the Exercode course repository members. The first time, a screen appears asking you to allow Exercode to check your GitHub account. - To register a course repository you added to Exercode to an organization, press
Register to Organizationon the target repository and choose the organization. - Press
Importon the target repository. - In the confirmation dialog, review the differences for courses, problems, classes, materials, assignments, and files.
- If there are no issues, confirm the import.
- After confirming, the confirmation dialog closes. While processing, the
Importbutton on the target repository shows a loading state. - If you keep the screen where you started the import open, a completion notification appears at the bottom right when it finishes. Imported courses in the card are also updated.
A course ID that belongs to a different course repository cannot be overwritten by a normal import. To move a course between repositories owned by the same owner or within the same organization, first delete the course from the latest state of the source repository, then run Move Course shown on the confirmation screen for the destination import. Re-check the differences after moving, then import.
If a problem ID belongs to a different course repository, it also cannot be imported. If the duplicate problem ID is not intended, change the problem ID on GitHub. If problems move as a result of moving a course, do not move the problems alone; use Move Course above.
While an Import Is Running
Imports run in the background. Closing the browser or navigating to another page does not stop server-side processing.
While processing, the Import button on that repository cannot be pressed. Hover over the button to see which repository's import is running.
When imports are run for multiple course repositories, they execute in order, so you may need to wait for other repositories' imports to finish.
Importing from an AI Agent
You can also ask an AI agent with Exercode MCP registered (such as Codex or Claude Code) to run the import. The course repositories you can import are the same as on the Course Repositories screen.
- Open
/agent-challenges/setupand register Exercode MCP with your AI agent by following the displayed steps (the same steps as the initial setup in Work on Agent Challenges). Skip this if already registered. - Ask the AI agent to import by telling it the name of the course repository you want to import. The AI agent uses these tools:
list_repositories: Gets the list of course repositories that can be imported.preview_repository_import: Checks the differences the import would make and the number of submission records that would be deleted. Accounts (email addresses) of the submission records to be deleted are not passed to the AI agent.import_repository: Starts the import.get_repository_import_status: Checks the import status and, if it failed, the error.
- You can also check results on the
Course Repositoriesscreen.
If a course ID or problem ID belongs to a different course repository, the AI agent cannot import it. As described in the workflow above, run Move Course on the Course Repositories screen, or change the ID on GitHub.
Imports that delete submission records cannot be run from the AI agent and will fail. Before importing, check which accounts' submission records will be deleted on the confirmation dialog of the Course Repositories screen.
Registering to an Organization
Register to Organization appears on course repositories you first added to Exercode that are not yet registered to an organization. You cannot register course repositories added by others, even if you are a member, because registration would allow the organization administrators to delete the course repository. You can choose only organizations where you are an administrator. Service administrators can register course repositories added by others to organizations where they are administrators.
Once registered to an organization, the administrators of that organization can also review and import the course repository. Organization administrators can add or remove course repository members (course authors) from the Course Repositories section of the organization screen (Manage Organization Course Repositories and Course Authors). Courses imported from a registered repository can then be added to organizations and groups.
Points to Check in the Review
- If deletions are included, the existing course structure may change.
Filesincludes differences such as images and PDFs underassets.- If there are no changes, re-importing will not update the content.
After Import
- Imported courses are displayed in the card.
- You can open the course screen directly from the displayed course name.
- If you keep the screen where you started the import open, a notification appears at the bottom right on completion.
Deleting a Repository
Repositories not registered to an organization can be deleted by the person who registered them, using Delete on the target repository. If you are no longer a member, only the repository name and Delete are shown. Repositories registered to an organization are handled from the organization's repository management list, and service administrators handle them from the service management repository list. Deletion is possible even if you no longer have GitHub access.
On the confirmation screen, check the target courses and deletion counts, check the box acknowledging that learning records cannot be restored, and press Delete Repository and Data. This deletes courses, classes, materials, and problems, along with related records including submissions, progress, and chats involving other users. Repository member settings (course authors) are also deleted. The repository on GitHub is not deleted.
Deletion is not possible while an import is running. If the deletion targets change after confirmation, re-check the targets. Deleting stored files is retried in the background.
A deleted registration is not restored by normal GitHub sync. Press Re-link under Re-link Deleted Repositories in each list, then authenticate with a GitHub account that has write permission on the target. After authentication, it is re-registered under the original organization or registrant's management using the repository's current name on GitHub. Registrations for which GitHub identity information has already been obtained can be re-linked even after a rename.
Older registrations without GitHub identity information can be re-linked only if the saved name matches the current name. If the target after a rename cannot be identified, re-linking is not performed and the deleted registration remains. In this case, register the current-name repository anew through normal GitHub sync, then re-register it to the organization if needed.
If you lose Exercode management rights during authentication, re-registration is not possible. Organization repository member settings are not restored, so add course authors again from the organization's repository management list. For personally owned repositories, the original registrant returns as a member. Even if you import the course again after re-registration, the deleted submission records and learning progress are not restored.
When a Course Repository Does Not Appear
- Someone else has already added it to Exercode (sync does not make you a member. The post-sync notification shows the number of repositories not displayed because you are not a member. Ask the organization administrator of the organization that registered that course repository, or a service administrator, to add you as a member)
- The repository does not contain
course.yaml(orcourse.yml) - The repository is not included in the GitHub App's installation targets (press
Add from My GitHuband add the repository to the GitHub App's read targets on the GitHub screen. If you are not the owner of the organization, ask an owner to add it) - You do not have write permission (Write or higher) on the repository on GitHub (read-only permission is not enough to add it. The post-sync notification shows the number not added. Ask to be granted write permission on GitHub, or ask someone with write permission to sync)
- The organization uses SAML single sign-on and you have not authenticated single sign-on on GitHub (authenticate, then press
Sync with My GitHub) - The organization uses an IP allow list, and access from Exercode is not allowed on GitHub
- The repository has too many files and GitHub cannot return the file list at once
- A different repository with the same name (such as one from before it was deleted and recreated) is registered in Exercode
If Some repositories could not be synced appears after sync, some repositories could not be retrieved from GitHub or could not be determined. Syncing of other repositories completed. Wait a while and press Sync with My GitHub again; if it still does not appear, check the items above.
Common Failure Causes
- The target repository is no longer visible from the GitHub App
- A course ID or problem ID is duplicated with one already used by another course repository
- There is an inconsistency in course definition references or YAML format
- There are symbolic links pointing outside the repository, into
.git, to directories, or to nonexistent targets (symbolic links pointing to files within the repository are imported as the linked files) - There are files that are too large. The limits are: 20 MB per file in
assets, 200 MB total forassets, 10 MB per problem file, 100 MB per course PDF, and 1 GB for the entire repository (excluding.git). Imports also fail ifassetsexceeds 10,000 files or the entire repository exceeds 100,000 files. Imports also fail if the repository size shown by GitHub (including history) exceeds 2 GB
When an error occurs, the failure details dialog appears on the screen where you started the import. If you closed the screen or want to check later, you can see the failure on the target repository's card.
For errors you can fix in the course content, details are shown along with actions to open on GitHub, open in VSCode, or copy an AI fix prompt. For errors where Exercode cannot access the course repository through the GitHub App, Open GitHub App Settings and Retry are shown. On the GitHub screen, add the repository to the GitHub App's read targets (if you are not the owner of the organization, ask an owner to add it), then press Retry. For errors whose cause cannot be identified, Retry is shown. If retrying does not resolve it, contact your administrator.