Version: pixel-agents@1.4.0 (standalone CLI, macOS, Node 25.9)
Summary
In standalone CLI mode, the label shown above a character is derived by splitting Claude Code's
encoded project-directory name on - and taking the last segment. That encoding is lossy — Claude
Code replaces both / and _ with - — so the last segment is frequently not the folder name.
Result: several unrelated projects render with the same meaningless label.
Reproduce
- Have Claude Code sessions in folders whose names contain
_ or -, e.g.
~/work/acme/mobile_client_new.
- Run
pixel-agents --port 3100, enable Settings → Watch All Sessions.
- Enable Always show labels.
Observed
| encoded project dir |
label shown |
actual folder |
-Users-<u>-personal-ai-work |
work |
personal_ai_work |
-Users-<u>-work-acme-mobile-client-new |
new |
mobile_client_new |
-Users-<u>-workflow-my-openclaw |
openclaw |
my-openclaw |
-Users-<u>-workflow-my-openclaw-skills-report-subagent |
subagent |
report-subagent |
Three concurrent sessions from the same repo all render as new, so characters are
indistinguishable.
Root cause
dist/cli.js:
function fs(t){ let e = t.replace(/^-+/,"").split("-"); return e[e.length-1] || t }
It is used only as the fallback branch of a resolver hook that the VS Code adapter supplies:
let h = Rt?.({ cwd: n, projectDir: u }) ?? fs(w.basename(u));
In standalone mode Rt is undefined, so the lossy fallback is always taken. The information needed
to undo the encoding is not present in the directory name — but it is present in the transcript:
every .jsonl record carries the real cwd.
$ head -1 ~/.claude/projects/-Users-<u>-work-acme-mobile-client-new/<session>.jsonl | jq -r .cwd
/Users/<u>/work/acme/mobile_client_new
Suggested fix
Provide an Rt implementation for standalone that reads cwd from the newest .jsonl in the
project dir and returns path.basename(cwd), falling back to the current behaviour on any error.
The first call site already has cwd in scope and could pass it straight through.
I verif
Version:
pixel-agents@1.4.0(standalone CLI, macOS, Node 25.9)Summary
In standalone CLI mode, the label shown above a character is derived by splitting Claude Code's
encoded project-directory name on
-and taking the last segment. That encoding is lossy — ClaudeCode replaces both
/and_with-— so the last segment is frequently not the folder name.Result: several unrelated projects render with the same meaningless label.
Reproduce
_or-, e.g.~/work/acme/mobile_client_new.pixel-agents --port 3100, enable Settings → Watch All Sessions.Observed
-Users-<u>-personal-ai-workworkpersonal_ai_work-Users-<u>-work-acme-mobile-client-newnewmobile_client_new-Users-<u>-workflow-my-openclawopenclawmy-openclaw-Users-<u>-workflow-my-openclaw-skills-report-subagentsubagentreport-subagentThree concurrent sessions from the same repo all render as
new, so characters areindistinguishable.
Root cause
dist/cli.js:It is used only as the fallback branch of a resolver hook that the VS Code adapter supplies:
In standalone mode
Rtis undefined, so the lossy fallback is always taken. The information neededto undo the encoding is not present in the directory name — but it is present in the transcript:
every
.jsonlrecord carries the realcwd.Suggested fix
Provide an
Rtimplementation for standalone that readscwdfrom the newest.jsonlin theproject dir and returns
path.basename(cwd), falling back to the current behaviour on any error.The first call site already has
cwdin scope and could pass it straight through.I verif