# Trellis: Bringing Compiler-Guided Repair into Agentic Code Generation

DevFeed: [Trellis: Bringing Compiler-Guided Repair into Agentic Code Generation](<https://devfeed.tech/articles/trellis-bringing-compiler-guided-repair-into-agentic-code-generation-113466.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2605.15238>)

Author: Alexander Du, Jianjun Ou, Danyang Zhuo, Matthew Lentz

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [agentic-coding](<https://devfeed.tech/topics/agentic-coding.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>)

Tags: [agentic](<https://devfeed.tech/tags/agentic.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [costs](<https://devfeed.tech/tags/costs.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-pl](<https://devfeed.tech/tags/cs-pl.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [incremental](<https://devfeed.tech/tags/incremental.md>), [opencode](<https://devfeed.tech/tags/opencode.md>), [repair](<https://devfeed.tech/tags/repair.md>), [tasks](<https://devfeed.tech/tags/tasks.md>), [test](<https://devfeed.tech/tags/test.md>), [token-consumption](<https://devfeed.tech/tags/token-consumption.md>), [trellis](<https://devfeed.tech/tags/trellis.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

Trellis uses incremental compiler feedback to repair coding-agent output, based on the observation that many compile errors are small and local to recent edits. It applies rollback-based search for targeted repairs, with asynchronous checking and checkpointing to control execution costs. The authors adapted Clang and tsc to its checker interface and integrated it into OpenCode. On C/C++ and TypeScript software engineering tasks, Trellis improved compilation rates by up to 13% and test pass rates by up to 11%, with token consumption comparable to baseline OpenCode.

## Source excerpt

arXiv:2605.15238v2 Announce Type: replace Abstract: Coding agents regularly generate programs that do not compile and require substantial tokens to repair. Yet most repairs are small and local to the edit that caused them. We present Trellis, a system that integrates incremental compiler feedback into code generation to improve code correctness while controlling repair costs. Trellis uses rollback-based search for targeted repair and asynchronous checking and checkpointing for efficient execution. We adapt Clang and tsc to Trellis's checker interface and integrate Trellis transparently into OpenCode. On C/C++ and TypeScript software engineering tasks, Trellis improves compilation rate by up to 13% and test pass rate by up to 11% with comparable token consumption to baseline OpenCode.