when setting automatic-rename on, I get command line of current running program in my status bar. It works, at least on linux, by looking in the /proc/[pid]/cmdline
Then, if I run a script which starts with a shebang, I get the name of the interpreter.
For example, if I run getmail, which is a script starting with line #!/usr/bin/python, I get python in the status bar. Getting getmail would be more useful.
May be tmux could look in /proc/[pid]/state to achieve that.
I'll attach a patch proposal, working on linux only (I can't test on other platforms).