moeru-ai/airi · error · Error
Computer use routing and storage are managed by AIRI.
Error message
Computer use routing and storage are managed by AIRI.
What it means
run() rejects any CLI global flag that would override host-managed routing or storage (--store-root, --endpoint, --device, --device-id, --run, --config, --profile, --discovery-file, --pairing-store), both in 'flag value' and 'flag=value' form. AIRI owns these settings, so caller-supplied values are not allowed.
Solutions
- Remove all managed flags from argv; rely on AIRI's own store/endpoint configuration
- If you need a different store or endpoint, change it through AIRI's computer-use settings, not the CLI args
- Strip/normalize LLM-generated argv before calling run
Example fix
// before
await run({ argv: ['invoke', 'screen.capture', '--store-root=/tmp/shots'] })
// after
await run({ argv: ['invoke', 'screen.capture'] }) Defensive patterns
Strategy: validation
Validate before calling
const MANAGED = ['--store-root','--endpoint','--device','--device-id','--run','--config','--profile','--discovery-file','--pairing-store']nfunction hasManagedFlag(argv: string[]): boolean {
return argv.some(a => MANAGED.some(f => a === f || a.startsWith(`${f}=`)))
} Try / catch
try {
return await run({ argv })
} catch (e) {
if (e instanceof Error && e.message.includes('managed by AIRI')) {
console.warn('Strip host-managed flags; configure routing via AIRI settings')
return null
}
throw e
} Prevention
- Never pass global CLI flags; configure store/endpoint via the host settings instead
- Filter argv through a flag-stripper before calling run
- When relaying user-provided commands, reject managed flags up front with a clear message
When it happens
Trigger: Appending flags like --store-root=/tmp or --endpoint=... to the argv passed to run(), even when the command itself is valid.
Common situations: Reusing raw CLI snippets from documentation; an LLM hallucinating extra flags; trying to point the CLI at a custom daemon or store.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- cap-vite [vite args...] -- <ios|android> [cap run args...]
- Expected `cap run --list --json` to return a JSON array.
- Extension entrypoint escapes the package folder
- Extension entrypoint resolves outside the package folder
- Extension folder import is available only from the…
AI-assisted analysis of moeru-ai/airi@438a067dde (2026-09-17).
Data as JSON: /api/errors/2b82109f0f0f6c95.
Report an issue: GitHub.
Appendix: source
Thrown at apps/stage-tamagotchi/src/main/services/airi/computer-use/runtime.ts:93
const next = queue.then(() => {
if (disposed)
throw new Error('Computer use has stopped.')
return operation()
})
// A failed command must not prevent later commands from running.
queue = next.then(() => undefined, () => undefined)
return next
}
async function run(input: unknown): Promise<ComputerUseResult> {
const { argv } = v.parse(inputSchema, input)
if (argv[0] !== 'invoke' || !/^(?:--help|-h|help|(?:app|display|screen|window|input|mediaControl)\.[a-zA-Z]+)$/.test(argv[1]))
throw new Error('Use invoke with a desktop command or --help.')
// The host owns routing and artifact storage. CLI global flags must not replace them.
const managedFlags = ['--store-root', '--endpoint', '--device', '--device-id', '--run', '--config', '--profile', '--discovery-file', '--pairing-store']
if (argv.some(arg => managedFlags.some(flag => arg === flag || arg.startsWith(`${flag}=`))))
throw new Error('Computer use routing and storage are managed by AIRI.')
return enqueue(async () => {
const active = await connect()
const command = [...argv]
if (!command.includes('--json') && !command.includes('--help') && !command.includes('-h') && command[1] !== 'help')
command.push('--json')
command.push('--store-root', options.storeRoot)
let stdout: string
let stderr: string
let exitCode = 0
try {
({ stdout, stderr } = await execFileAsync(options.binaryPath, command, {
env: { ...process.env, AUV_ENDPOINT: active.connectionOptions.endpoint, AUV_CONTEXT: undefined },
encoding: 'utf8',
timeout: 120000,
maxBuffer: 4 * 1024 * 1024,
windowsHide: true,
signal: abort.signal,View on GitHub (pinned to 438a067dde)