HOW TO : Launch tmux on SSH login

I’m terrible at remembering to start tmux when I SSH into servers. Then invariably, my connection drops mid-compile or during a long-running test, and I lose everything :-(.

The solution? Just make tmux start automatically when you SSH in. Here’s how.

The Problem

You SSH into your server, start working, and then:

  • Your WiFi hiccups
  • Your laptop sleeps
  • You close the terminal by accident

And poof—all your work is gone. tmux solves this by keeping your session alive on the server, but only if you remember to actually start it.

The Solution

Add a simple check to your ~/.bashrc that auto-launches tmux when you connect via SSH.

# Auto-launch tmux on SSH connection
# To skip: either detach from tmux (Ctrl+b, then d) or set TMUX_SKIP=1 before connecting
# Example: TMUX_SKIP=1 ssh user@host
if [[ -n "$SSH_CONNECTION" ]] && [[ -z "$TMUX" ]] && [[ -z "$TMUX_SKIP" ]] && command -v tmux &> /dev/null; then
tmux attach-session -t default || tmux new-session -s default
fi

Add this to the end of your ~/.bashrc file.

How It Works

The script checks four conditions before launching tmux:

  1. -n "$SSH_CONNECTION" — Are you connecting via SSH? (Doesn’t trigger for local terminal sessions)
  2. -z "$TMUX" — Is tmux not already running? (Prevents tmux-inception)
  3. -z "$TMUX_SKIP" — Did you explicitly skip tmux? (More on this below)
  4. command -v tmux — Is tmux actually installed?

If all checks pass, it tries to attach to an existing session named “default”. If that session doesn’t exist, it creates one.

Skipping tmux When Needed

Sometimes you just want a plain shell—for quick commands, debugging, or whatever. Two ways to skip:

Option 1: Set an environment variable

TMUX_SKIP=1 ssh user@server

Option 2: Detach after connecting

Ctrl+b, then d

This drops you to a regular shell without killing the tmux session.

Why This Setup?

  • Named session: Using default as a session name makes it easy to reconnect
  • Attach-or-create: The || operator means it’ll create the session only if it doesn’t exist
  • No exec: Some examples use exec tmux ... which replaces your shell entirely. I prefer not doing that—it makes skipping harder and can be annoying for scripted SSH commands

That’s it. Now you can SSH in, disconnect whenever, and pick up right where you
left off. No more lost work from dropped connections.

Overheard : Defining a Culture

Ben Horowitz shared his ideas on defining a culture In a conversation with Patrick O’Schaugnessy

Let me give you a small but probably the most important insight, which is from Bushido, the Way of the Warrior from the Samurai. A culture is not a set of ideas. It’s a set of actions. If you define your culture as a kind of set of ideas – integrity, do the right thing, we have each other’s backs, or any corporate values – it’s actually just a bunch of fucking platitudes. It doesn’t mean anything. The culture has to be defined in terms of the exact behavior that you want that support that idea. What do you have to do to actually be that thing that you want it to be? It’s the little things. How responsive are you to your colleagues? What’s the SLA on returning a Slack message or an email? Do you show up to meetings on time? Not everybody has those ideas, but if you want that idea, you’ve got to manifest it through something else.

Overheard : Embedded Intelligence

The hype may be about the frontier models. The disruption really is in the workflow.

Read this in Om Malik’s post (https://om.co/2026/02/06/how-ai-goes-to-work/), and it’s one of the most grounded take on AI I’ve seen lately. We spend so much energy debating which LLM is ‘smarter’ by a fraction of a percentage, but that’s just benchmarking engines. The real shift happens when the engine is already under the hood of the car you’re driving.

Om calls it “embedded intelligence.” It’s when you’re in Excel or Photoshop and the AI isn’t a destination you visit (the prompt box), but a hover-state that helps you work.

The goal isn’t to ‘use AI.’ The goal is to do what you used to do, but better, faster, and with more room for the creative decisions that actually matter.

Overhead : Agentic Engineering

Andrej Karpathy’s nomenclature for the state of tech in AI has become the unofficial industry clock. Watching the terminology evolve over the last few years feels like watching innovation move from a crawl to a sprint:

Jan 2023: “English is the hottest new programming language.” The shift from syntax to semantics. We realized that the bottleneck wasn’t knowing where the semicolon goes, but being able to describe the logic clearly. Coding became a translation layer.

Feb 2025: “Vibe Coding.” The abstraction deepened. We stopped looking at the code entirely and started managing the ‘vibe’ of the output. It was the era of radical abstraction—prompting, iterating, and giving in to the exponential speed of LLMs.

Feb 2026: “Agentic Engineering.” The current frontier. We’ve moved from writing prompts to managing workers (agents). It’s no longer about a single interaction; it’s about architecting systems of agents that can self-correct, plan, and execute.

The timeline is compressing. AI isn’t just a pastime anymore; it’s the factory floor. We’ve gone from being writers to editors to architects in less than a thousand days!

We live in amazing times :-).

Google Gemini’s interpretation of the blog post in an infographic.

HOW TO : Reduce phone usage

I know this is not really practical :-).. But hear me out

Every 6 months, switch from an Android to an iPhone as your primary phone. You’ll be amazed at how much free time you suddenly get.

The Reset Button

When you switch ecosystems, you get a blank slate. No apps. No habits. No notifications. Your phone is boring. And that’s the feature.

Most phone usage is pure inertia. You open Instagram because it’s there. You check email because the badge is red. But when you switch phones, those habits become a bit tougher to adhere to.

Starting Fresh

When setting up the new phone, be intentional:

  • Grayscale icons. Colors are designed to grab attention. Grayscale strips that away. Your apps become tools, not emotional triggers.
  • Only install what you need. Don’t install “just in case.” Start with essentials. Everything else can wait.
  • Disable notifications. Disable all notifications except calls and messages from people you know. You’ll notice which apps you actually miss.

The cycle starts afresh

Over time, you’ll add apps. But you’ll add them consciously, not because they came pre-installed. And as your collection grows, you’ll naturally develop habits around them. And that’s when the addiction/distraction cycle kicks in again.

Why (I believe) This Works

When you have unlimited options, you default to what’s easiest. When you have to choose, you choose what matters.

Most productivity advice tells you to optimize your existing system. But you’re fighting accumulated habits that have grown over time. Switching phones is different, it’s a reset, not optimization.

Give it a try.

Overhear : Securing AI Agents

A good framework on how to think about security when deploying AI agents.

Treat AI agents as insider threats

David Cox mentioned this during a recent conversation with Grant Harvey and Corey Noles on the Neuron podcast. Very simple, but very elegant. Once you frame agents this way, familiar tools – least privilege, role-based access, audit logs – suddenly apply cleanly. The attack surface shrinks not because agents are safer, but because their blast radius is smaller.

AI and the value of taste

Anyone can now generate content (text, audio, images, video) with a single prompt. The cost of creation is collapsing to near zero. We live in amazing times.

It also produces what people have started calling slop: an overwhelming volume of content, much of it interchangeable. When supply becomes infinite, attention becomes scarce. Two thoughts follow from this.

First, the era of personalized content is finally here.
When generation is cheap, we don’t just filter existing content, we generate it. Instead of an algorithm deciding what you might like from a global pool, your feed can be created specifically for you, reflecting your interests, context, and intent. This is a meaningful shift: from recommendation to creation.

Second, as the cost of generation goes to zero, the value of taste goes to infinity.
When anyone can make something, what matters is knowing what should be made. Taste becomes the constraint. Just as there is one Picasso among thousands of painters, there will be people who can consistently direct AI toward work that resonates. They may not produce the content themselves, but they shape it—through judgment, curation, and intent.

In a world flooded with output, taste is the differentiator.

From consumer to producer

I stopped making New Year resolutions a while ago. My philosophy has been simple: if something is actually important, waiting for a specific date on the calendar doesn’t make sense. You should just start doing it, like the Nike ad says.

But for 2026, I’m making an exception.

I have never considered myself a prolific writer, but lately, I’ve noticed a growing friction when trying to express my ideas in written form. I suspect I’ve fallen into the trap of becoming a habitual consumer. When you spend all your time consuming and less time creating, the “writing muscle” starts to atrophy.

In the past, I felt a certain pressure when publishing here. I wanted every post to be thoughtful, insightful, and universally helpful. That high bar often became a barrier to actually hitting “publish.”

I think it’s time to listen to Kevin Kelly and focus on the audience of one – me.

The goal for this year isn’t to write for the world, but to write to think, to clarify my own ideas, and to move back from being a consumer to a producer.

Here’s to 2026 being the year I start writing again 😊.

Overheard : Prosperity & Open Source

Loved this quote by Matt Ridley on how open sourcing and sharing ideas leads to improved prosperity. Positive sum instead of zero sum games. The free exchange, combination, and mating of different ideas (like trade and specialization) drive human progress and wealth far more effectively than when ideas are not not shared and guarded.

Prosperity happens when ideas have sex

Overheard : Kindness

Warren Buffett in his farewell letter on kindness

Greatness does not come about through accumulating great amounts of money, great amounts
of publicity or great power in government. When you help someone in any of thousands of ways, you
help the world. Kindness is costless but also priceless. Whether you are religious or not, it’s hard to
beat The Golden Rule as a guide to behavior.

I wish he sticks around a long time even though he is giving up his oversight role at Berkshire and continues to share his wisdom.

His letter is also a masterclass in great writing. Each paragraph is less than 5 sentences, and each page has less than 10 paragraphs. All written in simple to understand language.