A tenant has whatever rights a tenant would have under the laws of the state and city plus the terms of the agreement, whether or not the lease is written as opposed to oral. You say that the landlord agrees to the plan, so the arrangement is legal. From the perspective of landlord-tenant laws, the sub-tenant would be considered to be the "tenant" and the tenant (on the lease) is the "landlord".
A landlord cannot arbitrarily raise the rent or terminate the agreement without legal justification and proper legal procedure (eviction). The tenant cannot arbitrarily terminate the agreement or withhold payment except as provided by law. If the (sub-)tenant arbitrarily packs up and leaves, the "landlord" in that relation, i.e. the sole tenant of the signed lease agreement with the property owner, is liable for the full rent, as he always has been, so he would have to sue the sub-tenant to collect the money. If the two parties had both been on the written lease as co-tenants, the property owner could go after both parties.
Sub-tenant liability comes down to whether there is a legal ground for terminating the subtenancy, i.e. the content of "or if there is another issue". Let's say that the "issue" is that you don't like the smell of the other guy's dinner – that's not a sufficient legal basis for terminating the lease. Now let's suppose that the unit is unsafe / unsanitary (and it wasn't you that made it that way), that is a violation of N.Y. Real Prop. Law § 235-b, so you have a legal remedy. Per §227, you can surrender the premise and you will not be liable. But this does not apply to cases like leaking windows or lack of hot water, this is appropriate for life-threatening conditions.
Otherwise, if the other person beats you up, invades your privacy or harasses you, or there is a serious but not life-threatening situation, you deal with this as a "constructive eviction", which is illegal. There is a procedure to be followed, following this law. You have to
notify the landlord of the issue, give them time to fix it, if that doesn't work inform the housing authority of the issue (they then notify the landlord), then you leave the unit, deposit a month’s rent with the housing court, then wait for something to happen. It is complicated, which is why people hire lawyers to deal with the issue – just walking away is not the correct option.
This blurb describes the procedure for tenant remedies in case of landlord harassment (go to court, fill out forms, schedule a hearing). Apart from a court order to cease harassment, the landlord can be assessed a penalty from $1,000 to $10,000.