Skip to content
AI Primer
workflow

Claude Code adds /loop, /teleport, and /batch workflow guidance in Boris Cherny guide

A Boris Cherny guide maps Claude Code mobile sessions, /teleport, /loop, hooks, worktrees, /batch, and custom agents into one workflow set. Use it to turn scattered commands into repeatable patterns for long-running coding sessions across terminal, desktop, and cloud.

6 min read
Claude Code adds /loop, /teleport, and /batch workflow guidance in Boris Cherny guide
Claude Code adds /loop, /teleport, and /batch workflow guidance in Boris Cherny guide

TL;DR

  • Boris Cherny's thread is effectively a compact Claude Code field guide: mobile sessions, cross-device handoff, recurring jobs, hooks, browser testing, worktrees, and custom agents all show up as one workflow stack rather than isolated tricks Cherny thread, Remote control, Scheduled tasks.
  • The cross-device piece is more capable than the tweet makes obvious. Remote Control docs say sessions keep running on your own machine while the Claude app or claude.ai/code connects to that local environment, and Cherny calls out both /teleport and /remote-control for moving between cloud, phone, web, and terminal Teleport and remote control.
  • /loop is the standout workflow primitive in the thread. Cherny uses it to babysit PRs, gather Slack feedback, and prune stale branches, while the scheduled tasks docs place it alongside desktop and cloud schedulers and note that /loop jobs are session-scoped rather than durable Loop examples.
  • Hooks are where Claude Code starts to look like an agent runtime. The hooks reference documents lifecycle events across session start, tool use, permission requests, task creation, and session end, matching Cherny's examples of loading context, logging commands, and rerouting approvals Hooks.
  • The later tips fill in the scaling layer: git worktrees for parallel sessions, /batch for fanning migrations across many agents, --bare to skip config discovery in scripted runs, --add-dir for multi-repo access, and --agent for custom subagents with their own prompts and tool budgets Worktrees, Batch, Bare, Add-dir, Custom agents.

You can browse the remote-control docs, compare cloud, desktop, and /loop scheduling modes, and dig through the full CLI reference for flags like --teleport, --add-dir, and --bare. The interesting part is how neatly the pieces lock together: the phone app fronts a local session, hooks let that session react to lifecycle events, and worktrees plus /batch turn one agent into a small swarm. There is also a quiet product signal here: frontend verification now has both the Chrome extension and Desktop app previews, which is Christmas come early for coding agent nerds.

Mobile sessions and cross-device handoff

Cherny starts with the least obvious bit: Claude Code is not just a terminal experience. He says he regularly codes from the iOS app, and the Remote Control docs confirm that the same feature also works through claude.ai/code and Android.

The handoff model has two separate commands:

  • /teleport or claude --teleport continues a cloud session on your machine.
  • /remote-control connects your phone or web client to a session already running locally.
  • Remote Control keeps execution on your own machine, with local filesystem, MCP servers, tools, and project config still available.
  • Team and Enterprise plans require an admin to enable the feature, according to the docs.

That makes the mobile app less like a companion viewer and more like a remote shell for an existing Claude Code environment.

/loop and scheduled tasks

Cherny's examples are unusually concrete, which is helpful because they show what recurring prompts look like in real use instead of demo syntax.

  • /loop 5m /babysit for code review, rebases, and shepherding PRs.
  • /loop 30m /slack-feedback to post PRs for feedback.
  • /loop /post-merge-sweeper to clean up missed review comments.
  • /loop 1h /pr-pruner to close stale PRs.

The scheduled tasks docs add the missing product boundary. Claude Code now has three scheduling modes: cloud tasks on Anthropic infrastructure, desktop tasks on your machine, and /loop inside the current session. The docs also note that scheduled tasks require Claude Code v2.1.72 or later, and that /loop jobs disappear when the session exits.

Hooks and the agent lifecycle

This is the most revealing section of the guide because it exposes how many lifecycle seams Claude Code now surfaces.

The hooks reference describes hooks as shell commands, HTTP endpoints, or LLM prompts that fire at specific events. Cherny's tweet maps those events to real workflows:

  • SessionStart: load dynamic context every time a session begins.
  • PreToolUse: log every bash command before it runs.
  • PermissionRequest: route approval prompts to WhatsApp.
  • Stop: nudge Claude to keep going when it stalls.

The docs go wider than the tweet. They also cover prompt submission, post-tool hooks, notifications, subagent management, task creation and completion, file changes, directory changes, and session termination. That is enough surface area for people to treat Claude Code as a programmable control loop, not just a chat wrapper around a repo.

Browser verification and desktop preview

Cherny's frontend tip is blunt: Claude needs a way to verify what it built. The Chrome integration docs explain why. With the browser connected, Claude Code can read console errors and DOM state, automate forms, and use your existing login state in Chrome or Edge.

The Desktop docs expose a second verification path. Desktop can start dev servers, show live app previews, review visual diffs, and dispatch sessions from your phone back to a machine that has the full project open. The thread frames Chrome as the more reliable option for web code, while Desktop bundles the whole loop into one GUI.

Worktrees and /batch parallelism

Worktrees are the backbone for the thread's parallel-work story. Cherny says he keeps dozens of Claudes running at once and uses claude -w or the Desktop worktree toggle to isolate them.

/batch sits on top of that foundation. Cherny says it interviews the user first, then fans the job out to as many worktree agents as needed, from dozens up to thousands, for migrations and other parallelizable changesets.

The interesting connection is that worktrees are not presented as a Git nicety. They are the execution substrate for multi-agent throughput inside one repository.

--bare, --add-dir, and custom agents

The last cluster of tips is about controlling startup cost and scope. Cherny says --bare can speed SDK startup by up to 10x because it skips the default scan for local CLAUDE.md files, settings, and MCPs, and he adds that Anthropic plans to flip the default in a future version.

The CLI reference fills in the exact behavior of --add-dir: it grants read and edit access to extra directories, validates that each path exists, and does not discover most .claude/ config from those added folders. That is a precise fit for multi-repo work where one session needs to touch adjacent projects without changing its main root.

The subagents docs extend the final tweet into a broader agent model. Built-in agents include Explore, Plan, and a general-purpose worker, and custom agents live in .claude/agents with their own descriptions, system prompts, tool access, and independent permissions. That makes --agent=<name> more than a prompt preset. It is a way to launch a differently constrained worker with its own context window and delegation rules.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 1 thread
TL;DR1 post
Share on X