In compiled code? Just moving assembly around to move tabs from one part of the screen to another? This seems nonsensical, you'd have to have your magic AI bullshit not only understand the abstractions at play in, say, chromium, i.e. skia and xorg or wayland or whatever, but also be able to surgically affect not the code from skia, but specific instructions that (dynamically) position elements.
This abstraction, compiled away, into machine code that does one thing. Compilers also tend to take all kinds of shortcuts to make programs a lot faster, and therefore changing them might not be as straightforward as you think.
If you think I'm wrong, I'd like to see what "fundamental reasons" you've considered and how you've reasoned that they aren't an issue for this sort of system.