{"record":{"id":"3bfe47138d4b184c","repo":"tinyhumansai/openhuman","slug":"write-claude-code-system-prompt-file-e","errorCode":null,"errorMessage":"write Claude Code system prompt file: {e}","messagePattern":"write Claude Code system prompt file: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/inference/provider/claude_code/driver.rs","lineNumber":323,"sourceCode":"        // same dir below). This is where the coding agent reads/edits code.\n        \"--add-dir\".into(),\n        ctx.project_dir.display().to_string(),\n        // Default `acceptEdits` (auto-apply edits, gate the rest); the user can\n        // opt into `bypassPermissions` for the full toolset (see above).\n        \"--permission-mode\".into(),\n        permission_mode.to_string(),\n        if is_new {\n            \"--session-id\".into()\n        } else {\n            \"--resume\".into()\n        },\n        cc_session_id.clone(),\n        \"--model\".into(),\n        ctx.model.clone(),\n    ];\n    args.extend(\n        append_system_prompt_args(scratch.path(), ctx.append_system_prompt.as_deref())\n            .map_err(|e| anyhow::anyhow!(\"write Claude Code system prompt file: {e}\"))?,\n    );\n    if let Some(p) = mcp_config_path.as_ref() {\n        args.push(\"--mcp-config\".into());\n        args.push(p.display().to_string());\n        args.push(\"--strict-mcp-config\".into());\n    }\n    // Tool surface follows the permission posture: full access → no\n    // `--disallowedTools` (CC keeps its entire toolset incl. Bash/network);\n    // default `acceptEdits` → withhold the dangerous builtins (edits only).\n    if !full_access {\n        args.push(\"--disallowedTools\".into());\n        args.push(DISALLOWED_CC_BUILTINS.join(\",\"));\n    }\n\n    // Validate input *before* spawning so we don't launch a process we\n    // can't feed (CodeRabbit: validate before spawn).\n    let stdin_bytes = build_stdin(ctx.messages, is_new);\n    if stdin_bytes.is_empty() {","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/inference/provider/claude_code/driver.rs#L305-L341","documentation":"Writing the composed system prompt to a file in the Claude Code scratch dir failed before spawning the CLI. An IO error on a just-created temp dir — disk full, permissions, or the file being unreadable — so the turn aborts before the subprocess starts.","triggerScenarios":"Thrown at src/openhuman/inference/provider/claude_code/driver.rs:323 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and tmp permissions","Retry the turn"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}