How attribution works
Yardmaster reads the operating system’s socket tables to see which ports are open. It then works out three things for each one: the project the process belongs to, the framework it runs, and the agent session (if any) that started it. This page explains how, and where the guesses can be wrong. Everything here is read-only: Yardmaster looks at process facts and files, and never changes them.
Which project
Section titled “Which project”The process’s working directory (cwd) is the starting point. Yardmaster walks up from it, at most 8 levels, and stops at the filesystem root or below your home folder.
- Markers. In each folder it looks for a project file:
package.json,Cargo.toml,go.mod,pyproject.toml,requirements.txt,composer.json,Gemfile,mix.exs,pom.xml,build.gradle, or a.csproj. The first folder that has one names the project, using the name declared in the file. When a folder holds several (a Tauri app has both apackage.jsonand aCargo.toml), the running program breaks the tie. - Git. The nearest
.gitgives the branch. A.gitfile that points into aworktrees/folder marks a linked worktree, and the branch comes from that worktree, not the main checkout. A worktree whose git folder is gone is treated as pruned. - Monorepos. The walk continues to find a workspace root (
pnpm-workspace.yaml,workspacesinpackage.json, a Cargo[workspace],go.work, lerna, nx, turbo). Packages are then namedrepo/package, so two packages calledwebdo not collide. - Throwaway folders.
/, your home folder,/tmp,~/Library,/Applicationsand similar never name a project. For those, Yardmaster falls back to the folder of the executable, then to the parent process’s working directory.
The project name is the display name. If you set a label for a port, the label wins.
Which framework
Section titled “Which framework”Yardmaster first looks at the command that is actually running and matches the program name
only (vite, next, manage.py runserver), never a substring of the whole command line. It
also checks the parent’s command, because some servers (next-server) rewrite their own
arguments. If the command says nothing, it reads the dependencies in the project file. The
major version comes from the dependency, or from a version in the process title, and shows as
Next.js 14.
Which agent session
Section titled “Which agent session”Three kinds of evidence are used, in this order:
- A declared owner. If a process has
YARDMASTER_OWNERset, that is taken as the answer. - Environment markers. Agents set variables such as
CLAUDECODE,CODEX_THREAD_ID,CURSOR_AGENTandGEMINI_CLIin the shells they run commands in. Yardmaster merges the markers of the listener and its ancestors, up to 10 levels, and the nearest value wins. It stops attmux,screen,zellij,sshdand the init process. Only a fixed list of variable names is ever read, and the values are used for the match and then dropped. The result carries the agent name, a confidence level and an 8-character session id. - Process ancestry. If there are no markers, Yardmaster walks up the process tree and checks each ancestor’s executable and script name against the known agents and editors.
The confidence level matters. A server launched by an autonomous agent session is attributed with agent confidence. A server launched from an editor’s terminal (VS Code, Cursor, Zed and so on) is attributed to the editor, because a person may have typed the command. The Claude desktop app is treated as a host, like an editor, and not as Claude Code.
Whether the session is still alive is checked against the session process: it must exist and still look like that agent. A recycled process id does not count.
For the live Now list, sessions come from different places per agent: Claude Code and Qwen Code write a small file per live session, Codex is matched to its rollout file, and the others are matched by process and the newest session file in the process’s folder. See supported agents for what each one provides.
Orphans and leftovers
Section titled “Orphans and leftovers”These two words mean different things.
- An orphan is a listening port that looks abandoned. Yardmaster flags a port as an orphan
for one of three reasons: its working directory no longer exists (
cwd deleted), the agent session that started it has ended (agent session ended), or, as a weak hint only, it was re-parented to init with no known launcher and it runs a dev tool (launcher gone). The third reason is informational. It is never used to stop anything, and a server that simply daemonised is not treated as an orphan. - A leftover is a process tree that an ended agent session started and that is still
running, whether or not it listens on a port. A leftover is marked ended when the
session is known to be gone, and unsure when the same agent is still running and
Yardmaster cannot tell whose it is. Only ended leftovers are stopped by
sweepand the app’s Stop all.
Both are shown so that you decide. The stop paths are described on the Now and ports page.
Limits of detection
Section titled “Limits of detection”- Other users’ processes. Without elevated rights you see only your own processes’
sockets on macOS and Linux. Root-owned and other users’ listeners can be missing. On Linux,
listprints a note with the count of sockets it could not inspect. - No environment, no marker. Some processes expose no environment: Apple-signed platform binaries, and elevated processes on Windows. Those fall back to ancestry.
- Markers can be absent. A server started by an agent through
nohup,setsidor a process supervisor may lose its markers and its ancestors. It then shows with no agent, or as a leftover of unknown origin. - Terminal multiplexers stop the walk. Inside
tmuxorscreen, the chain ends at the multiplexer, so a server started in a pane is attributed only through its own markers. - No project. A process with a deleted or unreadable working directory, or one that runs from a throwaway folder with no manifest, can show no project. A permission prompt you declined on macOS (Desktop, Documents, removable volumes) can have the same effect.
- Framework is a best guess. A custom launcher script, or a framework that is not in the list, shows no framework.
- Some agents are state-less. Where an agent keeps no per-session state file, the session shows as running with no working or waiting state. Chats inside the Cursor editor and Antigravity have no process of their own and are not shown as live.
- Windows. Ports reserved by Hyper-V appear as in use with no owning process.
If a port or session looks wrong, see troubleshooting.