{"record":{"id":"94941b53b94f9228","repo":"deepseek-ai/deepseek-harness","slug":"aclsandbox-workspace-write-with-temp-requires-a-te","errorCode":null,"errorMessage":"AclSandbox workspace-write with temp requires a temp write SID — derive it via tempWriteSid()","messagePattern":"AclSandbox workspace-write with temp requires a temp write SID — derive it via tempWriteSid\\(\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/sandbox/sandbox-windows-acl/src/index.ts","lineNumber":206,"sourceCode":"      return absolute\n    })\n    this.tempDirOption = options.tempDir\n    this.writeSid = options.writeSid\n    this.tempWriteSid = options.tempWriteSid\n    if (this.mode === 'workspace-write' && this.writeSid === undefined) {\n      throw new Error('AclSandbox workspace-write requires a write SID — derive it from the workspace via workspaceWriteSid()')\n    }\n    if (this.mode === 'workspace-write' && this.tempDirOption === undefined) {\n      throw new Error('AclSandbox workspace-write requires an explicit private temp directory or null')\n    }\n    if (this.mode === 'read-only' && this.tempDirOption !== undefined && this.tempDirOption !== null) {\n      throw new Error('AclSandbox read-only does not accept a temp directory')\n    }\n    if (this.mode === 'read-only' && (this.writeSid !== undefined || this.tempWriteSid !== undefined)) {\n      throw new Error('AclSandbox read-only does not accept write SIDs')\n    }\n    if (this.mode === 'workspace-write' && this.tempDirOption !== null && this.tempWriteSid === undefined) {\n      throw new Error('AclSandbox workspace-write with temp requires a temp write SID — derive it via tempWriteSid()')\n    }\n    if (this.tempDirOption === null && this.tempWriteSid !== undefined) {\n      throw new Error('AclSandbox temp write SID requires a temp directory')\n    }\n    if (this.writeSid !== undefined && this.tempWriteSid === this.writeSid) {\n      throw new Error('AclSandbox workspace and temp write SIDs must be distinct')\n    }\n  }\n\n  /** Resolved temp directory (available after init; null when temp grants are disabled). */\n  get tempDir(): string | null | undefined {\n    return this.tempDirResolved\n  }\n\n  /** Create the restricted token and apply the capability-SID grants. Idempotent-unsafe: once per instance. */\n  async init(): Promise<void> {\n    if (this.api !== undefined) throw new Error('AclSandbox is already initialized')\n    const api = await win32()","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sandbox/sandbox-windows-acl/src/index.ts#L188-L224","documentation":"Error \"AclSandbox workspace-write with temp requires a temp write SID — derive it via tempWriteSid()\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sandbox/sandbox-windows-acl/src/index.ts:206 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Derive the temp write SID with tempWriteSid() and pass it alongside the temp directory."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}