IsaacCapture / logging_config
AGENTS.md438 starsChanged 31 days agoApache-2.0View on GitHub
CRITICAL (non-optional): Before editing this package, complete the mandatory AGENTS.md preflight in ../../../../AGENTS.md (read every applicable AGENTS.md on your paths, not just this file). The cross-tree rules for using loggers are in that file under "Logging"; this file is about changing the machinery itself. isaaccapture/__init__.py imports this package eagerly and then calls install(). Anything at module scope here therefore executes before any caller can guard it, on every platform the tree is built for — including the experimental Windows build,…
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NVIDIA/IsaacTeleopword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- NVIDIA/IsaacTeleop★ 438100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- deps/cloudxr/webxr_client/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/camera_streamer/AGENTS.mdAGENTS.md
- examples/egocap/AGENTS.mdAGENTS.md
- examples/teleop_ros2/AGENTS.mdAGENTS.md
- src/core/AGENTS.mdAGENTS.md
- src/core/codegen/AGENTS.mdAGENTS.md
- src/core/deviceio_base/AGENTS.mdAGENTS.md
- src/core/deviceio_session/AGENTS.mdAGENTS.md
- src/core/deviceio_trackers/AGENTS.mdAGENTS.md
- src/core/live_trackers/AGENTS.mdAGENTS.md
- src/core/log_bridge/AGENTS.mdAGENTS.md
- src/core/replay_trackers/AGENTS.mdAGENTS.md
- src/core/schema/AGENTS.mdAGENTS.md
- src/plugins/sensing/AGENTS.mdAGENTS.md
- src/plugins/sharpa_avatar/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/common/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/full_body/checker/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/full_body/oracle/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/hand/AGENTS.mdAGENTS.md
- src/python/isaaccapture/cts/hand/checker/AGENTS.mdAGENTS.md
- src/viz/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- .cursor/rules/cmake-structure.mdcCursor rule
- cmake-structureSkill
- rebot-orin-setupSkill
- rebot-orin-setupSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
CRITICAL (non-optional): Before editing this package, complete the mandatory AGENTS.md preflight in ../../../../AGENTS.md (read every …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->Agent notes — logging_config (Python half of the logging system)
CRITICAL (non-optional): Before editing this package, complete the mandatory
AGENTS.md preflight in ../../../../AGENTS.md (read
every applicable AGENTS.md on your paths, not just this file). The
cross-tree rules for using loggers are in that file under "Logging"; this
file is about changing the machinery itself.
Module scope runs on every import isaaccapture
isaaccapture/__init__.py imports this package eagerly and then calls
install(). Anything at module scope here therefore executes before any caller
can guard it, on every platform the tree is built for — including the
experimental Windows build, which runs import isaaccapture during pybind11
stub generation.
- Guard every POSIX-only facility at the point of use, not at the call
site.
_POSIXin_core.pyand_HAS_UNIX_SOCKETSin_forwarding.pyexist for this.os.getuid,os.O_NOFOLLOW,socket.AF_UNIXandsocketserver.UnixStreamServerare all absent on Windows. - A
classstatement evaluates its bases at import. CPython definesUnixStreamServerinsideif hasattr(socket, "AF_UNIX"), so a subclass of it must sit inside an equivalent guard — skipping the call is not enough. - An unguarded POSIX call here is a build failure, not a runtime one: stub generation imports the package and fails the Windows job outright.
- Nothing
install()reaches may raise. Whatever it raises is raised byimport isaaccapturein the host application. An unusable log directory costs the handler that needed it and is reported through the handlers already attached; it must never cost the import. - Keep handlers usable through application
atexitcallbacks. Cleanup registered during import can run before a callback the host registered earlier. Empty-file cleanup may close the file handler only when it is also removing that empty file; leave a non-empty handler forlogging.shutdown().
Leader and forwarding children
ISAACCAPTURE_LOG_SOCKET decides which half of _setup.install() a process
takes. The leader owns the real console and file handlers and publishes a
receiver; every process that inherits the variable gets a forwarding handler
and nothing else — no console handler, no file handler, no fallback.
- That design assumes the publisher outlives the processes that inherit the
variable. Any process deliberately spawned to outlive its launcher must
drop
ISAACCAPTURE_LOG_SOCKETfrom the child environment, or it will ship records to a receiver that stops answering the moment the launcher exits and has nothing of its own to fall back on.cloudxr/background.pydoes this;cloudxr/service/_service.py's runtime worker deliberately does not, because it is tied to the service's lifetime. - The C++ half reads the same variable, so dropping it covers both — but only
for a process that has a Python half to do the dropping. A standalone plugin
executable has none, so
socket_sink.cppverifies the address for itself. - Socket forwarding is the only C++ route into this tree. Extensions loaded in the leader loop back through its receiver; child processes inherit the same address. Do not add a separate in-process sink.
socket_path()verifies the address rather than trusting it, and unsets the variable when nothing is listening, so an address left behind by a dead leader cannot hand a process a forwarding handler and no other. That covers startup only — a leader that dies mid-run still takes its children's records with it.
Native fd capture
_native_fd.py handles output that no logger can reach: the CloudXR/Monado
OpenXR runtime and the Manus SDK write formatted lines straight to fd 1/2 and
export no log hook, so the descriptor is the only seam.
- Never redirect fd 1 or fd 2 outside a scope. A library must not alter its
host process's descriptors.
install()opens the capture file and publishes its path; it does notdup2. Rebinding happens only inside_native_fd.scoped(), whichcapture_native_output()exposes and whichTeleopSessionwraps around native construction and teardown.ISAACCAPTURE_NATIVE_CAPTURE=offturns that off entirely; there is no process-wide mode, and adding one back is the specific regression this module was rewritten to remove. - Capture files, never pipes. A pipe blocks writes past its 64 KiB capacity
until a reader drains it, and a drain thread in this process needs the GIL
while the native call doing the writing holds it —
oxr_bindings.cppreleases none, so the two deadlock. A write to a file needs nothing else to run. Do not "simplify" this back to a pipe. The same reasoning rules out a pty. - A process isaaccapture launches is not the host. Its descriptors are ours
to point at the capture file, and that is how out-of-process vendor output is
kept off the terminal without touching the host:
plugin.cppopensISAACCAPTURE_NATIVE_CAPTURE_FILEbetweenfork()andexecvp(), and the Python spawn sites pass_native_fd.capture_fd(). - The published path is part of the contract.
ISAACCAPTURE_NATIVE_CAPTURE_FILEis read by C++ that cannot re-derive the name (it carries a timestamp and the leader's pid). Change the name or the format in both halves at once. - fd 1/2 are left closed if the host left them closed.
_move_above_std()relocates our own descriptors clear of 0/1/2 rather than pinning/dev/nullonto a closed std fd, which would itself be a change to the host's state. Decide that by the interpreter's streams, never byos.dup()succeeding. The kernel hands out the lowest free number, so a descriptor the host started with closed is occupied by an ordinary file of its long before a scope opens — the leader's own log file, often enough._stdio_stream()answers the question that matters, "does this interpreter write through that number".
The package __init__ exports six functions, and that is the whole surface
set_console_level, set_console_logger_name_filter,
set_console_content_filter, set_console_format, set_logger_colors and
set_propagate_to_root. install() is deliberately outside __all__ and must
be called only by the package bootstrap.
Everything else this package defines is reached through its own module —
_core.LINE_FORMAT, _core.TRACE, _native_api.capture_native_output, and so
on — including by code elsewhere in this tree, which is why wss.py,
teleop_session.py and cloudxr/service/_service.py import from ._core and
._native_api rather than from the package. Do not "tidy" those into a package
import: a name in __all__ is an interface this package then has to keep, and
the native-capture helpers in particular read as an invitation to do something
TeleopSession already does for every site in this tree.
Raising one back up is a one-line change if a host application ever turns out to need it. The reverse is not, once anything outside this repository imports it.
Related
- C++ half:
../../../core/log_bridge/AGENTS.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

