Shashank Joshi is a doctoral student at Harvard University's Department of Government and a Research Fellow of the Royal United Services Institute, London. He tweets here.

Indian Prime Minister Manmohan Singh is on a four-day tour to Russia and China, and he arrives in Beijing today. What's on his mind during the seven-and-a-half hour flight between Moscow and Beijing?

Over the last several years, the India-China relationship has looked a little like Groundhog Day. The Chinese side will needle India over a familiar set of contentious issues, leaving the Indian press apoplectic and analysts struggling to understand the timing. Indian ministers will play it down, and retired military officials will appear on television and rail at the spinelessness of their leaders.

The past few months have been no exception to this pattern. The China-India border dispute, especially volatile over the past seven years, flared up seriously in April and May. India discovered that a Chinese patrol had crossed unusually deep into Indian-claimed territory in the Depsang Valley of eastern Ladakh and set up encampments there.

Given that the two sides don’t agree on where the border lies (and unlike the India-Pakistan territorial dispute, the two sides can’t even agree on what they presently control), these ‘incursions’ are common.

But the Depsang incident was widely seen in India as a serious and unprovoked escalation, an effort by China to change the rules of the game. Only a few days ago, India decided to cancel a visa liberalisation agreement with China – one that Singh would have signed this week – after China issued irregular (stapled) visas to two Indian athletes from Arunachal Pradesh, a state China claims in its entirety. This is nothing new: the visa issue has been a recurrent irritant for several years now, and China’s claims over Arunachal Pradesh have been especially vigorous since 2006.

All this produces an interesting dilemma for Delhi.

On the one hand, as the Indian Express notes, ‘Indian officials have for a while been concerned that China tends to highlight territorial disputes in unpredictable ways just before high-level visits’. The implication is that these are not-so-subtle reminders to India that China can choose to raise or lower the temperature of the border at will, and that India therefore ought to make concessions if it wants a quiet life. Other Indian analysts, like Srinath Raghavan, warn that this is to read far too much into innocuous Chinese behavior, and that the two nations’ common interests in places like Afghanistan are consequently being underplayed.

Singh’s visit this week underscores the fact that the government is charting a middle course. It continues to increase its military capabilities against China at a ferocious pace, adding high-attitude airbases (the latest, Nyoma, is near the site of the April incursion), US-supplied transport aircraft and ultra-light artillery, and a long-delayed mountain strike corps.

Notwithstanding criticism from some who wanted to see greater investments in sea power rather than land, India’s long-term aim is to narrow the widening power differential with China and consequently speak to Beijing from a position of strength. Whereas China wants curbs on the number of forces within 20 kilometers of the border – something that would favour its military position, given its better transport links and ability to ramp up troop levels quickly – India resists any such constraints.

Despite the tension, things look quite different for Manmohan Singh in the short term. The Government’s priority is to keep the border quiet. National elections are looming next year, and the disputed border with Pakistan is at its most violent in a decade. The opposition parties and much of the media demand just the sort of escalation towards China that the Government is desperate to avoid.

India’s main goal in the border dispute has therefore been to get China to agree on delineating the so-called Line of Actual Control (delineating who presently controls what), which would make it easier to work out when an incursion had happened. But, since China has resisted this, the two sides have instead gone for the lowest common denominator: confidence-building measures. As India’s foreign minister put it last month, ‘we have decided not to push the pace’.

During Singh’s visit, the two sides will accordingly consolidate a bunch of old agreements and add a few new items in a ‘border defense cooperation pact’, the most important part of which is an agreement to give each other advance notice of patrols. Far from being ‘dictated’ by China, as the hawkish Indian analyst Brahma Chellaney contends, the pact would make it harder for China to use incursions as a coercive instrument (if that is indeed what it has been doing). This is all tinkering at the edges, but it lets India buy time for its military presence to mature.

Of course, these are far from the only items on the Sino-Indian agenda. Singh is likely to raise what he euphemistically called other ‘areas of concern’, including the future of Afghanistan, where both states have made huge investments; the bilateral trade imbalance, which can only be rectified if more Indian goods flow into China and more Chinese investment into India; and Indian concerns over China’s possible diversion of rivers in Tibet.

The border dispute is a good example of how Delhi seeks to muddle through, neither surrendering to Beijing nor confronting it, instead compartmentalising – even quarantining – stagnant parts of the relationship from the more productive parts.

Photo by Flickr user London Summit.