This exists though. Cline, Aider, Cursor, etc. all hook into the diagnostics of the IDE and can run arbitrary commands (including compilers) and feed outouts back to the LLM. Take Cline, it has a planning mode that you can plug a reasoning model into and that will outline the best path to implementation. Then you switch to action mode where a (usually) completion model takes over, implements in multiple steps and validated diagnostics (or compilation output) as it implements the plan.