I am not sure if this is the answer, because I never touched compose internals, but I believe it is using compiler plugin. KSP is running before compilation, so also before compiler plugins. If compose uses KSP, you can use second round of compilation to operate on the generated code.