AI NewsClaude Code 2.1.141

Claude Code 2.1.141: rewind workflow and workload IDs explained

Claude Code 2.1.141 adds rewind (revert a session to a prior checkpoint) and workload IDs (group related work). We cover the model and how to adopt them in real projects.

中澤 圭志

中澤 圭志

@keishi_nakazawa

Sales Claw maintainer

·12 min
Claude Code 2.1.141: rewind workflow and workload IDs explained
This English article is a concise version of the original. For the full Japanese deep-dive, see the Japanese original.

Key Facts

Release

2.1.141 (2026-05-14)

Highlights

rewind + workload IDs

"2.1.141 dropped the day after 2.1.140. What is Rewind's 'Summarize up to here'? When does Workload ID matter?" This article walks through the seven primary changes in Claude Code 2.1.141 (released 2026-05-13, 23:19 UTC), using the official GitHub Releases as primary source.

Claude Code released 2.1.139 (/goal + Agent View) on 2026-05-12, then 2.1.140 (subagent_type improvements) the same day, then 2.1.141 the next night — three releases in 48 hours. 2.1.141 is a mid-size release combining new features and fixes. For long-running AI sales automation, two stand out: Rewind "Summarize up to here" and ANTHROPIC_WORKSPACE_ID.

The seven primary changes:

  1. Rewind menu "Summarize up to here" — compress earlier context while keeping recent turns intact
  2. terminalSequence field in Hook JSON Output — emit desktop notifications, window titles, and bells even without a controlling terminal
  3. ANTHROPIC_WORKSPACE_ID env var — scope the Workload Identity Federation token to a specific Workspace
  4. CLAUDE_CODE_PLUGIN_PREFER_HTTPS — clone GitHub plugins over HTTPS for environments without an SSH key
  5. claude agents --cwd <path> — scope the session list to a specific directory
  6. Expanded /feedback — bundle the last 24 hours / 7 days of sessions
  7. Background agents / spinner / dialog stability — bg keeps the permission mode, spinner turns amber after 10s, Auto-mode dialog explains its trigger, plus 40+ fixes

Primary sources: Claude Code official Changelog, GitHub Releases (v2.1.141), Claude Code Docs. For the prior 2.1.140 subagent_type / /goal hang-fix, see the 2.1.140 article; for the original 2.1.139 features, see the /goal + Agent View deep dive.

1. What 2.1.141 is — a 24-hour follow-up

2.1.141 shipped ~24 hours after 2.1.140. 2.1.139 added /goal + Agent View; 2.1.140 relaxed subagent_type matching; 2.1.141 brings "patches for the pain that shows up after long use."

Two improvement groups stand out for AI sales automation (multi-hour or multi-day autonomous loops via /goal):

  1. Long-running loops — Rewind "Summarize up to here," bg retains permission mode, amber spinner, auto-retirement of empty idle background sessions
  2. EnterpriseANTHROPIC_WORKSPACE_ID, CLAUDE_CODE_PLUGIN_PREFER_HTTPS, Remote Control 401 fix, Haiku model-ID fallback on Bedrock/Vertex
Claude Code 2.1.x release timeline from late April to May 14, 2026. From 2.1.130 (fix) through 2.1.135 (feat) to 5/12 with 2.1.139 (major feat) and 2.1.140 (fix), then 5/13 with 2.1.141 (feat + 40+ fixes). The 48-hour window of three consecutive releases is highlighted.
Figure: Figure 1: Recent two-week release cadence — 2.1.141 is the tail of a 48-hour, three-release sprint

2. The seven primary changes, from the release notes

Excerpts from GitHub Releases v2.1.141, with focus on changes that affect AI sales automation directly.

Rewind "Summarize up to here"

The Rewind menu gains "Summarize up to here." Compresses (summarizes) conversation up to the point you choose, while keeping newer turns intact.

Previously, rewinding discardedeverything after the chosen point. For long-running batches where "the early context doesn't matter, but the last few turns do," the new option offers a finer-grained tool for context management.

terminalSequence in Hook JSON Output

Hook JSON Output gets a terminalSequence field.

For execution modes that lack a controlling terminal (background services, headless CI, daemonized Sales Claw), hooks can now emit OS-level notifications — desktop toasts, window title changes, bells. Long-running batches can actively notify users on completion / error / intervention requests through a standard interface.

ANTHROPIC_WORKSPACE_ID

For Workload Identity Federation users, a new env var.

When your Workload Identity Federation rule covers multiple Workspaces, ANTHROPIC_WORKSPACE_ID lets you state explicitly which Workspace the minted token is scoped to. Essential for enterprise teams that run a single federation rule across dev / staging / prod Workspaces.

CLAUDE_CODE_PLUGIN_PREFER_HTTPS

Controls how GitHub plugins are cloned.

Previously Claude Code cloned GitHub plugins over SSH. Environments without SSH keys (Docker containers, ephemeral CI runners, Electron-bundled Sales Claw) failed at clone. HTTPS makes plugin features work without managing SSH keys.

claude agents --cwd and /feedback

  • claude agents --cwd <path> — scope the session list to a directory. For teams running parallel pipelines across multiple Sales Claw projects on one machine, this keeps the Agent View clean.
  • /feedback — option to bundle the last 24 hours / 7 days of sessions into the feedback bundle. Useful for reporting bugs that span multiple sessions.

Auto-mode dialog + bg permission retention

  • Auto-mode permission dialog now explains that "the permissions.ask rule triggered this dialog" (previously the trigger was opaque).
  • Background agents launched with /bg or ←← now retain the current permission mode instead of reverting to the default.

The latter is especially important when running Sales Claw long-running batches with --bg. Previously, going to background occasionally downgraded permissions unintentionally and the loop got stuck in repeated awaiting_approval.

Representative bug fixes (40+)

  • Fixed Remote Control MCP connector returning 401 across the board on worker session token rotation
  • Fixed background side-query sending unavailable Haiku model IDs on Bedrock / Vertex / Foundry (added fallback)
  • Fixed completed agents in claude agents showing "Working" when a background shell remained
  • Added: spinner turns amber after 10 seconds to reassure users during long thinks
  • Fixed empty idle background sessions hanging with — now auto-retired after 5 minutes
  • Fixed Markdown table regression (introduced in 2.1.136) where wrapped cells fell back to vertical key-value layout

Individually quiet; cumulatively they drive down error / freeze rate after long unattended runs.

3. Why Rewind "Summarize up to here" matters in long-running loops

The context-bloat problem

In Sales Claw Phase A / Phase B, one session may run site analysis → copy generation → pre-send checks across dozens of accounts back-to-back. Worker (main Claude) history accumulates HTML scrapes and analysis notes for each account. Past around 50 accounts, latency for new accounts becomes visible, and autocompact thresholds trigger a mechanical conversation-wide compression.

Autocompact is convenient but lacks control over what to keep and what to drop:

  • Recent per-account analysis notes (which you want to keep) get compressed too
  • Timing is unpredictable — long-running batches change behavior mid-flight
  • Quality of subsequent processing can degrade if expected context was dropped

What "Summarize up to here" does

2.1.141's Rewind "Summarize up to here" provides explicit, selective compression: summarize up to the chosen point, keep everything after it intact. Different from autocompact. Use cases:

  • After 50 accounts, summarize the first 40 and keep the last 10 at full fidelity
  • During an incident investigation: keep the failing-account turns; summarize the normal accounts before them
  • Mid-/goal: deliberately compress to recover late-loop response speed
Concept diagram of Rewind 'Summarize up to here' Before/After (PPT style). BEFORE: autocompact-only — in a 50-account batch context accumulates and a mechanical compression fires at an unpredictable threshold. AFTER: explicit compression — at the 40th company the operator invokes Rewind 'Summarize up to here'; the first 40 are replaced by a summary while the latest 10 remain uncompressed. Compression becomes a tool the operator controls.
Figure: Figure 2: Rewind 'Summarize up to here' — explicit, selective compression that preserves recent turns
項目autocompact (previous)Summarize up to here (2.1.141)
TriggerAuto at threshold (unpredictable)User-specified
ScopeWhole conversation, mechanicalUp to chosen point; later turns preserved
Recent-turn protectionNot guaranteedUncompressed
For Sales ClawBehavior shifts late in long batchesOperator controls compression strategy

4. Workload ID and HTTPS plugin clone — the enterprise value

The value of ANTHROPIC_WORKSPACE_ID

Workload Identity Federation (WIF) lets you mint Anthropic API tokens via AWS / GCP / Azure IAM roles — no static ANTHROPIC_API_KEY in YAML or a secrets manager. Enterprises prefer this.

However, organizations whose federation rules span multiple Workspaces (dev, staging, prod) hit ambiguity: which Workspace does the minted token target?

Architecture diagram of ANTHROPIC_WORKSPACE_ID with Workload Identity Federation (PPT style). Left column: three cloud IAM types (AWS IAM Role / GCP Service Account / Azure Managed Identity). Middle: Anthropic Federation Rule box containing three Workspaces (dev / staging / prod). Right column: ANTHROPIC_WORKSPACE_ID=ws_prod env var → Claude Code 2.1.141 → only the prod Workspace's permissions, budget, models are used. The mechanism makes production-scoping explicit when a federation rule covers multiple Workspaces.
Figure: Figure 3: ANTHROPIC_WORKSPACE_ID makes the Workspace scope explicit — pinning production when a federation rule covers many Workspaces

2.1.141's ANTHROPIC_WORKSPACE_ID resolves this. Set ANTHROPIC_WORKSPACE_ID=ws_xxxin the launch environment to scope Sales Claw to your production Workspace and reliably isolate it from other Workspaces' permissions, budgets, and model configuration.

Plugin clone in environments without SSH keys

Official Claude Code plugins (skills / mcp) come from GitHub repos. Default clone is SSH (git@github.com:...), which fails in these environments:

  • Disposable Docker containers (where no key is allowed)
  • Ephemeral CI runners (GitHub Actions, GitLab CI Runner)
  • Electron-bundled desktop apps (OSS desktop tools like Sales Claw)
  • WSL on Windows where the SSH key lives only on the host

With CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1, Claude Code clones over HTTPS. Combine with GITHUB_TOKEN / GH_TOKEN for token auth, and it works reliably in headless environments.

5. terminalSequence hooks + claude agents --cwd — operational gains

Why headless notifications matter

Sales Claw runs Claude Code inside a managed PTY in a desktop app, which means the Claude Code side sees no controlling terminal. Previously, firing desktop notifications from Hooks (Windows toast, macOS Notification Center, Linux libnotify) was awkward — Sales Claw had to spin up a separate process to relay them.

2.1.141's terminalSequence field in Hook JSON Output writes escape-sequence-equivalent notification metadata; Claude Code fires notifications without a controlling terminal. OS-level "wake the operator up" events (completion / error / intervention) are now standardized for Hook authors.

Note: the Hooks page in the official docs (touched on in the previous day's article) didn't yet have a dedicated terminalSequence section at the time of writing (2026-05-14). The release notes are the primary source.

claude agents --cwd in automation

claude agents --cwd <path> scopes the Agent View to a directory. Teams running parallel projects on one machine (B2B SaaS / manufacturing / IT services) avoid cross-project mixing — the Agent View shows only the project you intended.

# Open project A's Agent View
claude agents --cwd /work/sales-claw/projects/btob-saas

# Open project B's Agent View
claude agents --cwd /work/sales-claw/projects/manufacturing

Also useful in automation scripts that want to roll up only sessions in a specific directory.

6. Impact on Sales Claw and implementation sketch

Sales Claw is OSS designed to lower misfire and policy-violation risk through policy control, pre-send checks, do-not-contact detection, CAPTCHA-on-detect stop, rate limits, audit logging, and automatic stop conditions. Since Claude Code is the CLI backend, Claude Code stability improvements flow directly into Sales Claw stability.

Upgrade procedure (zero side effects)

# 1. Upgrade Claude Code to 2.1.141
npm install -g @anthropic-ai/claude-code@latest

# 2. Confirm
claude --version
# → should show 2.1.141 or newer

# 3. Restart Sales Claw dashboard
#    Click [Start Claude] to relaunch the managed PTY

No Sales Claw code changes needed. See Sales Claw Quick start for setup details.

For enterprise WIF users, set these as well:

# Scope to the production Workspace
export ANTHROPIC_WORKSPACE_ID=ws_prod_xxxxxxxx

# In environments without SSH keys, clone plugins over HTTPS
export CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxx

How it lands for long-running batches

Sales Claw Phase B (copy generation + pre-send checks + submit) increasingly runs as continuous /goal loops. See Workflow overview for context. 2.1.141 hits these points:

  • Rewind "Summarize up to here" — for 50+ account batches, the operator can summarize the early portion intentionally instead of leaving it to autocompact
  • terminalSequence notifications — Sales Claw's managed PTY environment can now emit desktop notifications via Hooks. Long-batch completion / intervention requests become more visible
  • bg permission-mode retention — Sales Claw --bg sessions no longer experience accidental permission downgrade
  • Auto-retire of idle background sessions — long-running Sales Claw setups clear daemon-style zombie sessions

Long-running batches stabilize at 2.1.141. Good time to start.

無料・MIT ライセンス。インストールせずにライブデモも試せます。

7. Risks of autonomous operation and safe-by-design

2.1.141 stabilizes long-running batches, but running AI sales automation unattended for long periodsstill requires multiple guards. Don't claim "safe" — lower risk structurally.

  • Japan's Specified Electronic Mail Act: auto-append sender info (4 requirements) via preferences.complianceFooter: true
  • Terms compliance: auto-skip pages marked "no sales," "recruiting only," "IR only"
  • No CAPTCHA bypass: stop into awaiting_approval and log on detect
  • Rate limiting: suppress repeated sends to the same domain
  • Opt-out: auto-insert "reply to opt out" in copy

Automatic stop conditions to prevent runaway

Rewind "Summarize up to here" makes long-running batches more continuable, which structurally raises the "woke up to 1,000 sends overnight" risk. Termination-condition design responsibility increases.

Risks that remain

  • Missed detection of new CAPTCHA variants
  • "No sales" wording changes require manual updates
  • Industry-specific regulation (BFSI / healthcare / public — confirm separately)
  • Rewind's summary is itself model-generated — no quality guarantee. Important facts could be dropped in the summary; keep Phase B pre-send checks running at the same rigor after compression
  • terminalSequence notifications may not reach the user depending on OS / settings — add an out-of-band channel (email / Slack) for production

8. Pre-production checklist + bottom line

Checks when switching to Claude Code 2.1.141

  • claude --version shows 2.1.141 or newer
  • Sales Claw dashboard restarted the managed PTY via [Start Claude]
  • On long-running batches (50+ companies), Rewind&apos;s &quot;Summarize up to here&quot; works
  • For WIF: ANTHROPIC_WORKSPACE_ID points to the production Workspace
  • In environments without SSH: CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1 + GITHUB_TOKEN are set
  • For terminalSequence hooks, OS notification permissions are granted
  • /goal launches with ANDed termination: volume cap + elapsed cap + turn cap
  • bg session permission mode persists after upgrade
  • Compliance footer enabled (preferences.complianceFooter: true)
  • CAPTCHA-on-detect stop into awaiting_approval is on
  • Audit log (action-log.json) is saved
  • Rate limits set
  • Correction / retraction process is shared with the SDR team

Bottom line — the 48-hour, three-release sprint raises production-readiness

In isolation, 2.1.141 looks like "one new Rewind menu item, two env vars, 40+ bug fixes." Lined up against 2.1.139 (/goal + Agent View), 2.1.140 (subagent_type improvements + /goal hang fix), and 2.1.141 (Rewind / Workload ID / 40+ fixes), you see Anthropic shipping "take autonomous-loop features to production-ready quality" as a deliberate cluster.

For AI sales automation that processes dozens to hundreds of accounts per session daily, you need the flashy feature + the next day's bug fix + the day-after's stabilization patch together before going to production.

Next action: npm install -g @anthropic-ai/claude-code@latest, optionally set ANTHROPIC_WORKSPACE_ID and CLAUDE_CODE_PLUGIN_PREFER_HTTPS, restart the Sales Claw dashboard. Run Rewind on a 50-company sample. See Quick start and Workflow overview for details. Sales Claw itself is free at the download page.

Read this, then try 50 companies.

無料・MIT ライセンス。インストールせずにライブデモも試せます。

この記事の著者

中澤 圭志

中澤 圭志

Sales Claw maintainer

Sales Claw の設計・開発を担当。BtoB 営業自動化と AI 活用の実践者として、現場目線で情報発信中。

Share this article