nvidia/nemo-relay · Archived

nemo-relay-instrument-context-isolation

Use this skill when concurrent requests, async tasks, threads, workers, goroutines, or agents need independent NeMo Relay scope stacks and correct ancestry propagation.

First seen Aug 1, 2026

Installation

$ npx skills add nvidia/nemo-relay --skill nemo-relay-instrument-context-isolation

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from nvidia/nemo-relay · top by installs.

npx skills add nvidia/nemo-relay

Browse all from nvidia/nemo-relay

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 134
License LICENSE
Default branch main
Open issues 2
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0
More metadata
author
NVIDIA Corporation and Affiliates

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,667 B
  • docs SUMMARY.md 215 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Use Context Isolation

Use this skill when an application runs concurrent requests, worker pools, async tasks, goroutines, or multiple agents in the same process. Treat scope-stack ownership as part of the request boundary.

Core Rule

Each independent request, agent, or workflow needs its own scope stack. Do not share one mutable stack across unrelated concurrent work unless you want shared ancestry and shared scope-local middleware.

Embedded Scope Model

  • A root scope is always present, and pushed scopes form a parent-child tree

beneath it.

  • Scope hierarchy determines event parentage, lifetime boundaries, and

visibility for scope-local middleware and subscribers.

  • Standard scope types include Agent, Function, Tool, Llm,

Retriever, Embedder, Reranker, Guardrail, Evaluator, Custom, and Unknown.

  • Scope start and end events can carry semantic input and output payloads

when the scope represents a request, task, or meaningful result boundary.

  • Scope-local registrations disappear when the owning scope closes; use them

for behavior that should not outlive a request or agent run.

  • Mark events are useful for retries, checkpoints, interrupts, and important

state transitions that are not full spans.

Per-Language Defaults

  • Python: rely on task-local behavior via getscopestack() and

contextvars, or explicitly propagate when work leaves the current execution context

  • Rust core: use runtime helpers such as createscopestack(),

currentscopestack(), and setthreadscope_stack(...) when an integration needs explicit stack ownership

  • Go: use NewScopeStack() and ScopeStack.Run(...) for goroutine-safe

usage

  • Node.js: create and set a scope stack explicitly for the current execution

path with createScopeStack() and setThreadScopeStack(...)

Common Failures

  • Events from different requests appear under one root UUID
  • Scope-local middleware leaks across requests
  • Worker-thread work runs without the expected active scope
  • Integrations activate NeMo Relay without an explicitly initialized stack
  • Relying on a thread-local stack after crossing async tasks, goroutines, or JS

worker boundaries

Related Skills

  • nemo-relay-instrument-calls
  • nemo-relay-plugin-observability
  • nemo-relay-debug-runtime-integration