parcadei avatar

Agent Context Isolation

Keeps agent outputs from flooding your main context window by enforcing file-based coordination instead of TaskOutput calls. The core insight is that reading agent transcripts with TaskOutput can dump 70k+ tokens into your conversation, triggering compaction and losing track of the original request. Instead, run agents in background mode and have them write results to files in .claude/cache/agents, then verify completion by checking for those files or running tests directly. The skill includes patterns for chaining agents through file outputs and detecting when background agents get stuck by monitoring system reminders and file growth.

skills.sh installs
514
GitHub stars
3.9K
last updated
Aug 21, 2026

Install

$ npx -y skills add parcadei/continuous-claude-v3 --skill agent-context-isolation --agent claude-code

Installs into .claude/skills of the current project.

Files

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"

Sponsors

Details

Repository
github.com/parcadei/continuous-claude-v3
Category
AI & Agent Building
First seen
Jun 3, 2026

More from parcadei/continuous-claude-v3

All 108
1firebase avatarfirebase-ai-logic-basicsfirebase/skillsfirebase ai logic basics511skills.sh installs
2glittercowboy avatarcreate-agent-skillsglittercowboy/taches-cc-resourcesExpert guidance for creating, writing, building, and refining Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving existing507skills.sh installs
3glitternetwork avatarpinme-llmglitternetwork/pinmeUse this skill when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter w503skills.sh installs
4parcadei avatarbackground-agent-pingsparcadei/continuous-claude-v3Background Agent Pings502skills.sh installs
5parcadei avatarmcp-scriptsparcadei/continuous-claude-v3MCP Script Rules494skills.sh installs
6firebase avatarfirebase-ai-logicfirebase/skillsfirebase ai logic491skills.sh installs