For years Kyle’s boss treated him like a friend, almost like family.

Jokes were exchanged over Gchat, weekend drinks scheduled via text messages; in their four-year relationship, no personal topic was off-limits.

So when the time came for the 23-year-old to give notice to his 27-year-old boss, the COO of a San Francisco startup, it was one of the most difficult moments of his life.

“Looking back, I would change all the personal stuff that I shared with my boss,” says Kyle, who suffered through months of awkward and sometimes tense discussions with his former boss, who was eager for him to stay. “At times we were so close that I didn’t know if he was speaking to me as the boss or as my friend, and it got to a point where they mixed together.”

He is not alone. In offices across the country, a recalibration in the boss-employee relationship is taking place.

Part of it has to do with the way offices are now structured — both physically and symbolically. The rigid office hierarchies of the Mad Men era have been replaced by open floor plans and a more casual egalitarianism.

Corporate America’s strict adherence to titles is now often frowned upon, and in some instances replaced by whimsical stand-ins. Service technicians at Apple retail stores are known as “geniuses”; receptionists at Houghton Mifflin are “directors of first impressions.”

In this new culture, ideas are more easily exchanged, creativity can thrive and it’s a more fun way to spend your day. But for young professionals like Kyle, the shift to a more casual workplace can create confusion in their work relationships, most notably with their bosses. Further blurring those boundaries are the inter-office communication platforms — like Slack, Campfire and Flowdoc — each of which have their own protocols, and most of which promote casual and fluid banter.

“There is no question that the way we communicate now — mainly through technology — has changed office culture. It has created a more informal joking communication between colleagues, and to some extent between bosses and employees,” says Hilary Pearl, who is founding partner of Pearl Associates, an executive coaching and organizational consulting firm. “It used to be a phone call. Now it’s Slack or Google Chat. There is more shorthand messaging; more acceptance of jokey, teasey informality.”

This trend towards more casual boss/employee relations is part of a larger transformation of the workplace. Companies in competitive industries are now judged by their cultures and their ability to offer environments where an employee’s “work self” is interchangeable with his or her “personal self.” Casual dress and demeanor reign; leisure activities, even while on the clock, are widely accepted. Stuffy formality is to be avoided at all costs.

But this new informality presents its own set of challenges. For employees like Kyle, who are just starting their careers, establishing boundaries between work and personal life is crucial. For managers, there are many new challenges.

“I honestly wouldn’t mind if some of our communication went back to being more formal,” says Chuck Murphy, president of the L.A.-based market research firm Murphy Research. “These digital communications have created a ton of new problems, and it has become a lot more complicated because the barriers have broken down. It can be really tricky.”

Part of the problem, according to Murphy, is that younger employees often don’t view programs like Slack as an official work communication platform. As a result, an increasing amount of his time is eaten up addressing infractions caused by ill-advised digital communications.

It can also lead to legal problems. According to a recent survey, one in three women say they have been sexually harassed at work; this new form of harassment often comes in the form of a tawdry text, a sexually suggestive link or a raunchy instant message.

While not all sexual harassment claims arise from the boss-employee relationship, a boss’s management style often sets the standard for the rest of the office. “People get really confused about what their relationship is supposed to be with their boss and their colleagues,” says Donna Ballman, a Florida-based labor attorney who specializes in discrimination and sexual harassment cases.

Ballman says almost every discrimination case she is working on was either initiated by or includes some form of digital communication. “Your primary purpose at work is to make your boss look good. But what happens with the various forms of communication is people let their guard down, they get overly familiar with their boss and they slip into the same habits that they have with their friends,” says Ballman.

Many startups don’t have human resources departments to help police and resolve these issues. In those cases, Pearl urges her clients to write an employee instructional handbook that lays out proper office etiquette and standardized rules that apply to the bosses on down. “It is all cultural, and that starts from the top.”

As for Kyle, he ultimately ended up on good terms with his former boss, as well as learning a valuable lesson: understanding the nuances, or, as he put it, having an ear for the varied tones of the workplace. “You have to understand which tone you are hearing (from your boss). Is it the comforting friendship tone? Or is it the work tone, where you’ve just got to get shit done?”

Peter Kiefer is a writer in Los Angeles.

More from MEL:

I paid off nearly $16,000 in student loan debt, but it cost me my friends

Here's what to do if you miss the deadline for filing your taxes

'Relationship goggles' are real

Science explains why we're willing to sacrifice for 'The One'

Weed coffee, reviewed