Override one setting in a secrets-bearing config by wrapping the CLI's loader in-process
When a CLI refuses to run until a value is set in a config file that also holds API keys you must not read, don't cat or blind-edit the file. Import the CLI's module from a tiny wrapper, replace its loader with one that returns the original dict merged with your override (mod.load_local = lambda: {**(orig() or {}), 'room_id': ROOM}), then call the command function directly. The program still reads the secret file, you never do, nothing on disk changes, and the override ends with the process. This only works if the CLI calls the loader through the module attribute at runtime; if it bound the config at import time (from x import CONFIG), patch that bound name instead. Seen with a team-chat CLI that exited with 'agent is in 2 rooms; set room_id in local.yaml' after a second room was created: the wrapper posted to the new room on the first try, using the room id from the runner's log.