Use this skill when concurrent requests, async tasks, threads, workers, goroutines, or agents need independent NeMo Relay scope stacks and correct ancestry propagation.
SkillScore100Maintained
Automatic
◆AI Engineer pack
Last verified 8/12/2026
What it changes
Passed 22 of 22 test cases with the skill, and 12 of 22 without it.
Without skill55%
With skill100%
Checks it passed that the model alone missed
Specifies the scope type Llm for model inference calls.
Recommends using Mark events for point-in-time state transitions.
Specifies the scope type Embedder for vector embedding generation.
and 7 more in the full report
10 fixed12 passed either way0 still failing0 broke
Pass-rate lift
+45 pp
Tokens
-18%
Agent turns
0%
Response time
-46%
Model gemini-3.6-flashMeasured 8/12/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 10 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 10
Prompt
In Rust integrations with NeMo Relay, which function retrieves the scope stack currently bound to the calling execution context?
What was checked, without and with the skill
Checked
Without skill
With skill
Identifies current_scope_stack as the function for retrieving the active scope stack.
Missed
Passed
case-15 · gemini-3.6-flash · 8/12/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md55 linessingle file
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 get_scope_stack() and
contextvars, or explicitly propagate when work leaves the current execution
context
Rust core: use runtime helpers such as create_scope_stack(),
current_scope_stack(), and set_thread_scope_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(...)