Nice. The proxy-intercept approach is the right architecture. Agent gets a placeholder, the real credential never touches agent memory. Rust is a solid choice for something this sensitive.
The gap that gets teams eventually: this works great on one machine, but breaks at the team boundary. CI pipelines have no localhost. Multiple devs sharing agents need access control and audit trails, not just a local swap. A rogue sub-agent with the placeholder can still do damage if the proxy has no per-agent scoping.
We ran into the same thing building this out for OpenClaw setups. Ended up going vault-backed with group-based access control and HMAC-signed calls per request. Full breakdown on the production version: https://www.apistronghold.com/blog/phantom-token-pattern-pro...
Rust might be a solid choice but most of it is written in Typescript... which is not as solid of a choice.