The context of how you access the result will affect whether this solution is better or not, but it might work:
tmux send-keys -t <session:win.pane> '<command>' Enter tmux capture-pane -t <session:win.pane> tmux show-buffer
You should be able to play with the -S and -E capture-pane options, as well as the panel size, to accurately display the output. If you are so prone, you can also use show-panes and a small regular expression to capture the height of the panel, and then just use -S <height - 1> to capture only the last line.
Then it is easy to read this from another program, for example (e.g. in python):
print Popen(['tmux', 'show-buffer'], stdout=PIPE).communicate()[0]
source share