You can feed errors back in, but on anything of meaningful scale, context windows are going to be the largest bottleneck.
Context window size limits aside, Claude Code seems to atrophy or misinterpret existing context even prior to compactions very frequently. The more tokens within the context windows the shittier and shittier it performs—not that it's great to begin with.