```python
def run_till_session(events: list, prices: dict) -> dict:
    if not all(isinstance(price, int) and price > 0 for item, price in prices.items()):
        raise ValueError("All prices must be positive integers")

    state = {
        "items": {},
        "total": 0,
        "paid": 0,
        "change": 0,
        "status": "open"
    }

    for event in events:
        if not isinstance(event, list) or len(event) < 2:
            raise ValueError("Each event must be a list with at least two elements")

        action = event[0]
        payload = event[1:]

        if action == "scan":
            if state["status"] != "open":
                raise ValueError("Scan is only allowed during an open session")
            item = payload[0]
            if item not in prices:
                raise ValueError(f"Item {item} is not in the price list")
            if item not in state["items"]:
                state["items"][item] = 1
            else:
                state["items"][item] += 1

        elif action == "void":
            if state["status"] != "open":
                raise ValueError("Void is only allowed during an open session")
            item = payload[0]
            if item not in state["items"]:
                raise ValueError(f"Item {item} is not in the cart")
            else:
                if state["items"][item] == 1:
                    del state["items"][item]
                else:
                    state["items"][item] -= 1

        elif action == "close":
            if state["status"] != "open":
                raise ValueError("Close is only allowed during an open session")
            if not state["items"]:
                raise ValueError("Cannot close an empty cart")
            state["total"] = sum(prices[item] * quantity for item, quantity in state["items"].items())
            state["status"] = "payment"

        elif action == "pay":
            if state["status"] != "payment":
                raise ValueError("Pay is only allowed during payment")
            cents = payload[0]
            if not isinstance(cents, int) or cents <= 0:
                raise ValueError("Payment amount must be a positive integer")
            state["paid"] += cents
            if state["paid"] >= state["total"]:
                state["change"] = state["paid"] - state["total"]
                state["status"] = "closed"

        elif action == "cancel":
            if state["status"] in ["payment", "closed"]:
                raise ValueError("Cancel is only allowed during an open session")
            state["status"] = "cancelled"
            state["items"].clear()

        else:
            raise ValueError(f"Unknown action: {action}")

    return {
        "items": sorted([[item, quantity] for item, quantity in state["items"].items()]),
        "total": state["total"],
        "paid": state["paid"],
        "change": state["change"]
    }
```