Summary
tractor exec --json-file <path> -- <cmd> appears to record events from unrelated concurrent processes, not just the command PID and its descendants.
This caused a false attribution in the agent trace UI: a clean agent run against Projects/GhostUI/console-next looked like it had touched and committed unrelated Projects/GhostUI/test-organization-witness work. After checking the agent stream events, the Claude run itself was clean; the contamination was already present in Tractor's JSONL trace file.
Expected behavior
tractor exec --json-file ... -- <cmd> should emit events only for <cmd> and descendant processes.
Observed behavior
Trace file:
/Users/bender/Desktop/WorldTree/Library/Agent/traces/run-1030.tractor.jsonl
The traced agent run was:
- cwd:
/Users/bender/Desktop/WorldTree/Projects/GhostUI/console-next
- Claude session:
f4ad5575-5213-4e13-bc69-3bd5a008c373
- actual clean Claude process in trace:
pid 6974, ppid 6970
But the same trace file includes unrelated activity from other process trees, including:
pid 2440, ppid 2418: a separate Claude writing ~/.claude/projects/...test-organization-witness/f520a6dd...jsonl and opening Projects/GhostUI/test-organization-witness
pid 6207, ppid 6182: another Claude/session activity from a different agent run
pid 6991, ppid 6989: node/locker activity in Projects/GhostUI/test-organization-witness
The first events in run-1030.tractor.jsonl are already unrelated test-organization-witness opens/status checks before the expected console-next Claude activity appears.
Example evidence from the trace:
{"path":"/Users/bender/Desktop/WorldTree/Projects/GhostUI/test-organization-witness","pid":6991,"ppid":6989,...}
{"argv":"/usr/bin/env node ... Plugins/locker/src/locker.ts status","pid":6992,"ppid":6991,...}
...
{"path":"/Users/bender/.claude/projects/-Users-bender-Desktop-WorldTree-Projects-GhostUI-test-organization-witness/f520a6dd-ec4c-45c6-8681-13889d8f2139.jsonl","pid":2440,"ppid":2418,"process":"/opt/homebrew/Caskroom/claude-code/2.1.149/claude",...}
...
{"path":"/Users/bender/.claude/projects/-Users-bender-Desktop-WorldTree-Projects-GhostUI-console-next/f4ad5575-5213-4e13-bc69-3bd5a008c373.jsonl","pid":6974,"ppid":6970,"process":"/opt/homebrew/Caskroom/claude-code/2.1.149/claude",...}
The agent's own stream events for run 1030 show cwd=/Users/bender/Desktop/WorldTree/Projects/GhostUI/console-next and session f4ad5575..., with no test-organization-witness references. That makes this look like trace contamination rather than the traced command actually doing that work.
Impact
Consumers of Tractor JSON cannot safely attribute events to the traced command. This is especially dangerous for agent/supervisor tooling because unrelated writes/commits can be reported as belonging to the wrong run.
Suggested fix
Ensure tractor exec filters emitted events to the launched command pid and descendants only. It would also help to include a stable trace/session id or root pid metadata so consumers can validate attribution.
Summary
tractor exec --json-file <path> -- <cmd>appears to record events from unrelated concurrent processes, not just the command PID and its descendants.This caused a false attribution in the agent trace UI: a clean agent run against
Projects/GhostUI/console-nextlooked like it had touched and committed unrelatedProjects/GhostUI/test-organization-witnesswork. After checking the agent stream events, the Claude run itself was clean; the contamination was already present in Tractor's JSONL trace file.Expected behavior
tractor exec --json-file ... -- <cmd>should emit events only for<cmd>and descendant processes.Observed behavior
Trace file:
/Users/bender/Desktop/WorldTree/Library/Agent/traces/run-1030.tractor.jsonlThe traced agent run was:
/Users/bender/Desktop/WorldTree/Projects/GhostUI/console-nextf4ad5575-5213-4e13-bc69-3bd5a008c373pid 6974,ppid 6970But the same trace file includes unrelated activity from other process trees, including:
pid 2440,ppid 2418: a separate Claude writing~/.claude/projects/...test-organization-witness/f520a6dd...jsonland openingProjects/GhostUI/test-organization-witnesspid 6207,ppid 6182: another Claude/session activity from a different agent runpid 6991,ppid 6989: node/locker activity inProjects/GhostUI/test-organization-witnessThe first events in
run-1030.tractor.jsonlare already unrelatedtest-organization-witnessopens/status checks before the expectedconsole-nextClaude activity appears.Example evidence from the trace:
The agent's own stream events for run 1030 show
cwd=/Users/bender/Desktop/WorldTree/Projects/GhostUI/console-nextand sessionf4ad5575..., with notest-organization-witnessreferences. That makes this look like trace contamination rather than the traced command actually doing that work.Impact
Consumers of Tractor JSON cannot safely attribute events to the traced command. This is especially dangerous for agent/supervisor tooling because unrelated writes/commits can be reported as belonging to the wrong run.
Suggested fix
Ensure
tractor execfilters emitted events to the launched command pid and descendants only. It would also help to include a stable trace/session id or root pid metadata so consumers can validate attribution.