[FEATURE] Pause a running turn and resume where it stopped (/pause)

Status Open
Reported on v2.1.280
Maintainer reply None cached
Activity 0 comments · opened Sep 23, 2026

Summary

Add a built-in pause for a running turn: freeze Claude at its next safe point, let me edit files by hand, then resume exactly where it stopped. Nothing gets cancelled or thrown away.

This was requested before in #28289. That issue was closed automatically for inactivity and is now locked, so I'm opening a new one as its closing note asked.

Why Esc isn't enough

Esc interrupts the turn. The tool call that was running gets cancelled, and I have to re-prompt to get going again. What I want is different: stop starting new work, leave everything else as it is, and continue on my signal.

A common case: Claude is partway through a multi-step change, and I notice something I want to fix myself before it builds on top of it. Today I can either interrupt it (and lose the in-progress step) or let it keep going.

Proposed behavior

  • A keybinding, plus a /pause command that runs immediately even while a turn is active. Today, slash commands typed mid-turn are held until the turn ends, so a user-defined /pause can't work.
  • On pause, anything already in flight (a streaming model response, a running tool) finishes. No new model call or tool call starts.
  • The pause applies to subagents in the same session too.
  • The same key (or Esc/Enter on a pause screen) resumes. Messages queued during the pause are delivered after resume, as they are today.
  • Optionally, tell the model how long it was paused, so it knows to re-read files before editing them.

Prior art

Oh My Pi (a fork of the pi coding agent) ships this as /pause. The gate lives in pi-agent-core/src/pause.ts: one process-wide switch that the agent loop checks before each model call and before each tool starts. The UI is pi-coding-agent/src/modes/components/pause-screen.ts: a fullscreen "paused" screen with a timer, where Esc, Enter or Space resumes. Their stated use case is "freeze a busy session, hand-edit the repo, resume, then explain the change via a normal steering message."

Current workaround and its limits

I built an approximation with hooks:

  • A PreToolUse and PostToolUse hook (matcher *) waits while a flag file exists. This freezes the main agent and subagents at tool boundaries, and it works.
  • A UserPromptSubmit hook sets the flag when the prompt is exactly pause.
  • The flag is toggled from outside through an editor keyboard shortcut, a small CLI, and a macOS dialog with a Resume button.

What hooks can't do:

  • Make a slash command run mid-turn.
  • Take over the keyboard to resume, because while a hook is waiting nothing typed in the session is delivered.
  • Show a live paused state, because the status line doesn't refresh while a hook blocks.

Those parts need support in Claude Code itself.

Environment

Claude Code 2.1.280, macOS.

View original on GitHub ↗