AFK Mode for Claude Code

02 February 2026

AFK Mode for Claude Code

I built something that fundamentally changed how I work with Claude Code: an AFK mode.

The idea is simple. I type /afk going to grab groceries, ping me when the tests are done, walk away from my desk, and Claude keeps working. When something important happens, I get a Telegram notification on my phone. If Claude needs input, it asks me via Telegram, waits for my reply, and continues.

This came from a frustration I kept experiencing. I’d start a complex task with Claude, then realize I needed coffee, or had to pick up the kids, or just wanted to stretch my legs. But the agent would hit a decision point, wait for my input, and just sit there. Meanwhile I’m outside, wasting time.

The idea came from Erik de Bruijn from Stekker when I visited him recently. He showed me his setup where agents could notify him via Telegram, and I immediately knew I needed something similar.

So I built a small Telegram bot that runs on my machine, connected it to Claude Code via a custom skill, and now my agents can reach me anywhere.

How it works

The skill has two modes: entering AFK and returning.

When I invoke /afk with a comment, Claude parses what I want to be notified about and keeps working autonomously. It only sends a Telegram message when something actually happens: a milestone, an error, or a question that needs my input.

telegram send "Tests done! 42 passed, 0 failed. Continue with deployment?"

For questions, Claude can wait for my reply:

telegram send -w "Need your input: should I continue with the refactor?"

The -w flag makes it blocking. Claude waits (up to 24 hours by default) until I reply in Telegram. Then it parses my response and continues.

When I’m back at my desk, I just type /afk back and we’re back to normal interactive mode. Claude summarizes what happened while I was away.

The unexpected benefit

What I didn’t anticipate was how much this would change my relationship with waiting. Before, I felt tethered to my desk while agents ran. Now I can actually leave. The psychological freedom is surprisingly significant.

It also made me realize that my agents are more capable than I was giving them credit for. When you remove yourself as the bottleneck, they can actually get a lot done.

The setup

I created a bot via @BotFather and built a simple CLI that Claude can use to send me messages. The skill tells Claude when and how to use it.

What’s next

I’m thinking about adding different notification channels (Slack, Discord, email) and maybe some kind of dashboard where I can see what all my agents are doing across different projects.

But honestly, even in its current simple form, this has become one of my most-used skills. Sometimes the best tools are the ones that let you step away.

Jankees van Woezik profile picture

Hello, I'm Jankees van Woezik

Like this post? Follow me on X (@jankeesvw)