Env: OpenCompany 0.1.1 (npm @zeenie-ai/opencompany), Windows 11, Claude Code CLI 2.1.261, isolated CLAUDE_CONFIG_DIR.
_PROJECT_KEY_RE preserves ., but Claude Code does not — it maps every character outside [a-zA-Z0-9-] to -, dots included.
https://github.com/zeenie-ai/OpenCompany/blob/main/server/services/cli_agent/session.py#L63
_PROJECT_KEY_RE = re.compile(r"[^a-zA-Z0-9.-]") # keeps "."
...
project_key = _PROJECT_KEY_RE.sub("-", str(cwd)) # session.py:443
Any worktree path containing a dot therefore resolves to a directory Claude never writes to. The default layout has one — .opencompany:
|
|
| cwd |
E:\Kae\.opencompany\workspaces\default\cc_test_1\wt_t_bd5e9c51 |
| OpenCompany watches |
projects\E--Kae-.opencompany-workspaces-default-cc-test-1-wt-t-bd5e9c51 |
| Claude actually writes |
projects\E--Kae--opencompany-workspaces-default-cc-test-1-wt-t-bd5e9c51 |
_await_first_jsonl then times out and the node fails with "claude may have failed to start or the CLAUDE_CONFIG_DIR is misconfigured", while the CLI has in fact started and answered normally. Confirmed by reading the session JSONL in the dashed directory: correct response, stop_reason: end_turn.
Fix: drop the dot from the class so it matches the CLI's own sanitizer.
_PROJECT_KEY_RE = re.compile(r"[^a-zA-Z0-9-]")
Worth adding a regression test with a dotted path segment — every default install hits this, since the data dir itself is .opencompany.
Env: OpenCompany 0.1.1 (npm
@zeenie-ai/opencompany), Windows 11, Claude Code CLI 2.1.261, isolatedCLAUDE_CONFIG_DIR._PROJECT_KEY_REpreserves., but Claude Code does not — it maps every character outside[a-zA-Z0-9-]to-, dots included.https://github.com/zeenie-ai/OpenCompany/blob/main/server/services/cli_agent/session.py#L63
Any worktree path containing a dot therefore resolves to a directory Claude never writes to. The default layout has one —
.opencompany:E:\Kae\.opencompany\workspaces\default\cc_test_1\wt_t_bd5e9c51projects\E--Kae-.opencompany-workspaces-default-cc-test-1-wt-t-bd5e9c51projects\E--Kae--opencompany-workspaces-default-cc-test-1-wt-t-bd5e9c51_await_first_jsonlthen times out and the node fails with "claude may have failed to start or the CLAUDE_CONFIG_DIR is misconfigured", while the CLI has in fact started and answered normally. Confirmed by reading the session JSONL in the dashed directory: correct response,stop_reason: end_turn.Fix: drop the dot from the class so it matches the CLI's own sanitizer.
Worth adding a regression test with a dotted path segment — every default install hits this, since the data dir itself is
.opencompany.