subagent-isolation-guard_skill

This skill ensures subagent isolation by enforcing per-agent workspaces and semantic routing bypass to prevent context contamination.
  • Python

2.6k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill subagent-isolation-guard

  • _meta.json304 B
  • SKILL.md1.3 KB

Overview

This skill enforces physical workspace isolation for subagents and implements a semantic routing bypass to prevent routing logic from interfering with subagent sessions. It eliminates cross-agent context contamination and stops unintended model switching or session resets caused by parent-agent semantic routing.

How this skill works

The skill requires each subagent to use a dedicated agent directory so file I/O and workspaces never overlap. It also detects subagent sessions using a session_key marker (for example ":subagent:") and automatically bypasses semantic routing; when detected, the system returns a continue signal and avoids injecting declarations or applying model recommendations.

When to use it

  • Deploying multiple subagents that each need their own filesystem workspace
  • Preventing context bleed between independent agent instances
  • Avoiding semantic-router logic from forcing model switches in child agents
  • Running environments where subagents may be invoked recursively or by other agents
  • Guaranteeing stable long-running subagent sessions without unexpected resets

Best practices

  • Assign each subagent a unique, non-overlapping agentDir path
  • Include a clear session identifier (e.g. ":subagent:") in every subagent session ID
  • Maintain an explicit allowAgents list to control which subagents can be invoked
  • Implement routing bypass early in the webhook or routing pipeline to avoid side effects
  • Log bypass decisions and workspace assignments for auditing and debugging

Example use cases

  • A parent agent dispatches specialized subagents (PM, architect) that must keep separate file workspaces to avoid write conflicts
  • A webhook-based semantic router should skip policy enforcement for internal subagent sessions to prevent model changes
  • Batch-processing pipelines where isolated subagents maintain persistent local caches without interference
  • Testing scenarios where repeated subagent restarts must not clear their isolated context

FAQ

It looks for a predefined marker in the session ID (for example ":subagent:"). When present, routing bypass logic is triggered.

What happens when routing bypass is applied?

The router returns a continue signal and does not inject declarations or apply model-suggestion actions, preserving the subagent's context and model state.

How do I avoid workspace collisions?

Give each subagent a unique agentDir path and enforce non-overlap in configuration. Keep an allowAgents list to restrict which agents can be created.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational