Genie, 11, and his soon-to-be 14-year-old brother, Ernie, had not thought they would spend the summer in the country scooping dog poop, but that is what they end up doing. Their parents have driven through the night from their home in Brooklyn to the backwoods of Virginia. They leave the boys with their grandparents for a month, in hopes that they can salvage their crumbling marriage. Genie, always observant and never without questions, hopes they do not wind up getting a divorce.
Due to his dad’s deep-rooted anger toward his father, Genie has not seen his grandparents since he was a baby, although they talk monthly on the phone. He is shocked to learn that his grandpop is blind from glaucoma. Tensions run high in the house until their parents leave.
Genie feels a little lost without the internet, something his grandparents’ house does not have. He keeps a notebook filled with the questions he wants answered when he can get access to Google again. Genie and Ernie explore the woods around their grandparents’ house and meet a girl named Tess. She makes earrings out of old bottle caps and sells them at the flea market. Her mother is a hypochondriac and seldom leaves the house. Her father, Crab, is an old friend of their grandpop’s.
The next day Grandma puts Genie and Ernie to work around the house. The city boys learn how to tend her garden of sweet peas. They meet Samantha, the dog, and must scoop up her poop and fling it out into the woods surrounding the house.
On their first evening without their parents, Genie accidently breaks a wheel off of a treasured model truck that used to belong to Wood, his uncle who had been killed serving in the military. Grandma puts on a brave face, but Genie knows she is deeply hurt. He vows to find some way to repair the truck. As a storm rages outside, Genie cannot sleep. When he goes downstairs to use the bathroom, he discovers Grandpop sitting at the kitchen table. Genie can smell the liquor he has been drinking and is surprised to see him taking apart a revolver and putting it back together. Granpop refuses to let Genie touch the weapon, but he does ask Genie to help him with something else. He wants Genie to take him for a walk the following night so he can get acclimated to the outside again. He makes Genie promise to keep their outings secret.
Crab stops by the following morning to give Grandpop liquor and a bag filled with dead flies. He collected them from his bug catcher and exchanges them for Grandpop allowing him to hunt on his property.
Grandpop shows Genie his inside-out room — a kind of greenhouse with lots of plants and caged birds. Since Grandpop stopped going outside, he brought the outside inside. He feeds the flies to the birds.
When Crab comes over after hunting, Genie is surprised to learn that he also gives Grandpop money for the right to hunt. Genie overhears that Grandma does not know about the cash. That night, Genie takes Grandpop outside for the first time in years. He is terrified to learn that the reason Grandpop stopped going outside is because a copperhead snake bit him the last time.
On the weekend, Grandma hauls Ernie, Genie and her sweet peas to the flea market. The boys help her sell her peas. Genie searches for a replacement wheel for the one he broke on his uncle’s model truck, but is unsuccessful. Grandma introduces the boys to a strange man named Binks.
Although Binks is not selling anything today at the market, Grandma says he usually sells what everyone wants, good luck. When they get home, Genie discovers he needs some of that good luck. Grandpop had left him in charge of feeding the swallows in the inside-out room, and one of them died. Genie had run out of flies and fed it an apple seed without knowing the seeds are poisonous to birds.
Scared to tell the truth, he enlists Ernie’s help the following morning to remove the carcass from the cage and hide it in the woods. The boys then set out to find Grandpop’s childhood house in the woods, which Tess told them had birdcages. They hope to find a replacement bird and sneak it back into the inside-out room.
The house is strange, with hundreds of wooden cages around it and birds living inside it. A tree has even grown up in the middle of it. Unable to catch a bird by hand, they set a trap that they can check later.
Back at home, Grandma tells them more about their great-grandfather, a man scarred by the war, who made birdcages as a kind of therapy. Eventually, he drowned himself, and the house was abandoned.
On Ernie’s 14th birthday, Grandpop announces it is time for him to become a man and learn how to shoot a gun. At first, Ernie refuses, but then he accepts because he does not want to appear weak in front of Tess. Grandpop has Genie lead him out to the woods with Crab’s help.
When Ernie tries to shoot Grandpop’s revolver, it kicks back into his mouth, knocking out three teeth. Grandma, a former nurse, puts the teeth into a cup of milk. Genie holds the cup while she drives Ernie to the hospital. Two of the teeth can be reset into the gums, with wires holding them in place until they take root again. The third will have to be fixed by a dentist.
The accident causes a lot of tension in the house. Ernie does not want Tess to see him. Grandpop spends all day in the inside-out room. When the weekend comes, Ernie will not go to the flea market. Genie goes and helps Grandma with her sweet peas. He is surprised, and slightly grossed out to learn that Binks sells human teeth for good luck. He claims that some of them are from famous people.
Grandma says that Binks is a dentist, and she asks if he would take a look at Ernie’s mouth to see what can be done about the broken tooth. Genie buys his brother a tooth, which supposedly came from Bruce Lee, for good luck.
At Tess’ house later that day, Genie finds a button on one of her mother’s clothes that closely resembles the broken truck wheel. Tess lets him cut it off as her mother wants to throw away the shirt. Excited, Genie glues the button on the truck. It is not a perfect match, but very close. That night, Granpop gets very drunk before their nighttime walk. His loud talk wakes up Grandma. She throws away Grandpop’s revolver and insists her husband talk to her. She sends Genie to bed, and he is afraid that they, too, will get a divorce.
The next morning, Genie is surprised when everything is back to normal. Grandpop apologizes to Genie for his behavior and then to Ernie for making him shoot the gun. He also gives Ernie a pair of his special sunglasses, since the blast broke Ernie’s pair. While Grandma takes Ernie to see Binks, Tess and Genie find a swallow in their trap.
Instead of taking it to Grandpop, Genie lets it go. Back at home, Crab arrives with his delivery of flies and liquor, but Grandpop tells him to take the alcohol home. He no longer wants it. When Crab leaves, Grandpop tells Genie about his father who had lived in the house in the woods.
When a friend had stolen one of their employer’s puppies, Grandpop’s father told the man who had done it, afraid that the employer would hurt his family if he did not tell. The employer burned down the friend’s house with his family inside. Only the puppy survived. Grandpop’s father took the puppy home and named it Samantha, and since that time, the family has always had a dog with that name.
Moved by the story, Genie starts to confess to killing Grandpop’s bird, but is interrupted when his parents arrive early to take him and Ernie home to Brooklyn.
At first, Genie’s father argues with Grandpop about how reckless he had been with his sons, just as he had been with him and his brother. After many heated words, the two come to a truce, and for the first time in years, are able to talk civilly to each other. Before leaving for home, Genie confesses to killing the bird, but Grandpop says he already knew about it. He had been waiting for Genie to tell the truth.
Genie reveals that he caught a swallow for him, but could not make himself bring it back to live as a prisoner in a cage. He then asks if Grandpop might let the other birds go free. Although Grandpop does not give a definite answer, he seems to think it may be a good idea.