The reason I accessed a_id directly is that  I had not taken a look at ShellSession class for the accessor. It's really my mistake and I will pay more attention to existing API I can use in future.