Bitwarden CLI prompting for my master password after logging in successfully

I’ve written a Python script to export my vault using the Bitwarden CLI tool. I managed to use it to log into my account successfully using bw login [email] [password] --code [code] and However, when I try to export the vault, it prompts for the master password twice in the terminal output. I tried using bw export [password] to overcome this but it still asks for the master password. I need this to run in the background periodically and I am unable to find out why this happens. Any help would be appreciated.

I read somewhere that is by design. The export function ask you the password once more, it is a protection to avoid the possibility of a malicious actor taking advantage of open sessions.