Tencent Team Open-Sources LoopForge, Using Five Scheduled Agents to Automatically Maintain Code Repositories
The Tencent team has open-sourced LoopForge, a self-hostable workbench that uses five staggered scheduled Agents to handle research, PR reviews, continuous integration monitoring, test coverage improvements, and architecture cleanup. The workflow leaves merge decisions to humans and stipulates no merging, no closing, no direct pushes to the main branch, and no changes to other people’s branches; architecture-related runs stop once the number of PRs reaches 10. The team says this setup was fine-tuned over several weeks, and one overnight task increased test coverage for a core Go package from 83.3% to 86.0%.
Why read this
SelectedAI score 85
Five types of scheduled tasks demonstrate how coding agents divide repository maintenance responsibilities, while the constraint design can also be applied to similar automated workflows.
Topics
View original posthttps://t.co/EDmmddBHwQ
View original
https://t.co/EDmmddBHwQ
Body · AI translation
Tencent Team Open-Sources LoopForge: Five Scheduled Agents Maintain Their Own Repository, With Irreversible Actions Listed on the First Line of the Prompt and Operations Stopping When the Queue Is Full
A Tencent team quickly began using Coding Agents for nearly every change, but the faster the models wrote code, the more time people spent keeping the repository in order. The team concluded that the models were already capable enough; what was missing was the engineering layer around the code—the rails, gates, and division of responsibilities. So they built this self-hostable workbench and put it to work on their own repository. Humans now make decisions at only two points: what to do and which PRs may be merged. https://t.co/h9ACIJWbDl
Prove It in Conversation First, Then Freeze It into a Workflow and Hand Routine Maintenance to Scheduled Tasks
The work proceeds in three steps: The first step is conversation: exploratory tasks are assigned to the Main Bot in the main interface and tested in a sandbox, without making any commitments yet. The second step is a standard operating procedure: once an approach has been proven to work, it is frozen into a fixed pipeline covering planning, design, coding, deterministic verification with scripts, and independent review, followed by final human approval. The third step is scheduled autonomy: routine maintenance—such as organizing community feedback, reviewing PRs, resolving conflicts, and adding tests—is assigned to background tasks that run on a fixed schedule.
Five staggered scheduled tasks run against the team’s own repository: 1. Every day at 09:00, an Agent conducts research with read-only access to GitHub and may open no more than three requirements tickets, each clearly specifying the module, source-code location, and acceptance criteria. 2. At the top of every hour, an Agent performs a first-round review. Vague LGTM comments are prohibited; approvals must specify which functions and tests were checked, while the merge button always remains under human control. 3. At half past every hour, an Agent inspects continuous integration, touching only branches owned by the automation account, merging in the latest main branch, resolving conflicts, and self-healing in the sandbox. 4. Every day at 02:00, an Agent adds table-driven tests to a core package with relatively low coverage, without modifying production code. One overnight run increased coverage of a core package from 83.3% to 86.0%. 5. Every Monday at 03:00, an Agent checks for layering violations against AGENTS.md and performs structural cleanup limited to no more than 200 lines. As a result, PRs opened overnight have already been reviewed and had their conflicts resolved by morning.
Set the Brakes First, So It Can Run Safely Overnight
Whether these tasks help depends entirely on how the rules are written. The biggest risk when adding tests is that, when a test fails, the Agent may quietly alter business logic to accommodate the assertion. The prompt therefore states explicitly: only add new test files; if a genuine issue is suspected, document it in the PR description and leave it to a human. Each PR from the architecture guard may seem reasonable on its own, but together they can pile up and block subsequent work. Before running, it therefore counts the unmerged architecture-related PRs and stops when the number reaches 10, without even starting the sandbox.
The team’s conclusion is that automation that can be trusted to run overnight must be willing to say, “There’s nothing to do this time.” Irreversible actions are addressed on the first line of the prompt: do not merge, do not close, do not push directly to the main branch, and do not touch colleagues’ branches.
The team also made clear that this setup took several weeks to tune, with most of that time spent writing constraints; expecting it to run smoothly on the first day is unrealistic. The figures come from one of their own Go repositories, but what others can take away are these constraints.
AI Trends