Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-7697: fix(daemon): keep host TMP/TEMP for every Windows task (#9197)

Multica Eve3d021489f4ca
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4db3c43090..360669941b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -547,12 +547,12 @@ jobs:
# real skills instead of the test directories.
run: go test ./internal/daemon -v -run '^(TestListRuntimeLocalSkills_HermesFollowsTaskHome|TestLocalSkills_DiscoversACPProviderRoots)$' -count=1 -timeout=5m
- - name: Test Windows Claude Git Bash temp lifecycle
+ - name: Test Windows Git Bash temp lifecycle
working-directory: server
run: |
$env:MULTICA_TEST_GIT_BASH = "$env:ProgramFiles\Git\usr\bin\bash.exe"
if (-not (Test-Path -LiteralPath $env:MULTICA_TEST_GIT_BASH)) { throw "Git for Windows is required" }
- go test -tags=gitbashintegration ./internal/daemon -v -run '^(TestWindowsClaudeGitBashTaskTempLifecycle|TestTaskMulticaEnvironment.*|TestTaskTempBaseDir)$' -count=1 -timeout=5m
+ go test -tags=gitbashintegration ./internal/daemon -v -run '^(TestWindowsGitBashTaskTempLifecycle|TestTaskMulticaEnvironment.*|TestTaskTempBaseDir)$' -count=1 -timeout=5m
- name: Test Windows agent launcher argv/stdin handling
working-directory: server
diff --git a/CLI_AND_DAEMON.md b/CLI_AND_DAEMON.md
index c1ef92debe..948de8a1fc 100644
--- a/CLI_AND_DAEMON.md
+++ b/CLI_AND_DAEMON.md
@@ -360,7 +360,7 @@ The daemon periodically scans `MULTICA_WORKSPACES_ROOT` and applies several disk
- **Hermes session store reclamation** — a conversation's Hermes transcript (`state.db`) lives at `<profile dir>/hermes-sessions/<agent-id>/<hermes-profile>/<conversation>/`, outside any task directory, so a follow-up turn can resume it (see [Hermes agent memory](#hermes-agent-memory)). A store untouched for `MULTICA_GC_HERMES_SESSION_TTL` is removed. The default matches the Codex session store rather than the memory store above: these hold full transcripts, and reclaiming an idle one costs a thread that starts fresh (with a continuity notice), not an agent that forgot what it learned. A store a running task holds is never reclaimed.
- **Hermes memory store reclamation** — a Hermes agent's long-term memory (`memories/`) lives at `<profile dir>/hermes-state/<agent-id>/<hermes-profile>/`, outside any task directory, so it survives across tasks and issues (see [Hermes agent memory](#hermes-agent-memory)). A store untouched for `MULTICA_GC_HERMES_MEMORY_TTL` is removed, giving a deleted agent's memory an eventual-reclamation guarantee. The default is deliberately long: these are a handful of markdown files, and reclaiming one is user-visible amnesia rather than a cache miss. A store a running task holds is never reclaimed.
-- **Task temp dir reclamation** — every task gets a private temp directory (`multica-task-*`) under the system temp base (`/tmp`, or `MULTICA_AGENT_TEMP_BASE`), exported to the agent as `TMPDIR`/`TMP`/`TEMP`. Windows Claude Code instead inherits the daemon user's `TMP`/`TEMP` so Git Bash's shared `/tmp` does not point at a task directory that will be deleted; `TMPDIR` stays task-local and `CLAUDE_CODE_TMPDIR` defaults to that directory unless the user overrides it. It is removed when the run ends, but that removal never happens when the daemon is killed and does not succeed while a file inside is still open — common on Windows, where an open handle makes the delete fail outright. These directories live outside `MULTICA_WORKSPACES_ROOT`, so nothing else reclaimed them and whatever the end-of-run removal missed accumulated forever. Every GC cycle now sweeps the temp base. Liveness is decided by the directory's `.task_lock` — the same OS advisory lock an env root uses, which the kernel releases when the holding process dies — not by age: a directory still in use is never removed however old it is, including one owned by a different daemon sharing the same temp base, and a directory whose owner is gone is removed on the next cycle however new it is. Directories left by a daemon predating that lock carry no lock file, so nothing can be proven about them and age is the only signal available. Reclaiming those is an operator's explicit decision: `MULTICA_GC_TASK_TEMP_LEGACY_TTL` defaults to `0`, which leaves them in place. Set it to a duration only once you know no pre-lock daemon is still running tasks on this machine — a task may legitimately run for weeks (there is no default agent timeout), a daemon on another profile can still be on the old binary, and every daemon on the machine shares one temp base, so a TTL here can delete a `TMPDIR` that is still in use. Each GC cycle logs how many such directories it left alone. Even with a TTL set, a directory holding no task content is never reclaimed on age — an old empty leftover, or a shell left by a daemon that died between creating the directory and publishing its lock — because holding no content is exactly what a directory currently being published looks like, and deleting one of those would take the `TMPDIR` of a task that is starting. Those shells are a few bytes each. Only entries carrying the `multica-task-` prefix are ever considered — the temp base itself is usually shared with other programs — and a directory this sweep cannot read is never touched.
+- **Task temp dir reclamation** — every task gets a private temp directory (`multica-task-*`) under the system temp base (`/tmp`, or `MULTICA_AGENT_TEMP_BASE`), exported to the agent as `TMPDIR`/`TMP`/`TEMP`. On Windows, every task instead inherits the daemon user's `TMP`/`TEMP`: Git Bash's `/tmp` mount is shared by all of the user's live Git Bash processes, whichever runtime started them, so it must never point at a task directory that will be deleted. `TMPDIR` stays task-local, and for Claude Code `CLAUDE_CODE_TMPDIR` defaults to that directory unless the user overrides it. It is removed when the run ends, but that removal never happens when the daemon is killed and does not succeed while a file inside is still open — common on Windows, where an open handle makes the delete fail outright. These directories live outside `MULTICA_WORKSPACES_ROOT`, so nothing else reclaimed them and whatever the end-of-run removal missed accumulated forever. Every GC cycle now sweeps the temp base. Liveness is decided by the directory's `.task_lock` — the same OS advisory lock an env root uses, which the kernel releases when the holding process dies — not by age: a directory still in use is never removed however old it is, including one owned by a different daemon sharing the same temp base, and a directory whose owner is gone is removed on the next cycle however new it is. Directories left by a daemon predating that lock carry no lock file, so nothing can be proven about them and age is the only signal available. Reclaiming those is an operator's explicit decision: `MULTICA_GC_TASK_TEMP_LEGACY_TTL` defaults to `0`, which leaves them in place. Set it to a duration only once you know no pre-lock daemon is still running tasks on this machine — a task may legitimately run for weeks (there is no default agent timeout), a daemon on another profile can still be on the old binary, and every daemon on the machine shares one temp base, so a TTL here can delete a `TMPDIR` that is still in use. Each GC cycle logs how many such directories it left alone. Even with a TTL set, a directory holding no task content is never reclaimed on age — an old empty leftover, or a shell left by a daemon that died between creating the directory and publishing its lock — because holding no content is exactly what a directory currently being published looks like, and deleting one of those would take the `TMPDIR` of a task that is starting. Those shells are a few bytes each. Only entries carrying the `multica-task-` prefix are ever considered — the temp base itself is usually shared with other programs — and a directory this sweep cannot read is never touched.
Configured patterns are basename-only — entries containing `/` or `\` are silently dropped — and `.git` subtrees are never descended into. The managed Codex cache is matched by its exact relative path, so a repository's own `.sandbox-bin` is not removed unless an operator explicitly adds that basename to `MULTICA_GC_ARTIFACT_PATTERNS`. The default list (`node_modules`, `.next`, `.turbo`) is intentionally narrow; extend it per deployment if your repos consistently produce other regenerable directories (for example, `MULTICA_GC_ARTIFACT_PATTERNS=node_modules,.next,.turbo,target,__pycache__`). To disable artifact cleanup entirely, including the managed Codex cache, set `MULTICA_GC_ARTIFACT_TTL=0`.
diff --git a/apps/docs/content/docs/daemon-runtimes.fr.mdx b/apps/docs/content/docs/daemon-runtimes.fr.mdx
index 490433631b..a5f7a9a706 100644
--- a/apps/docs/content/docs/daemon-runtimes.fr.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.fr.mdx
@@ -103,7 +103,7 @@ Le tableau liste les variables que les runtimes personnalisés peuvent utiliser
| `MULTICA_AGENT_NAME` | Nom affiché de l'agent assigné | Indicatif |
| `MULTICA_DAEMON_PORT` | Port local de santé/API du daemon utilisé par les commandes réservées aux exécutions, comme `multica repo checkout` | Indicatif |
| `MULTICA_TASK_SLOT` | Emplacement dans le pool de parallélisme global du daemon ; utile pour les ressources indexées par emplacement, comme les GPU | Indicatif |
-| `TMPDIR` | Répertoire temporaire privé de l'exécution ; également fourni sous `TMP` et `TEMP`, sauf pour Claude Code sous Windows, qui hérite des chemins temporaires utilisateur pour le `/tmp` partagé de Git Bash et utilise par défaut le répertoire temporaire de la tâche pour `CLAUDE_CODE_TMPDIR` | Indicatif |
+| `TMPDIR` | Répertoire temporaire privé de l'exécution ; également fourni sous `TMP` et `TEMP`, sauf sous Windows, où les tâches héritent des chemins temporaires utilisateur pour le `/tmp` partagé de Git Bash ; Claude Code sous Windows utilise par défaut le répertoire temporaire de la tâche pour `CLAUDE_CODE_TMPDIR` | Indicatif |
Le serveur détermine l'auteur des requêtes effectuées avec `MULTICA_TOKEN` ; les écritures telles que les commentaires de tâche sont attribuées à l'agent assigné et à l'exécution en cours. Pour tout savoir sur le rattachement du jeton, ses permissions, l'attribution, sa durée de vie maximale de 24 heures et son nettoyage, consultez [Jetons temporaires pour les exécutions d'agents](/auth-tokens#jetons-temporaires-pour-les-exécutions-dagents).
diff --git a/apps/docs/content/docs/daemon-runtimes.ja.mdx b/apps/docs/content/docs/daemon-runtimes.ja.mdx
index c5d8d49094..33572da8eb 100644
--- a/apps/docs/content/docs/daemon-runtimes.ja.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.ja.mdx
@@ -103,7 +103,7 @@ multica daemon start
| `MULTICA_AGENT_NAME` | 割り当てられたエージェントの表示名 | 参考情報 |
| `MULTICA_DAEMON_PORT` | `multica repo checkout` など作業専用コマンドが使うローカルデーモンのヘルス/API ポート | 参考情報 |
| `MULTICA_TASK_SLOT` | デーモン全体の同時実行プール内のスロット。GPU などスロット番号付きリソースに使用可能 | 参考情報 |
-| `TMPDIR` | 実行中の作業専用の一時ディレクトリ。`TMP` と `TEMP` でも提供しますが、Windows の Claude Code は Git Bash の共有 `/tmp` のためユーザーの一時パスを継承し、`CLAUDE_CODE_TMPDIR` の既定値を作業の一時ディレクトリに設定 | 参考情報 |
+| `TMPDIR` | 実行中の作業専用の一時ディレクトリ。`TMP` と `TEMP` でも提供しますが、Windows では Git Bash の共有 `/tmp` のため作業はユーザーの一時パスを継承します。Windows の Claude Code は `CLAUDE_CODE_TMPDIR` の既定値を作業の一時ディレクトリに設定 | 参考情報 |
`MULTICA_TOKEN` を使ったリクエストの作成者はサーバーが決定し、タスクへのコメントなどの書き込みは、割り当てられたエージェントと実行中の作業に帰属します。認証情報の完全な紐付け、権限、帰属、最長 24 時間の有効期間、クリーンアップについては、[エージェント実行用の一時トークン](/auth-tokens#エージェント実行用の一時トークン)を参照してください。
diff --git a/apps/docs/content/docs/daemon-runtimes.ko.mdx b/apps/docs/content/docs/daemon-runtimes.ko.mdx
index e842e1600f..a2196f67aa 100644
--- a/apps/docs/content/docs/daemon-runtimes.ko.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.ko.mdx
@@ -103,7 +103,7 @@ multica daemon start
| `MULTICA_AGENT_NAME` | 할당된 에이전트의 표시 이름 | 참고 정보 |
| `MULTICA_DAEMON_PORT` | `multica repo checkout` 같은 작업 전용 명령이 사용하는 로컬 데몬 상태/API 포트 | 참고 정보 |
| `MULTICA_TASK_SLOT` | 데몬 전체 동시 실행 풀의 슬롯. GPU 같은 슬롯 번호 기반 리소스에 사용 가능 | 참고 정보 |
-| `TMPDIR` | 실행 중인 작업의 비공개 임시 디렉터리. `TMP`와 `TEMP`로도 제공하지만, Windows Claude Code는 Git Bash의 공유 `/tmp`를 위해 사용자 temp 경로를 상속하고 `CLAUDE_CODE_TMPDIR`의 기본값을 작업 임시 디렉터리로 지정 | 참고 정보 |
+| `TMPDIR` | 실행 중인 작업의 비공개 임시 디렉터리. `TMP`와 `TEMP`로도 제공하지만, Windows에서는 Git Bash의 공유 `/tmp`를 위해 작업이 사용자 temp 경로를 상속합니다. Windows Claude Code는 `CLAUDE_CODE_TMPDIR`의 기본값을 작업 임시 디렉터리로 지정 | 참고 정보 |
`MULTICA_TOKEN`을 사용하는 요청의 작성자는 서버가 결정하며, 태스크 댓글 같은 쓰기는 할당된 에이전트와 실행 중인 작업에 귀속됩니다. 자격 증명의 전체 바인딩, 권한, 귀속, 최대 24시간의 유효 기간 및 정리 동작은 [에이전트 실행용 임시 토큰](/auth-tokens#에이전트-실행용-임시-토큰)을 참고하세요.
diff --git a/apps/docs/content/docs/daemon-runtimes.mdx b/apps/docs/content/docs/daemon-runtimes.mdx
index b8478e2c7a..bb65bd0710 100644
--- a/apps/docs/content/docs/daemon-runtimes.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.mdx
@@ -103,7 +103,7 @@ The table lists the variables that custom runtimes can use today. It is intentio
| `MULTICA_AGENT_NAME` | Display name of the assigned agent | Informational |
| `MULTICA_DAEMON_PORT` | Local daemon health/API port used by task-only commands such as `multica repo checkout` | Informational |
| `MULTICA_TASK_SLOT` | Slot in the daemon-wide concurrency pool; useful for slot-indexed resources such as GPUs | Informational |
-| `TMPDIR` | Private temporary directory for the active task; also supplied as `TMP` and `TEMP` except for Windows Claude Code, which inherits user temp paths for Git Bash's shared `/tmp` and defaults `CLAUDE_CODE_TMPDIR` to the task temp directory | Informational |
+| `TMPDIR` | Private temporary directory for the active task; also supplied as `TMP` and `TEMP` except on Windows, where tasks inherit the user's temp paths for Git Bash's shared `/tmp`; Windows Claude Code defaults `CLAUDE_CODE_TMPDIR` to the task temp directory | Informational |
The server determines authorship for requests made with `MULTICA_TOKEN`; writes such as issue comments are attributed to the assigned agent and active task. For the token's complete binding, permissions, attribution, 24-hour maximum lifetime, and cleanup behavior, see [Temporary tokens for agent runs](/auth-tokens#temporary-tokens-for-agent-runs).
diff --git a/apps/docs/content/docs/daemon-runtimes.zh.mdx b/apps/docs/content/docs/daemon-runtimes.zh.mdx
index 066ee2448e..eebfb0244b 100644
--- a/apps/docs/content/docs/daemon-runtimes.zh.mdx
+++ b/apps/docs/content/docs/daemon-runtimes.zh.mdx
@@ -103,7 +103,7 @@ multica daemon start
| `MULTICA_AGENT_NAME` | 被指派智能体的显示名称 | 仅供参考 |
| `MULTICA_DAEMON_PORT` | 本地守护进程的健康检查/API 端口,供 `multica repo checkout` 等仅限 task 的命令使用 | 仅供参考 |
| `MULTICA_TASK_SLOT` | 守护进程全局并发池中的槽位,可用于 GPU 等按槽位编号的资源 | 仅供参考 |
-| `TMPDIR` | 当前 task 的私有临时目录;也会以 `TMP` 和 `TEMP` 提供,但 Windows 上的 Claude Code 会继承用户临时路径以维持 Git Bash 的共享 `/tmp`,并将 `CLAUDE_CODE_TMPDIR` 默认设为 task 临时目录 | 仅供参考 |
+| `TMPDIR` | 当前 task 的私有临时目录;也会以 `TMP` 和 `TEMP` 提供,但在 Windows 上 task 会继承用户临时路径以维持 Git Bash 的共享 `/tmp`;Windows 上的 Claude Code 会将 `CLAUDE_CODE_TMPDIR` 默认设为 task 临时目录 | 仅供参考 |
使用 `MULTICA_TOKEN` 发起请求时,作者身份由服务端决定;任务评论等写入操作会归属到被指派的智能体和当前 task。令牌的完整绑定关系、权限、归属方式、最长 24 小时的有效期和清理规则见[智能体执行的临时令牌](/auth-tokens#智能体执行的临时令牌)。
diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.go
index 704267fddc..efbc812f14 100644
--- a/server/internal/daemon/daemon.go
+++ b/server/internal/daemon/daemon.go
@@ -191,11 +191,21 @@ func taskMulticaEnvironment(task Task, provider, agentName, token, configRoot, w
"TMP": tempDir,
"TEMP": tempDir,
}
- if runtime.GOOS == "windows" && provider == "claude" {
- // Git Bash shares its /tmp mount across processes. Keep its host temp
- // target alive while TMPDIR and Claude's internal files stay task-local.
- delete(env, "TMP")
- delete(env, "TEMP")
+ if runtime.GOOS != "windows" {
+ return env
+ }
+ // MSYS (Git Bash) resolves its `/tmp usertemp` mount from TMP/TEMP once,
+ // in the first process, and every live MSYS process of this user shares
+ // that mount table — whichever provider started it. A task-private TMP/TEMP
+ // would pin /tmp to a directory this daemon deletes when that task ends,
+ // breaking /tmp for every later task (#8824). So on Windows no task
+ // overrides TMP/TEMP; they inherit the daemon user's host temp, and only
+ // TMPDIR stays task-private.
+ delete(env, "TMP")
+ delete(env, "TEMP")
+ if provider == "claude" {
+ // Claude Code reads CLAUDE_CODE_TMPDIR for its own temp files; default
+ // it to the task dir so they stay private, unless the user set it.
if os.Getenv("CLAUDE_CODE_TMPDIR") == "" {
env["CLAUDE_CODE_TMPDIR"] = tempDir
if task.Agent != nil {
diff --git a/server/internal/daemon/daemon_test.go b/server/internal/daemon/daemon_test.go
index b8dbe96ba6..5ba1c77a60 100644
--- a/server/internal/daemon/daemon_test.go
+++ b/server/internal/daemon/daemon_test.go
@@ -564,6 +564,11 @@ func TestTaskMulticaEnvironmentIncludesPrivateConfigRoot(t *testing.T) {
"TMP": "/task/tmp",
"TEMP": "/task/tmp",
}
+ if runtime.GOOS == "windows" {
+ // Windows tasks inherit host TMP/TEMP; see TestTaskMulticaEnvironmentTempPolicy.
+ delete(want, "TMP")
+ delete(want, "TEMP")
+ }
if !maps.Equal(env, want) {
t.Fatalf("taskMulticaEnvironment() = %#v, want %#v", env, want)
}
@@ -586,30 +591,31 @@ func TestTaskMulticaEnvironmentIncludesPrivateConfigRoot(t *testing.T) {
func TestTaskMulticaEnvironmentTempPolicy(t *testing.T) {
t.Setenv("CLAUDE_CODE_TMPDIR", "")
- for _, provider := range []string{"claude", "codex", "pi"} {
+ for _, provider := range []string{"claude", "codex", "pi", "opencode", "cursor"} {
t.Run(provider, func(t *testing.T) {
env := taskMulticaEnvironment(Task{}, provider, "", "", "", "", "", 0, 0, "/task/tmp")
if env["TMPDIR"] != "/task/tmp" {
t.Fatalf("TMPDIR = %q, want private task temp", env["TMPDIR"])
}
- if runtime.GOOS == "windows" && provider == "claude" {
+ if runtime.GOOS == "windows" {
+ // Every provider can start Git Bash, whose /tmp mount is shared.
for _, key := range []string{"TMP", "TEMP"} {
if _, overridden := env[key]; overridden {
t.Errorf("%s must inherit the host path for Git Bash's shared /tmp", key)
}
}
- if env["CLAUDE_CODE_TMPDIR"] != "/task/tmp" {
- t.Errorf("CLAUDE_CODE_TMPDIR = %q, want private task temp", env["CLAUDE_CODE_TMPDIR"])
- }
} else {
for _, key := range []string{"TMP", "TEMP"} {
if env[key] != "/task/tmp" {
t.Errorf("%s = %q, want existing private task temp", key, env[key])
}
}
- if _, overridden := env["CLAUDE_CODE_TMPDIR"]; overridden {
- t.Error("other platforms/providers must not override CLAUDE_CODE_TMPDIR")
- }
+ }
+ wantClaudeTemp := runtime.GOOS == "windows" && provider == "claude"
+ if got, ok := env["CLAUDE_CODE_TMPDIR"]; wantClaudeTemp && got != "/task/tmp" {
+ t.Errorf("CLAUDE_CODE_TMPDIR = %q, want private task temp", got)
+ } else if !wantClaudeTemp && ok {
+ t.Error("only Windows Claude gets a CLAUDE_CODE_TMPDIR default")
}
})
}
diff --git a/server/internal/daemon/task_temp_git_bash_windows_test.go b/server/internal/daemon/task_temp_git_bash_windows_test.go
index 22d22f9b66..b55b6b8fa8 100644
--- a/server/internal/daemon/task_temp_git_bash_windows_test.go
+++ b/server/internal/daemon/task_temp_git_bash_windows_test.go
@@ -20,7 +20,9 @@ import (
// This is an opt-in test of real Git for Windows, not an agent CLI or account.
// Run with -tags=gitbashintegration and MULTICA_TEST_GIT_BASH=<bash.exe>.
-func TestWindowsClaudeGitBashTaskTempLifecycle(t *testing.T) {
+// Tasks alternate providers: the MSYS /tmp mount is shared by every live Bash
+// of this user, so a non-Claude task seeding it must be just as safe (#8824).
+func TestWindowsGitBashTaskTempLifecycle(t *testing.T) {
bash := os.Getenv("MULTICA_TEST_GIT_BASH")
if bash == "" {
t.Skip("set MULTICA_TEST_GIT_BASH to explicitly select Git for Windows")
@@ -50,7 +52,7 @@ func TestWindowsClaudeGitBashTaskTempLifecycle(t *testing.T) {
return dir, lock
}
- start := func(dir string, orphan bool) (map[string]string, func()) {
+ start := func(dir, provider string, orphan bool) (map[string]string, func()) {
t.Helper()
script := `printf 'PID='; /usr/bin/cat /proc/$$/winpid; printf '\n'
printf 'TMPDIR=%s\n' "$(/usr/bin/cygpath -w "$TMPDIR")"
@@ -85,7 +87,7 @@ IFS= read -r release
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
cmd.Stdin, cmd.Stdout, cmd.Stderr = input, sink, stderr
cmd.Env = os.Environ()
- for key, value := range taskMulticaEnvironment(Task{}, "claude", "", "", "", "", "", 0, 0, dir) {
+ for key, value := range taskMulticaEnvironment(Task{}, provider, "", "", "", "", "", 0, 0, dir) {
cmd.Env = append(cmd.Env, key+"="+value)
}
if err := cmd.Start(); err != nil {
@@ -148,12 +150,12 @@ IFS= read -r release
}
first, firstLock := newTask()
- initial, stopFirst := start(first, false)
+ initial, stopFirst := start(first, "codex", false)
if !strings.EqualFold(initial["TARGET"], hostTemp) && !strings.EqualFold(initial["TARGET"], first) {
t.Skipf("another MSYS process already owns /tmp at %q", initial["TARGET"])
}
second, secondLock := newTask()
- overlap, stopOrphan := start(second, true)
+ overlap, stopOrphan := start(second, "claude", true)
stopFirst()
execenv.ReleaseTaskTempLock(firstLock)
if err := execenv.RemoveTaskTempDir(first); err != nil {
@@ -166,7 +168,7 @@ IFS= read -r release
t.Fatalf("GC removed %d dirs while the second task held its lock", removed)
}
third, thirdLock := newTask()
- afterDelete, stopThird := start(third, false)
+ afterDelete, stopThird := start(third, "opencode", false)
for name, snapshot := range map[string]map[string]string{"overlap": overlap, "after deletion with orphan alive": afterDelete} {
if snapshot["TMP_OK"] != "yes" {
t.Errorf("%s: /tmp unusable: %v", name, snapshot)
@@ -184,7 +186,7 @@ IFS= read -r release
}
}
fourth, _ := newTask()
- sequential, stopFourth := start(fourth, false)
+ sequential, stopFourth := start(fourth, "claude", false)
if sequential["TMP_OK"] != "yes" || !strings.EqualFold(sequential["TARGET"], hostTemp) {
t.Fatalf("sequential task after cleanup: %v", sequential)
}