Let there be a situation where a force 'F' is acting on one end of an in extensible string which is connected to a box named 'A' resting on a friction less horizontal surface through the other end.
The Force F is transmitted through the string and acts on box 'A'. As a reaction to this box 'A' pulls the string toward itself with force 'F'.
In the FBDs we can see that the string is balanced by the forces but the box is not, so the box starts accelerating towards the right. As the box starts to accelerate, for a very small moment there is slack in the string which makes the tension force 0 for a brief moment.Then the force F being applied on the string is used to make the string taut again and tension forces again begin to accelerate box A.
This keeps repeating itself.
Is this how it works or there something wrong?