[Bug]: [macOS] Computer Use never starts — CuaUtility exits with computer_runtime_directory_unsafe, and the failure is misreported as 「设备受限(家长控制)」
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- electron, macos, typescript
Direzione di ricerca
Start with assertSafeAncestors and privateDirectory in node_modules/@mavis/computer-use/dist/desktop-lock.js, then blocked() and snapshot() in dist/main/modules/local-runtime/computer-use/component-permissions.js, which map every startup failure to 'restricted'. Done means a failed start surfaces its real error code in the UI instead of the parental-controls label. Changing the SDK's ancestor rule is a separate design question, so check with maintainers before touching it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Product or interface
Desktop app
Version
3.1.9.202 (Electron), macOS 27.2 arm64
Platform
macOS
OS version and architecture
macOS 27.2 arm64
Issue area
Tool call / permission / sandbox
Steps to reproduce
- On macOS 27.2 arm64 with MiniMax Code Desktop 3.1.9.202, enable the official Computer Use plugin (computer-use v1.1.1) in the plugin marketplace.
- Mention the plugin in a conversation. No
computer_*tools are provided at all, while the marketplace still shows the plugin as enabled. There is no error message anywhere in the UI. - In the app's Settings, the Computer Use entry cannot be configured or connected directly: it shows 「设备受限(家长控制)」 ("Restricted (parental controls)"), and after opening that page the page cannot be dismissed — the only way out is force-quitting the whole application.
~/Library/Logs/MiniMax/main-computer-use.log:
[2026-11-01 02:31:09.315] [info] [CuaUtility] forked generation=1 pid=unknown
[2026-11-01 02:31:09.430] [warn] utility_output {"stream":"stderr","output":"[ComputerUse] {\"schema\":\"computer-use.v1\",\"ts\":1793471469429,\"event\":\"utility_exit\",\"generation\":1,\"outcome\":\"startup_failed\",\"errorCode\":\"computer_runtime_directory_unsafe\"}"}
[2026-11-01 02:31:09.430] [warn] [CuaUtility] child lifecycle ended generation=1 pid=9527 {"exitCode":1}
[2026-11-01 02:31:09.430] [warn] [CuaUtility] utility exited; next computer-use activation will restart it
[2026-11-01 02:31:09.430] [warn] [CuaUtility] startup unavailable; continuing without Computer Use: computer_utility_exited_before_ready
Expected and actual behavior
Expected: the Computer Use runtime starts, and if it cannot start the user is told why.
Actual: the helper is forked and exits ~0.1 s later with errorCode: computer_runtime_directory_unsafe. The host logs a warning and continues the session without Computer Use. The Settings entry reports 「设备受限(家长控制)」, a label that is factually wrong on this machine: the only configuration profile present is com.apple.ironwood.support { allowSiri = 0 }, and no device-management profile restricts screen capture. This is the macOS counterpart of the misreport described for Windows in #548, with a different underlying error code.
Root cause (verified by running the shipped code)
The runtime directory and its lock root are placed under $HOME by the shipped SDK:
node_modules/@mavis/computer-use/dist/desktop-lock.js
export function desktopLockRoot() {
return path.join(homedir(), '.minimax-computer-use', 'locks'); // :8
}
async function privateDirectory(directory) { // :10
await assertSafeAncestors(directory);
await mkdir(directory, { recursive: true, mode: 0o700 });
...
}
async function assertSafeAncestors(directory) { // :23
...
if (!info.isDirectory() || info.isSymbolicLink() ||
(process.platform !== 'win32' &&
((info.uid !== process.getuid?.() && info.uid !== 0) || (info.mode & 0o022) !== 0))) {
throw new ComputerUseError('computer_runtime_directory_unsafe',
'Runtime ancestors must be real directories owned by the current user or root and not group/world writable.');
}
}
The ancestor walk requires every existing ancestor to be owned by the current user or root and not group/world writable (mode & 0o022 === 0). On this machine the home directory is:
$ ls -lde ~
drwxrwxrwx+ 123 kevintung staff 3936 /Users/kevintung
0: user:lily allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity
1: group:everyone deny delete
0777 ⇒ mode & 0o022 != 0 ⇒ the check fails on $HOME itself ⇒ the helper throws computer_runtime_directory_unsafe before it can serve anything.
Reproduced with the shipped code, using the SDK's own function:
$ node --input-type=module -e "
import { privateDirectory, desktopLockRoot } from './node_modules/@mavis/computer-use/dist/desktop-lock.js';
try { await privateDirectory(desktopLockRoot()); console.log('ok'); }
catch (e) { console.log('threw', e.code, '|', e.message); }"
threw computer_runtime_directory_unsafe | computer_runtime_directory_unsafe: Runtime ancestors must be real directories owned by the current user or root and not group/world writable.
The failure propagates exactly as the log shows:
dist/main/modules/local-runtime/computer-use/cua-entry.js:24→dataDir: process.env.MINIMAX_DATA_DIR ?? ''dist/main/modules/local-runtime/computer-use/cua-utility-server.js:27-28→prepareDesktopComputerUseComponent(input.dataDir)dist/main/modules/local-runtime/computer-use/packaged-component.js:14→prepareInstalledPackagedComponent({ dataDir, packagedRoot, releaseToken })node_modules/@mavis/computer-use/dist/packaged-component.js:72→await privateDirectory(parent)→ the ancestor check abovecua-entry.js:54-63→.catch(...)logsutility_exitwith the error code and exits 1dist/main/modules/local-runtime/computer-use/index.js:305→reject(new Error('computer_utility_exited_before_ready'))
The label is a misreport, and the honest label already exists
dist/main/modules/local-runtime/computer-use/component-permissions.js
const blocked = () => ({ accessibility: 'restricted', screenRecording: 'restricted', captureReady: false }); // :15
...
async function getComputerUsePermissionStatus() { // :69
try { return snapshot(await inspect(false)); }
catch { return blocked(); } // :73-75 ← every failure becomes "restricted"
}
async function requestComputerUsePermission(kind) { // :77
...
catch { return { status: 'restricted',
message: 'MiniMax Computer Use is unavailable. Install a trusted matching component and try again.' }; } // :90-95
}
snapshot() (:32-51) also returns blocked() for any status code other than computer_permission_required / computer_capture_verification_required, so computer_runtime_directory_unsafe is reported to the user as 「设备受限(家长控制)」.
The renderer already has a truthful label for exactly this situation — settings.cu_status_unavailable = "Bridge unavailable" (i18n in out/_next/static/chunks/88822-*.js, used in out/_next/static/chunks/app/(pages)/(mavis)/archon/page-*.js where the component renders v ? t("settings.cu_status_unavailable") : p ? t(y[p[s]]) : t("status.loading")). Because the main process converts every startup failure into restricted, that branch is never reached for a failed start.
Verified workaround
The check passes as soon as the home directory is not group/world writable (the ACL entry for the second local account is unaffected, because a named-user ACL entry grants independently of the mode bits):
$ chmod g-w,o-w ~ # 0777 -> 0755
$ ls -lde ~
drwxr-xr-x@ 123 kevintung staff 3936 /Users/kevintung
0: user:lily allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity
1: group:everyone deny delete
$ node --input-type=module -e "…privateDirectory(desktopLockRoot())…" # -> ok
$ node --input-type=module -e "
import { prepareInstalledPackagedComponent } from './node_modules/@mavis/computer-use/dist/packaged-component.js';
const trusted = await prepareInstalledPackagedComponent({ dataDir, packagedRoot, releaseToken });
console.log(trusted.root);"
/Users/<user>/Library/Application Support/MiniMax/computer-use/components/0.34.1/darwin-arm64/1ba0a658ef2736ba66dd10c1e616e9b7d2af3a50c381643ab4d317d9b9486bfc
The component then installs and verifies successfully, and the driver itself is healthy:
$ minimax-computer-use health_report # binary_version / platform_supported / session_active / bundle_identity: pass
$ minimax-computer-use call get_desktop_state '{}'
-> screenshot_width 3456, screenshot_height 2234 (a real 3.5 MB PNG)
$ minimax-computer-use permissions status
Accessibility: granted Screen Recording: granted
Two further findings
1. The helper has no TCC identity of its own while it is nested in the host bundle.
It ships at …/MiniMax Code.app/Contents/Resources/resources/computer-use/0.34.1/darwin-arm64/MiniMax Computer Use.app with CFBundleIdentifier = com.minimax.computer-use, but macOS attributes TCC grants to the responsible outer application, so the Screen Recording / Accessibility rows belong to the host app and there is no "MiniMax Computer Use" entry a user can toggle. The driver's own doctor reports the layout it expects:
## install layout
bundle: /Applications/MiniMax Computer Use.app exists=false
symlink: /Users/<user>/.local/bin/cua-driver exists=false
Installing that bundle into /Applications (the signature stays valid — codesign -v --deep --strict passes — and LaunchServices registers it) gives the helper its own TCC identity and its own System Settings row, and the grant then attributes to com.minimax.computer-use rather than to the host.
2. A failed activation is not retried inside the same session.
The log promises "next computer-use activation will restart it", but mentioning the plugin again in the same conversation adds no new fork — the log gains no new entry. The activation is session-scoped, so retrying needs a new session or an application restart, and nothing in the UI says so.
Suggested fixes
- Do not collapse every failure into "parental controls". Return the actual error code to the UI:
computer_runtime_directory_unsafe,computer_component_invalid,computer_utility_exited_before_ready, and so on. The renderer already knows how to show "Bridge unavailable"; the main process should use it for a failed start instead ofblocked(). - Show the failure to the user.
computer_utility_exited_before_readyis currently a warn line in a log file, while the marketplace still shows the plugin as enabled and the conversation silently has nocomputer_*tools. - Give an actionable message for
computer_runtime_directory_unsafe. The condition is "the home directory is group/world writable"; the fix is one command. Today the error code is the only clue and it never reaches the user. - Consider relaxing the ancestor rule for the user's own home directory. The runtime directory itself is created 0700 and owned by the user, so the lock is protected regardless of whether
$HOMEis 0755 or 0750. A home directory shared with another local account (or created 0777 by an installer) currently disables Computer Use entirely, with no explanation. Either place the runtime root where the product controls it, or allow the user's own home directory as an ancestor when the runtime directory itself satisfies the 0700/owner requirement. - Install the helper as a standalone bundle (the layout
doctoralready expects) so that the permission prompts and System Settings rows belong tocom.minimax.computer-useand the user can grant or revoke them directly. - Retry on the next activation, or state in the UI that a restart is required after a failed start.
- Make the permission page dismissible. A page that can only be left by force-quitting the application is unusable regardless of the underlying state.
Notes
- macOS counterpart of #548 (Windows,
computer_component_invalid): same symptom and the same misreported label, different error code and a different packaging constraint. - No
computer_*tool was available in the affected session, so no agent-side behaviour could be observed. Everything above comes from the application's own logs, the shipped SDK's diagnostics, and direct calls into the shipped code.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 315
- Merge medio
- 3h 54m
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MiniMax-AI/minimax-code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MiniMax-AI/minimax-code#639 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
MiniMax-AI/minimax-code#636 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MiniMax-AI/minimax-code#615 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
MiniMax-AI/minimax-code#556 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MiniMax-AI/minimax-code#507 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MiniMax-AI/minimax-code
Issue simili
-
Blocklist addition requestApertablocklist addition
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
MetaMask/eth-phishing-detect#319194 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
continuedev/continue#13533 · 1 commento ·
I maintainer di solito rispondono entro 6 giorni
-
bug codex:automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
genfeedai/genfeed.ai#12060 ·
I maintainer di solito rispondono entro 1 giorno
-
bounty good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fitzss/valun-open#15 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno