AI coding agent admin guide·verified October 21, 2026

find which ai coding agents are installed on company laptops

Inventory Claude Code, Codex, Cursor, Copilot CLI and Gemini CLI across a Mac fleet with a Jamf extension attribute or an Intune custom attribute. Copy-paste script.

the short answer

Run a detection script through your device management tool that checks each user’s home directory and common install locations for what each agent leaves behind: ~/.claude, ~/.codex, /Applications/Cursor.app, ~/.copilot, the CLIs themselves and their VS Code extensions. Report it as a Jamf extension attribute or an Intune custom attribute for macOS. That gives you an inventory; to see what agents actually did, scan their history with failproofai audit.

Method
File, binary and extension presence per user, reported to MDM
Jamf
Computer extension attribute returning <result>...</result>
Intune
Custom attribute for macOS (String), re-run every 8 hours
Gives you
Inventory: which agents, which machines, which users
What agents did
failproofai audit scans existing agent histories offline

Start with an Inventory

You cannot write a policy for agents you do not know about. Most security teams that survey developers find more agents than they expected: a Claude Code install here, Codex CLI there, Cursor everywhere, and a few people trying Gemini CLI or OpenCode. A detection script turns guesswork into a list.

What Each Agent Leaves Behind

These are heuristics, not guarantees. Directories can remain after uninstall, and binaries can live in non-standard locations. Treat a hit as “this person has used it”, and verify on a sample of machines before relying on the list.

AgentSignals to check (macOS)
Claude Code~/.claude/ directory, ~/.claude.json, a claude binary, the anthropic.claude-code VS Code extension
OpenAI Codex~/.codex/ directory, a codex binary, the openai.chatgpt VS Code extension
Cursor/Applications/Cursor.app, ~/.cursor/
GitHub Copilot~/.copilot/ directory (CLI), a copilot binary, the github.copilot VS Code extensions
Gemini CLI~/.gemini/ directory and a gemini binary; other Google tools such as Antigravity also use ~/.gemini
OpenCode, Gooseopencode, goose binaries

Detection Script

It checks fixed install locations as well as the user’s home, because a login shell started from a management agent reads .zprofile but not .zshrc, where nvm and many npm global paths are set. Labels read <tool>:<signal>, so you can tell a leftover config directory from an installed binary.

For Jamf, add it as a computer extension attribute. For Intune, add it under Devices > macOS > Organize devices > Custom attributes for macOS with data type String, and remove the <result> wrapper so it echoes only the list; Intune runs custom attribute scripts every 8 hours and shows the echoed value in the Result column. Output must stay under 20 KB.

#!/bin/bash
# Reports AI coding agents found for the logged-in user.
# Jamf: computer extension attribute. Intune: custom attribute for macOS (drop the <result> wrapper).
user=$(stat -f%Su /dev/console)
case "$user" in
  ""|root|_mbsetupuser|loginwindow) echo "<result>no-user</result>"; exit 0 ;;
esac
home=$(dscl . -read "/Users/$user" NFSHomeDirectory | sed 's/^NFSHomeDirectory: //')
found=()
add() { found+=("$1"); }

# Config left in the home directory
{ [ -e "$home/.claude" ] || [ -e "$home/.claude.json" ]; } && add "claude:config"
[ -e "$home/.codex" ] && add "codex:config"
[ -e "$home/.cursor" ] && add "cursor:config"
[ -e "$home/.copilot" ] && add "copilot:config"
[ -e "$home/.gemini" ] && add "gemini-or-antigravity:config"
[ -d /Applications/Cursor.app ] && add "cursor:app"

# Binaries in common install locations (a login shell misses PATH set in .zshrc)
bindirs=("$home/.local/bin" "$home/.npm-global/bin" "$home/.bun/bin" /opt/homebrew/bin /usr/local/bin)
for d in "$home"/.nvm/versions/node/*/bin; do [ -d "$d" ] && bindirs+=("$d"); done
for b in claude codex copilot gemini opencode goose; do
  for d in "${bindirs[@]}"; do
    if [ -x "$d/$b" ]; then add "$b:binary"; break; fi
  done
done

# VS Code extensions
ext="$home/.vscode/extensions"
ls "$ext" 2>/dev/null | grep -q '^anthropic\.claude-code' && add "claude:vscode"
ls "$ext" 2>/dev/null | grep -q '^openai\.chatgpt' && add "codex:vscode"
ls "$ext" 2>/dev/null | grep -q '^github\.copilot' && add "copilot:vscode"

result=$(printf '%s\n' "${found[@]}" | grep -v '^$' | sort -u | paste -sd, -)
echo "<result>${result:-none}</result>"

From Installed to Actually Used

Presence is not activity. failproofai audit scans the agent histories already on a machine (Claude Code, Codex, Copilot CLI, Cursor, OpenCode, Pi, Hermes, OpenClaw, Factory, Devin, Antigravity and Goose), replays the tool activity through Failproof’s built-in policies and opens a local report at localhost:8020/audit, with no account or network connection. failproofai audit --schedule 7 --email security@example.com repeats it weekly and emails the findings; that first setup signs you in when needed.

From Inventory to Control

  1. Group machines by which agents they run. That is your coverage target.
  2. Decide which agents are sanctioned. Unsanctioned ones get removed or replaced; see personal AI accounts at work.
  3. Install the policy client on every machine that has a supported agent. failproofai config detects installed agent CLIs and hooks each supported one; Gemini CLI is not among Failproof’s twelve supported harnesses, so govern it through its own system settings.
  4. Watch coverage centrally under Admin → enforcement, and re-run the inventory on a schedule to catch new installs.

FAQ

Can I block installs instead?

Device management can restrict apps, and some teams do. CLIs installed through npm or Homebrew into a user’s home are harder to block, which is why most teams inventory, sanction and then enforce behavior.

Does Failproof do the inventory for me?

Once installed, Failproof hooks the supported agent CLIs it finds and reports sessions by agent, so connected machines show which agents are actually being used. The MDM script still finds agents on machines that are not enrolled yet.

How often should the script run?

Intune custom attributes run every 8 hours; for Jamf, extension attributes update with inventory. New agents appear quickly, so daily is a good minimum.

Sources

Checked against the sources below on October 21, 2026. Harness settings, hook capabilities and cloud features change between versions.

  1. Jamf Pro documentation: Computer extension attributes
  2. Microsoft Learn: Custom attributes for macOS in Intune
  3. Microsoft Learn: Use shell scripts on macOS devices in Intune
  4. Failproof AI docs: Audit local agent history
  5. Failproof AI docs: Agent harnesses and enforcement capability
  6. Failproof AI docs: Choose your setup
  7. Cursor forum: Add MDM support for macOS (Jamf, Kandji, Intune)