I created a program that checked all halting 5-state machines and determined the longest string of contiguous 1s that could be generated by them:
https://github.com/MatterAndy/BB5-contiguous-1s
My original record was a string of 164 1s generated by machines 0RB1LD_1LC1RB_1LD1RE_1LA1LE_---0RC and 1RB1LA_1RC1LE_1RD1RE_0LA1RC_---0LB. Shawn Ligocki noted that this could be improved by adding an explicit halting instruction that wrote an additional 1 like in the machines 0RB1LD_1LC1RB_1LD1RE_1LA1LE_1LZ0RC and 1RB1LA_1RC1LE_1RD1RE_0LA1RC_1RZ0LB, which achieved a record of 165. Since all halting machines were checked, this means that 165 is the maximum length of a string of contiguous 1s that can be generated by any halting 5-state machine.
A(a, b) = $ 1^a <A 11^b $
A(a+3, b) -> A(a, b+2)
A(0, b) -> A(2b, 1)
A(1, b) -> A(0, b+1)
A(2, b) -> $ <Z 1^{2b+3} $
A(3k, 1) -> A(4k+2, 1)
A(3k+1, 1) -> A(4k+4, 1)
A(3k+2, 1) -> $ <Z 1^{4k+5} $
@13: A(3, 1)
Trajectory of "a" values starting from A(3, 1):
3 6 10 16 24 34 48 66 90 122 Halt(165)