Nusa Dua, Bali: To the extent that anyone "wins" from a heated, emotional argument between two nations and neighbours, Australia has won the spying row.

Foreign Minister Julie Bishop has negotiated an agreement that concedes nothing to the demands of her Indonesian opposite, Marty Natalegawa.

The signing of the Joint Understanding of a Code of Conduct in Bali on Thursday means Australia can continue to gather whatever intelligence it can from Indonesia using whatever technical method it feels it can get away with.

No one will say this officially, of course, because gloating would be inimical to an already extremely tetchy relationship, but it's true.

Advertisement

Even better from the point of view of the Abbott Government — a happy coincidence from his point of view — is that a nine-month hiatus in good relations between the two countries has allowed Operation Sovereign Borders to push nine asylum seeker vessels back to Indonesia without damaging relations because, well, they were already at rock bottom. This has helped convey the message to the 10,000-plus asylum seekers in Indonesia that "the way is closed".

The words used in this agreement show Australia has not budged an inch from its position on the day the spy scandal broke on November 18 last year. Tony Abbott told parliament that day: "The Australian Government uses all the resources at its disposal, including information, to help our friends and our allies, not to harm them."

Parts of that speech so enraged Indonesian President Susilo Bambang Yudhoyono that he described it as a "betrayal", and took to Twitter that night to excoriate the Prime Minister.

But Abbott's exact words are echoed in the understanding: the parties promise to "not use any of their intelligence, including surveillance capacities or other resources in ways that would harm the interests" of the other.

It says, in effect, "We'll keep spying but we promise not to use it against you".

There are nods to Indonesian sensitivities, of course.

In his early responses to the outbreak of hostilities last November, Natalegawa referred to Australia's actions as breaching United Nations conventions, so the Joint Understanding has a clause referring to the United Nations Universal Declaration of Human Rights. This no doubt refers to Article 12: "No one shall be subjected to arbitrary interference with his privacy, family, home or correspondence." (Let's not forget that this stoush came about because Australian mobile phone tapping in 2009 invaded the personal privacy of the President and his wife under the Defence Signals Directorate slogan: "Reveal their secrets - Protect our own".)

But a vague reference to a pre-existing UN treaty that's already breached universally will not slow Australia down. Its mission in Jakarta, as Fairfax Media has painstakingly revealed, is bristling with surveillance equipment.

As for Natalegawa's more explicit demand, expressed as recently as June 4 that "both governments should not phone tap each other", nothing of the kind is reflected in the document.

This still allows both sides to collect intelligence, it only seeks to regulate a notoriously murky world and try to regulate its use by avoiding "harm".

The added cooperation on intelligence matters that's included is welcome, although cooperation was already an explicit clause in the 2006 Lombok Treaty. It may have the effect of improving personal ties between spies, and motivating suspicious agencies in both countries to be more helpful to one another.

But any obligation of cooperation and disclosure between Australian and Indonesian intelligence agencies under this new agreement will fall far short of the "best mates" agreement between the "five eyes" club of Australia, the United States, Britain, New Zealand and Canada. It was under the auspice of this club that the original tapping of Yudhoyono's phone was performed.

Let's be clear: the tapping itself and the fact the then-DSD boasted about it in a Powerpoint presentation were ham-fisted. Abbott's parliamentary response was likewise clumsy, and almost purpose-built to antagonise a president who, it's well known, is highly sensitive and protective of his family.

It's taken nine months to negotiate this two-point addendum to the Lombok Treaty because Yudhoyono's insult was so great, prompting an extreme political stance from his foreign minister. It took nine months for Indonesia to walk back from that position.

But walk back it has, to exactly the position Australia occupied.

Yudhoyono is leaving the presidency in October and, as his comments at the signing make clear, he was personally motivated to avoid having the issue hanging around and tainting his legacy as an international statesman. It was he who imposed an August deadline on negotiations, his feelings of betrayal soothed, no doubt, by Abbott's florid flattery at their June bilateral meeting on Batam Island.

Julie Bishop, her embassy in Jakarta and Australia's intelligence agencies will be delighted with this outcome. Let's hope they don't let it go to their heads.