Bokeh serve not modifying the arguments passed to

According to this page when using

bokeh serve --args foo

Only content after --args (foo in this case) is passed down to your program. However, if my application has a directory format, then if I access sys.argv in, then the full command shows up. I think I can work around it with some effort, but it is annoying. Is this expected behavior?

The args are only available in the app code, i.e. for a directory style app. The app hooks are separate.