Q:

How can humans avoid killing any insect?

The world is divided in several factions. Among them : Insects and Humans. 
When I say Insects, I don't mean insects : insects are the little creatures with six legs while Insects regroup all social insects, namely all species of ants and termites and the bees and wasps that live in colonies.
Insects have developed a kind of magic (at least, Humans have no better explanation). They are all mentally connected to the Weft. They can :

Communicate telepathically with any other member of the Weft.
When a member of the Weft dies, all its memories are transferred to a random other member of the Weft.
Communicate telepathically with some Humans. To Humans, they seem to have the intelligence of a ten year old.

Humans have no magic abilities. However, their technology is at least as advanced as ours today and will probably be the kind of technology we'll have in two centuries (I haven't decided yet). Moreover, most of them have a scientific background.
There has been a war recently between Humans and Insects. Insects won and had Humans sign a treaty in which one article roughly says : "Each time a Human kills an Insect, Insects will kill a Human. If Insects consider that the number of deaths caused by Humans is too high, Insects will exterminate Humans". 
Since they have underestimated Insects during the last war, my Humans have decided to obey them (for now...) and are trying to find effective ways to avoid killing Insects. How can they do that ?
More precisely :

The first step to avoid killing Insects would be to spot them. Are there ways to easily detect Insects not only on the ground and in the air but also in the ground and in materials such as wood ?
I'd like Humans to have Insect-free shelters. I guess they could build structures (including in the ground) to prevent any insect from entering but how do they get rid of those who are already in the structure without harming them ?
Humans will have to go out of the shelters sooner or later. How can they move without squashing any Insect ?

The cheapest and less time-consuming solutions, the better.

A:

We can't...
In short, without some radical change in human or insect behavior, it kinda sounds like your humans are screwed.
There are roughly 10,000,000,000,000,000,000 insects on planet earth.
Compare this with 7,000,000,000 
That's ten quintillion and seven billion respectively...

The treaty you mention is either:
A) Very poorly conceived and written, 
or 
B) Specifically worded with the future extermination of humanity in mind.
The only places on earth that have no insect life also have no human life (at least not permanently settled).  They are simply uninhabitable and don't forget that human survival needs are far more complicated than those of insects.

Why are humans screwed?
Well, we kill insects all the time.  We drive cars, we walk, we reflexively swat things that land on us...
Insects are going to die...according to your treaty it's a one for one deal so then humans die...and there are waaaay more of them then us...and if we try to live up to the deal in the treaty there will be even more as we won't be spraying pesticides and swatting spiders and flies in our homes...odds are this could even lead to larger disease outbreaks which kill even more humans. 
Eventually, even if the insects don't declare war to exterminate us, we will be gone simply by living.  The human population will dwindle over time to the point where we no longer have a minimum necessary population to survive as a species.
I say we arm up with flamethrowers and deet laced armor and go out in a blaze of fiery glory instead.

A:

Point one, since you've mentioned that the Insects are not just insects but have sentience, you could first include an agreement or something similar between Humans and Insects. Something along the lines of, "Insects are also responsible  for entering high risk zones where the density of humans is high and likewise, Humans have to make sure that they not enter places where the likelihood of killing Insects is higher." This is the legal side.  
On the more practical side of matters, if the above idea is not possible, the first thing that popped into my head was shoes. We DO kill a lot of insects by crushing them underfoot. Maybe you could have a special kind of footwear that is soft or pliant enough to actually not kill any insects? (Sounds far-fetched to me but hey, the premise itself isn't that plausible.)  
Basically, what you first have to think of is what are the different ways in which Insects can be killed by Humans. I mentioned one above.  
Another common way we kill Insects is windshields. Lots and lots of insects die because of speeding vehicles. So, establish speed limits. Or you could ban vehicles entirely. Or go windshield-less?  
Another way is to, you know, NOT use stuff like bug sprays, insecticides etc.  
Most of the suggestions I can think of are on the lines of NOT doing things that kill insects (The stuff we do with the intention of killing them.)  
Another way is for the Humans and Insects to have mutually exclusive zones of work. Kind of like a 'no dogs allowed'sign.  
These are the really cheap, easy-to-do, non-sci-fi solutions though.

A:

It depends on how direct the causality in your treaty is.
Does an Insect count as killed by a Human if they wander into a "roach motel", for instance, or if they're a bee that stings a Human and subsequently dies from their ruptured abdomen when they leave the stinger inside? 
In other words, are there situations in which according to the treaty it's the Insect's Own Damn Fault for getting themselves killed, and thus not requiring reprisal? Your Insects may or may not have thought this through; you do say they've got the approximate intelligence of ten-year-olds.
If not, well, I'd recommend the human race set out to sea (or space); so far as I'm aware the ocean doesn't have much in the way of social insects (or any insects, really, if you go out far enough). Getting out there will take some doing, but maybe the start time on that treaty is negotiable. 
If so, however, Sphoorthy's answer is relevant here - the isolation no longer has to be total, so we can keep our cars/trains/etc. in certain areas so long as we slow down and take precautions. Lawns are out, though - too easy to miss an Insect in the grass.
Either way, though, you're also going to have to address the issue of sociopathic Humans who figure: "Hey, the treaty didn't say anything about which Human gets killed if I kill an Insect; there are X billion humans on Earth, the odds I'm the one they'll pick are only 1 in X billion! Sure, I'll take those odds - repeatedly!"
Blaze-of-glory types will likely have to be educated on the difference between insects and Insects - a typical windshield is much more likely to encounter the former than the latter, especially after we start lining our roads with Insect-legible "do-not-cross" marks (and tunnels underneath every so often). Similarly, "do-not-eat" chemicals (bad-tasting, not poisonous) can be used to convince termites that yes, in fact, the Humans want that support pillar intact and would rather you didn't keep chewing. 

