Skip to content
Development
Skill

/agent-context-isolation

Agent Context Isolation

From plugin
vibecosystem
541200 skills138 agents7 hooks

Claude Code

$ npx -y skills add vibeeval/vibecosystem --skill agent-context-isolation --agent claude-code

SKILL.md

agent-context-isolation.SKILL.md
name: agent-context-isolation
description: Agent Context Isolation
user-invocable: false

Agent Context Isolation

Prevent agent output from polluting the main context window.

Rules

1. Use Background Agents with File-Based Coordination

# RIGHT - background agent writes to file, main reads file
Task(subagent_type="...", run_in_background=true, prompt="... Output to: /path/to/file.md")

# WRONG - foreground agent dumps full transcript into main context
Task(subagent_type="...", run_in_background=false)

Background agents with `run_in_background=true` isolate their context. Have them write results to files in `.claude/cache/agents/<agent-type>/`.

2. Never Use TaskOutput to Retrieve Results

# WRONG - dumps entire transcript (70k+ tokens) into context
TaskOutput(task_id="<id>")
TaskOutput(task_id="<id>", block=true)

# RIGHT - check expected output files
Bash("ls -la .claude/cache/agents/<agent-type>/")
Bash("bun test")  # verify with tests

TaskOutput returns the full agent transcript. Always use file-based coordination instead.

3. Monitor Agent Progress via System Reminders

# System reminders come automatically:
# "Agent a42a16e progress: 6 new tools used, 88914 new tokens"

# To detect completion:
# - Watch for progress reminders to stop arriving
# - Poll for expected output files: find .claude/cache/agents -name "*.md" -mmin -5
# - Check task output file size growth: wc -c /tmp/claude/.../tasks/<id>.output

**Stuck agent detection:** 1. Progress reminders stop arriving 2. Task output file size stops growing 3. Expected output file not created after reasonable time

4. Verify with Tests, Not Output

After agent work: 1. Run the test suite directly: `bun test` 2. Report pass/fail counts 3. Only investigate failures if tests fail

5. File-Based Agent Pipeline Pattern

Research agent → .claude/cache/agents/oracle/output.md
                          ↓
Plan agent → .claude/cache/agents/plan-agent/output.md (reads research)
                          ↓
Validate agent → .claude/cache/agents/validate-agent/output.md (reads plan)
                          ↓
Implement agent → src/module.ts (reads validated plan)

Each agent reads the previous agent's file output, not TaskOutput.

Why This Matters

Agent context isolation preserves the main conversation's context budget. Reading agent outputs via TaskOutput floods context, causing:

  • Mid-conversation compaction
  • Lost context about user's original request
  • Repeated explanations needed

Source

  • Session where TaskOutput flooded 70k+ tokens into main context
  • Session 2026-01-01: Successfully used background agents with file-based coordination for SDK Phase 3
Read more
@vibeeval
Ships withvibecosystem

Your AI software team. Built on Claude Code. vibecosystem turns Claude Code into a full AI software team — 138 specialized agents that plan, build, review, test, and learn from every mistake. No configuration needed — just install and code.

541200 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
541
Star history of vibeeval/vibecosystem on GitHub, a chart by star-history.com

Other skills on vibecosystem.

achievements

achievements

Steam-style achievement system with XP, levels, streaks, and skill trees. Gamifies the development workflow. 25 achievements…

agent-benchmark

agent-benchmark

Framework for measuring and tracking agent response quality over time. Detects regressions before they reach production. Use when…

agent-linter

agent-linter

Agent ve skill dosyalarinin yapisal dogrulamasi. Frontmatter kontrol, naming convention, zorunlu bolum kontrolu, tutarlilik…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react3d252k
@facebook@facebookInstall Skill

Questions about agent-context-isolation.

Which coding agents can use agent-context-isolation?
agent-context-isolation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.