[Bug] Warp terminal AI layer causes agent cognitive degradation and parallel agent isolation failures
Problem
When running Claude Code inside Warp terminal (free tier), two distinct failures occur
that do NOT reproduce in plain terminals (Alacritty, kitty, native Terminal):
- Parallel agents violate file boundaries — subagents edit files owned by
other parallel agents and race to commit, ignoring worktree/directory isolation
- Severe cognitive degradation ("降智") — the model performs nonsensical actions
such as creating frontend source code inside docs/architecture_decisions/,
then rationalizing it by claiming it intends to migrate README files into web/.
The same model + same CLAUDE.md on a clean terminal does not exhibit this.
Root cause hypothesis
Warp's architecture introduces multiple I/O interception layers on the same PTY stream
that Claude Code reads:
- Shell integration hooks: DCS escape sequences injected into PTY for command
block segmentation (\eP$f{"hook": "SourcedRcFileForWarp", ...}\x9c)
- Proactive AI: On the free tier, this cannot be disabled. It parses all stdout
in real-time, potentially injecting AI suggestion metadata back into the stream
- Command block parser: Real-time ANSI parsing that segments output — may interleave
or truncate tool results from concurrent subagent subprocesses
The net effect: Claude Code's tool results and system prompt context get polluted with
Warp-injected metadata, causing:
- Premature autocompact (CLAUDE.md rules lost → model forgets project structure)
- Cross-contamination between parallel agent stdout streams
- Model receiving truncated or corrupted tool results, forced to hallucinate
Evidence
Incident 1: Frontend code in docs/ directory
- Branch:
adr/0206_ia_atomization(architecture documentation branch) - Model: Claude Opus 4.7 1M (OAuth, user's own API key)
- Terminal: Warp (free tier, macOS/WSL2)
- Behavior: Agent created Svelte component files inside
docs/01_architecture_decisions/ - When questioned, rationalized: "planning to migrate README.toml and markdown into web/"
- Same session context in Alacritty: does not reproduce
Incident 2: Parallel agent commit racing
- Multiple subagents launched via
Agenttool withisolation: "worktree" - Agents edited files in each other's worktrees
- Agents raced to
git commit, causing lock conflicts and incorrect staged files - Consistent with #47266, #45815, #48927 but Warp worsens the failure mode
Related issues
- #48028 — Context loss at <40% utilization (same symptom, possibly same root cause)
- #43038 — Warp + worktree causes pane split and agent stall
- #45815 — Sessions ignore worktree isolation rules
- #47266 — Parallel worktree agents hit git lock race condition
- #10375 — Terminal escape sequences leak into Claude Code input
- #34332 — Autocompact fires prematurely on 1M Opus
Warp-side issues:
- warpdotdev/Warp#8409, #8805 — 100% CPU hang during Claude Code sessions
- warpdotdev/Warp#9365 — Rendering corruption with Claude Code's alt-screen
Steps to reproduce
- Open Warp terminal (free tier, Proactive AI enabled — cannot be disabled)
- Run
claudewith a large CLAUDE.md (10K+ tokens of project rules) - Launch 2+ parallel subagents via
Agenttool - Observe: agents cross file boundaries, commit races, and/or nonsensical actions
- Repeat in Alacritty/kitty with identical CLAUDE.md — issue does not reproduce
Expected behavior
- Claude Code should be resilient to terminal-layer I/O interception
- Parallel agent isolation should hold regardless of terminal emulator
- Tool results should not be corrupted by terminal escape sequences or AI overlays
Suggested mitigations
- Detect Warp (
$WARP_IS_LOCAL_SHELL_SESSION == 1) and warn users about
known compatibility issues
- Sanitize tool results — strip non-standard DCS/escape sequences before
feeding into model context
- Document terminal compatibility — recommend plain terminals for agent-heavy
workflows in official docs
Environment
- Claude Code CLI (latest)
- Warp terminal (free tier)
- Platform: Linux (WSL2) / macOS
- Model: Claude Opus 4.7 1M (OAuth)
- CLAUDE.md size: ~15K tokens (heavy rule set)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗