Problem
@compoundingtech/pty addresses each managed session by a UNIX-domain socket whose filename is the session name, so name length is bounded by the kernel sun_path limit (~104 bytes on macOS/BSD, 108 on Linux). We are adopting hierarchical, org-rooted session names — an agent path like org.cos.pm-vista-refactor.worker-feature-a that encodes the delegation tree and is used as the pty attach target and the human-recognizable identity. At delegation depth 3-4 these names routinely exceed the sun_path limit, so the session name and the socket filename cannot be the same string.
Ask (target state)
Decouple the session name from the on-disk socket filename: key *.sock / *.pid / *.json / *.events.jsonl on a short derived id (e.g. a hash of the name) and read the human name from session metadata. The id becomes an internal storage detail that is never user-facing; pty list / resolution work on the name.
Interim we run today (no upstream change)
We currently set the socket name to a short derived id and carry the real path as the displayName; pty list renders the path as the primary identity and the resolver matches it. This works but keeps the short id user-visible (shown in parens) and couples two concepts that should be one. A first-class decoupling upstream would let the name be the sole identity regardless of length.
Why it matters
It is the enabler for "the agent path IS the pty session name for every agent, regardless of delegation depth" — a single string as session id, attach target, and recognizable name.
Posted on behalf of @schickling
| field |
value |
agent_name |
⏰ cl1-thyme |
agent_session_id |
d2d67264-53ed-4896-bde0-7a3eb63f133a |
agent_tool |
Claude Code |
agent_tool_version |
2.1.206 |
agent_runtime |
Claude Code 2.1.206 |
agent_model |
claude-opus-4-8 |
runtime_profile |
/nix/store/qq3avrif77r90ypqbdv3hgd3gvwj5s32-coding-agent-runtime-profile/share/coding-agents/profile.json |
skills_manifest |
/nix/store/pjlb3cwf453ghzmc8jj4v8h29sw6p4dg-agent-skills-corpus/share/agent-skills/manifest.json |
worktree |
dotfiles/schickling-assistant/2026-07-09-cos-persona |
machine |
dev3 |
tooling_profile |
dotfiles@4b8e1c5 |
Problem
@compoundingtech/ptyaddresses each managed session by a UNIX-domain socket whose filename is the session name, so name length is bounded by the kernelsun_pathlimit (~104 bytes on macOS/BSD, 108 on Linux). We are adopting hierarchical, org-rooted session names — an agent path likeorg.cos.pm-vista-refactor.worker-feature-athat encodes the delegation tree and is used as thepty attachtarget and the human-recognizable identity. At delegation depth 3-4 these names routinely exceed thesun_pathlimit, so the session name and the socket filename cannot be the same string.Ask (target state)
Decouple the session name from the on-disk socket filename: key
*.sock/*.pid/*.json/*.events.jsonlon a short derived id (e.g. a hash of the name) and read the human name from session metadata. The id becomes an internal storage detail that is never user-facing;pty list/ resolution work on the name.Interim we run today (no upstream change)
We currently set the socket
nameto a short derived id and carry the real path as thedisplayName;pty listrenders the path as the primary identity and the resolver matches it. This works but keeps the short id user-visible (shown in parens) and couples two concepts that should be one. A first-class decoupling upstream would let the name be the sole identity regardless of length.Why it matters
It is the enabler for "the agent path IS the pty session name for every agent, regardless of delegation depth" — a single string as session id, attach target, and recognizable name.
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile