{"id":7071,"date":"2026-05-22T09:36:45","date_gmt":"2026-05-22T00:36:45","guid":{"rendered":"https:\/\/techfun.cc\/?p=7071"},"modified":"2026-05-22T09:36:45","modified_gmt":"2026-05-22T00:36:45","slug":"codex-app-hooks-wsl2-guide","status":"publish","type":"post","link":"https:\/\/techfun.cc\/generative-ai\/codex-app-hooks-wsl2-guide.html","title":{"rendered":"Windows\u7248Codex\u30a2\u30d7\u30ea\u3067\u59cb\u3081\u308bHooks\u6d3b\u7528"},"content":{"rendered":"<h3 id=\"section-1\" class=\"Heading Title Title--m\">\u306f\u3058\u3081\u306b<\/h3>\n<p>Windows\u3067Codex\u30a2\u30d7\u30ea\u3092\u4f7f\u3046\u5834\u5408\u3001PowerShell\u3067\u52d5\u304fWindows native agent\u3068\u3001WSL2\u4e0a\u3067\u52d5\u304fagent\u306e\u3069\u3061\u3089\u3082\u9078\u629e\u3067\u304d\u307e\u3059\u3002\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001Windows\u74b0\u5883\u3067Codex\u30a2\u30d7\u30ea\u3092\u4f7f\u3044\u59cb\u3081\u308b\u305f\u3081\u306e\u57fa\u672c\u3068\u3001WSL2\u3092\u524d\u63d0\u306b\u3057\u305f\u8003\u3048\u65b9\u3092\u6574\u7406\u3057\u307e\u3057\u305f\u3002<\/p>\n<a class=\"Internal-post\" href=\"https:\/\/techfun.cc\/generative-ai\/codex-app-windows-wsl-introduction.html\"><div class=\"Internal-post__thumb\" style=\"background: url(\/wp-content\/uploads\/2026\/05\/codex-app-windows-wsl-introduction-scaled.png) no-repeat; background-size: cover; background-position: 50% 50%;\"><\/div><div class=\"Internal-post-content\"><div class=\"Category Category--generative-ai\"> \u751f\u6210AI\u95a2\u9023<\/div><div class=\"Internal-post__title\">Windows\u3067\u59cb\u3081\u308bCodex\u30a2\u30d7\u30ea\u5165\u9580<\/div><\/div><\/a>\n<p>\u4eca\u56de\u306f\u3001\u305d\u306e\u6b21\u306e\u6bb5\u968e\u3068\u3057\u3066Codex\u306eHooks\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3059\u3002Hooks\u306f\u3001Codex\u306e\u4f5c\u696d\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u306e\u9014\u4e2d\u3067\u3001\u30c1\u30fc\u30e0\u72ec\u81ea\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6c7a\u307e\u3063\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002OpenAI\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u691c\u67fb\u3001\u4f1a\u8a71\u30ed\u30b0\u306e\u9001\u4fe1\u3001\u4f5c\u696d\u7d42\u4e86\u6642\u306e\u691c\u8a3c\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u306e\u8ffd\u52a0\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u6ce8\u5165\u306a\u3069\u306b\u4f7f\u3048\u308b\u62e1\u5f35\u6a5f\u69cb\u3068\u3057\u3066\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\uff08<a href=\"https:\/\/developers.openai.com\/codex\/hooks\" class=\"Ext\">Hooks &#8211; Codex<\/a>\uff09\u3002<br \/>\n\u672c\u8a18\u4e8b\u3067\u306f\u30012026\u5e745\u670818\u65e5\u6642\u70b9\u306e\u516c\u5f0f\u60c5\u5831\u3092\u3082\u3068\u306b\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u3092WSL2\u524d\u63d0\u3067\u4f7f\u3046\u5834\u5408\u306eHooks\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u65b9\u6cd5\u3068\u30016\u7a2e\u985e\u306ehook\u30a4\u30d9\u30f3\u30c8\u306e\u6d3b\u7528\u30a2\u30a4\u30c7\u30a2\u3092\u6574\u7406\u3057\u307e\u3059\u3002<br \/>\n\u306a\u304a\u3001\u672c\u8a18\u4e8b\u3067\u4f7f\u7528\u3057\u3066\u3044\u308bCodex\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f<span class=\"Post-inline\">26.513.40821<\/span>\u306b\u306a\u308a\u307e\u3059\u3002\u751f\u6210AI\u30c4\u30fc\u30eb\u306e\u66f4\u65b0\u983b\u5ea6\u306f\u65e9\u3044\u305f\u3081\u3001\u6700\u65b0\u7248\u306b\u304a\u3044\u3066\u306f\u518d\u73fe\u3057\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u3001\u4e8b\u524d\u306b\u3054\u4e86\u627f\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/codex-hooks-lifecycle.png\" alt=\"Codex Hooks\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">Hooks\u306f\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u524d\u3001\u30c4\u30fc\u30eb\u5b9f\u884c\u524d\u5f8c\u3001\u627f\u8a8d\u8981\u6c42\u6642\u3001\u5fdc\u7b54\u7d42\u4e86\u524d\u306a\u3069\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/div>\n<h3 id=\"section-2\" class=\"Heading Title Title--m\">Codex Hooks\u306e\u57fa\u672c<\/h3>\n<p>Codex Hooks\u306f\u3001\u7279\u5b9a\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002Hooks\u306f\u65e2\u5b9a\u3067\u6709\u52b9\u3067\u3059\u3002\u7121\u52b9\u5316\u3057\u305f\u3044\u5834\u5408\u306f <span class=\"Post-inline\">config.toml<\/span> \u306e <span class=\"Post-inline\">[features]<\/span> \u3067 <span class=\"Post-inline\">hooks = false<\/span> \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u7ba1\u7406\u8005\u304c\u5f37\u5236\u7684\u306b\u7121\u52b9\u5316\u3059\u308b\u5834\u5408\u306f\u3001<span class=\"Post-inline\">requirements.toml<\/span> \u5074\u3067\u3082\u540c\u69d8\u306b\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002<br \/>\nHooks\u306e\u5b9a\u7fa9\u5834\u6240\u3068\u3057\u3066\u3001\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u4e3b\u306b\u6b21\u306e\u5f62\u5f0f\u304c\u6848\u5185\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u5834\u6240<\/th>\n<th>\u4f7f\u3044\u3069\u3053\u308d<\/th>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">~\/.codex\/hooks.json<\/span><\/td>\n<td>\u500b\u4eba\u306e\u5168\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u7528\u3057\u305f\u3044hook\u3092\u7f6e\u304f<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">~\/.codex\/config.toml<\/span><\/td>\n<td>\u500b\u4eba\u8a2d\u5b9a\u3068\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u3067hook\u3092\u7ba1\u7406\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">&lt;repo&gt;\/.codex\/hooks.json<\/span><\/td>\n<td>\u30ea\u30dd\u30b8\u30c8\u30ea\u5358\u4f4d\u3067\u5171\u6709\u3059\u308bhook\u3092\u7f6e\u304f<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">&lt;repo&gt;\/.codex\/config.toml<\/span><\/td>\n<td>\u30ea\u30dd\u30b8\u30c8\u30ea\u5358\u4f4d\u306eCodex\u8a2d\u5b9a\u3068\u4e00\u7dd2\u306bhook\u3092\u7ba1\u7406\u3059\u308b<\/td>\n<\/tr>\n<\/table>\n<p>\u8907\u6570\u306e\u5834\u6240\u306b\u4e00\u81f4\u3059\u308bhook\u304c\u3042\u308b\u5834\u5408\u3001Codex\u306f\u305d\u308c\u3089\u3092\u307e\u3068\u3081\u3066\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\u9ad8\u3044\u512a\u5148\u5ea6\u306e\u8a2d\u5b9a\u304c\u4f4e\u3044\u512a\u5148\u5ea6\u306ehook\u3092\u7f6e\u304d\u63db\u3048\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u6761\u4ef6\u306b\u4e00\u81f4\u3057\u305fhook\u304c\u3059\u3079\u3066\u5b9f\u884c\u5bfe\u8c61\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u70b9\u306f\u3001\u901a\u5e38\u306e\u8a2d\u5b9a\u5024\u306e\u4e0a\u66f8\u304d\u3068\u306f\u7570\u306a\u308b\u305f\u3081\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30ed\u30fc\u30ab\u30eb\u306e <span class=\"Post-inline\">.codex\/<\/span> \u914d\u4e0b\u306b\u3042\u308bhook\u306f\u3001\u305d\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4fe1\u983c\u6e08\u307f\u306e\u5834\u5408\u306b\u8aad\u307f\u8fbc\u307e\u308c\u307e\u3059\u3002\u672a\u78ba\u8a8d\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u7f6e\u304b\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u81ea\u52d5\u5b9f\u884c\u3057\u306a\u3044\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002\u975e\u7ba1\u7406\u4e0b\u306ecommand hook\u306f\u3001\u5b9f\u884c\u524d\u306b\u30ec\u30d3\u30e5\u30fc\u3068\u4fe1\u983c\u8a2d\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002CLI\u3067\u306f <span class=\"Post-inline\">\/hooks<\/span> \u3092\u4f7f\u3063\u3066\u3001\u8aad\u307f\u8fbc\u307e\u308c\u305fhook\u306e\u78ba\u8a8d\u3001\u4fe1\u983c\u3001\u7121\u52b9\u5316\u3092\u884c\u3048\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-hooks-browser-cli.png\" alt=\"Hooks\u306e\u78ba\u8a8d\u753b\u9762 CLI\u7248\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">Codex CLI\u3067 \/hooks \u3092\u958b\u304d\u3001\u8aad\u307f\u8fbc\u307e\u308c\u305fhook\u3001\u4fe1\u983c\u72b6\u614b\u3001\u7121\u52b9\u5316\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u753b\u9762\u4f8b<\/div>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-hooks-browser-app.png\" alt=\"Hooks\u306e\u78ba\u8a8d\u753b\u9762 \u30a2\u30d7\u30ea\u7248\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">Codex\u30a2\u30d7\u30ea\u3067 \/hooks \u3092\u958b\u304d\u3001\u8aad\u307f\u8fbc\u307e\u308c\u305fhook\u3001\u4fe1\u983c\u72b6\u614b\u3001\u7121\u52b9\u5316\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u753b\u9762\u4f8b<\/div>\n<p>2026\u5e745\u6708\u6642\u70b9\u3067\u3001\u5b9f\u52d9\u4e0a\u307e\u305a\u62bc\u3055\u3048\u305f\u3044hook\u30a4\u30d9\u30f3\u30c8\u306f\u6b21\u306e6\u7a2e\u985e\u3067\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u30a4\u30d9\u30f3\u30c8<\/th>\n<th>\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0<\/th>\n<th>\u4e3b\u306a\u7528\u9014<\/th>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">SessionStart<\/span><\/td>\n<td>\u30bb\u30c3\u30b7\u30e7\u30f3\u958b\u59cb\u6642\u3084\u518d\u958b\u6642<\/td>\n<td>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u56fa\u6709\u306e\u88dc\u8db3\u60c5\u5831\u3092\u8aad\u307f\u8fbc\u3080<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">UserPromptSubmit<\/span><\/td>\n<td>\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u524d<\/td>\n<td>\u79d8\u5bc6\u60c5\u5831\u3084\u5371\u967a\u306a\u4f9d\u983c\u3092\u691c\u67fb\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">PreToolUse<\/span><\/td>\n<td>\u30c4\u30fc\u30eb\u5b9f\u884c\u524d<\/td>\n<td>\u5371\u967a\u306a\u30b3\u30de\u30f3\u30c9\u3084\u7de8\u96c6\u3092\u30d6\u30ed\u30c3\u30af\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">PermissionRequest<\/span><\/td>\n<td>Codex\u304c\u627f\u8a8d\u3092\u6c42\u3081\u308b\u76f4\u524d<\/td>\n<td>\u627f\u8a8d\u30dd\u30ea\u30b7\u30fc\u3092\u81ea\u52d5\u5224\u5b9a\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">PostToolUse<\/span><\/td>\n<td>\u30c4\u30fc\u30eb\u5b9f\u884c\u5f8c<\/td>\n<td>\u5b9f\u884c\u7d50\u679c\u3092\u691c\u67fb\u3057\u3001\u8ffd\u52a0\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u6e21\u3059<\/td>\n<\/tr>\n<tr>\n<td><span class=\"Post-inline\">Stop<\/span><\/td>\n<td>Codex\u304c\u5fdc\u7b54\u3092\u7d42\u3048\u3088\u3046\u3068\u3057\u305f\u6642<\/td>\n<td>\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u3084\u8ffd\u52a0\u691c\u8a3c\u3092\u4fc3\u3059<\/td>\n<\/tr>\n<\/table>\n<p>command hook\u306b\u306f\u3001\u5171\u901a\u3057\u3066JSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6a19\u6e96\u5165\u529b\u3067\u6e21\u3055\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3001\u30bb\u30c3\u30b7\u30e7\u30f3ID\u3001\u73fe\u5728\u306e\u30e2\u30c7\u30eb\u3001hook\u30a4\u30d9\u30f3\u30c8\u540d\u306a\u3069\u3067\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u3054\u3068\u306b\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u672c\u6587\u3001\u30c4\u30fc\u30eb\u540d\u3001\u30c4\u30fc\u30eb\u5165\u529b\u3001\u30c4\u30fc\u30eb\u51fa\u529b\u306a\u3069\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<br \/>\n\u91cd\u8981\u306a\u306e\u306f\u3001Hooks\u3092\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5883\u754c\u305d\u306e\u3082\u306e\u3068\u8003\u3048\u306a\u3044\u3053\u3068\u3067\u3059\u3002OpenAI\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3082\u3001<span class=\"Post-inline\">PreToolUse<\/span> \u306f\u30ac\u30fc\u30c9\u30ec\u30fc\u30eb\u3067\u3042\u308a\u3001\u5b8c\u5168\u306a\u5f37\u5236\u5883\u754c\u3067\u306f\u306a\u3044\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u7ba1\u7406\u8005\u30dd\u30ea\u30b7\u30fc\u3001sandbox\u3001\u6a29\u9650\u8a2d\u5b9a\u3001\u30ec\u30d3\u30e5\u30fc\u904b\u7528\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<a class=\"Internal-post\" href=\"https:\/\/techfun.cc\/generative-ai\/agents-md-basics-and-practice.html\"><div class=\"Internal-post__thumb\" style=\"background: url(\/wp-content\/uploads\/2026\/03\/agents-md-basics-and-practice-scaled.png) no-repeat; background-size: cover; background-position: 50% 50%;\"><\/div><div class=\"Internal-post-content\"><div class=\"Category Category--generative-ai\"> \u751f\u6210AI\u95a2\u9023<\/div><div class=\"Internal-post__title\">AGENTS.md\u3068\u306f\uff1fAI\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u6e21\u3059\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u53d6\u6271\u8aac\u660e\u66f8\u300d\u3092\u89e3\u8aac<\/div><\/div><\/a>\n<h3 id=\"section-3\" class=\"Heading Title Title--m\">WSL2\u4e0a\u306bHooks\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b<\/h3>\n<p>\u3053\u3053\u3067\u306f\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u5358\u4f4d\u3067\u5171\u6709\u3059\u308b\u524d\u63d0\u3067\u3001<span class=\"Post-inline\">.codex\/hooks.json<\/span> \u3068 <span class=\"Post-inline\">.codex\/hooks\/<\/span> \u306bhook\u3092\u914d\u7f6e\u3059\u308b\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002Windows\u7248Codex\u30a2\u30d7\u30ea\u3067agent\u3092WSL\u306b\u5207\u308a\u66ff\u3048\u3066\u3044\u308b\u5834\u5408\u3001hook\u30b3\u30de\u30f3\u30c9\u3082WSL\u5074\u306e\u74b0\u5883\u3067\u5b9f\u884c\u3055\u308c\u308b\u60f3\u5b9a\u3067\u3059\u3002<br \/>\n\u307e\u305a\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u30eb\u30fc\u30c8\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">bash<\/div>\n<pre class=\"Copy\"><code>\r\nmkdir -p .codex\/hooks\r\nuv init --bare .codex\/hooks-runtime\r\n<\/code><\/pre>\n<p>hook\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5916\u90e8\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4e0d\u8981\u3067\u3042\u3063\u3066\u3082\u3001\u5b9f\u884c\u74b0\u5883\u3092\u56fa\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5c02\u7528\u306euv\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7f6e\u3044\u3066\u304a\u304f\u3068\u7ba1\u7406\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u5916\u90e8\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">bash<\/div>\n<pre class=\"Copy\"><code>\r\nuv add detect-secrets --project .codex\/hooks-runtime\r\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001<span class=\"Post-inline\">.codex\/hooks.json<\/span> \u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u91cd\u8981\u306a\u306e\u306f\u3001\u5f8c\u6bb5\u306e6\u3064\u306eHook\u6d3b\u7528\u30a2\u30a4\u30c7\u30a2\u3092\u5b9f\u969b\u306b\u52d5\u304b\u3059\u306b\u306f\u30016\u7a2e\u985e\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u5074\u3067\u3082\u767b\u9332\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3067\u3059\u3002<span class=\"Post-inline\">hooks.json<\/span> \u306b3\u7a2e\u985e\u3060\u3051\u767b\u9332\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u5f8c\u6bb5\u3067\u7d39\u4ecb\u3059\u308b <span class=\"Post-inline\">SessionStart<\/span>\u3001<span class=\"Post-inline\">PermissionRequest<\/span>\u3001<span class=\"Post-inline\">PostToolUse<\/span> \u306a\u3069\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7f6e\u3044\u3066\u3082\u5b9f\u884c\u3055\u308c\u307e\u305b\u3093\u3002<br \/>\n\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u6b21\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u3092\u524d\u63d0\u306b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">text<\/div>\n<pre class=\"Copy\"><code>\r\n.codex\/\r\n  hooks.json\r\n  hooks\/\r\n    session_start.py\r\n    user_prompt_guard.py\r\n    pre_tool_use_policy.py\r\n    permission_request_policy.py\r\n    post_tool_use_review.py\r\n    stop_check.py\r\n  hooks-runtime\/\r\n    pyproject.toml\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e <span class=\"Post-inline\">hooks.json<\/span> \u306f\u3001\u5f8c\u6bb5\u3067\u63b2\u8f09\u3059\u308b6\u3064\u306ePython\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u305d\u308c\u305e\u308c\u5bfe\u5fdc\u3059\u308bhook\u30a4\u30d9\u30f3\u30c8\u306b\u7d10\u3065\u3051\u308b\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<div class=\"Pre-title\">hooks.json<\/div>\n<pre class=\"Copy\"><code>\r\n{\r\n  &quot;hooks&quot;: {\r\n    &quot;SessionStart&quot;: [\r\n      {\r\n        &quot;matcher&quot;: &quot;startup|resume|clear&quot;,\r\n        &quot;hooks&quot;: [\r\n          {\r\n            &quot;type&quot;: &quot;command&quot;,\r\n            &quot;command&quot;: &quot;bash -lc &#x27;REPO=$(git rev-parse --show-toplevel); uv run --project \\&quot;$REPO\/.codex\/hooks-runtime\\&quot; python \\&quot;$REPO\/.codex\/hooks\/session_start.py\\&quot;&#x27;&quot;,\r\n            &quot;statusMessage&quot;: &quot;Loading session context&quot;\r\n          }\r\n        ]\r\n      }\r\n    ],\r\n    &quot;UserPromptSubmit&quot;: [\r\n      {\r\n        &quot;hooks&quot;: [\r\n          {\r\n            &quot;type&quot;: &quot;command&quot;,\r\n            &quot;command&quot;: &quot;bash -lc &#x27;REPO=$(git rev-parse --show-toplevel); uv run --project \\&quot;$REPO\/.codex\/hooks-runtime\\&quot; python \\&quot;$REPO\/.codex\/hooks\/user_prompt_guard.py\\&quot;&#x27;&quot;,\r\n            &quot;statusMessage&quot;: &quot;Checking prompt&quot;\r\n          }\r\n        ]\r\n      }\r\n    ],\r\n    &quot;PreToolUse&quot;: [\r\n      {\r\n        &quot;matcher&quot;: &quot;^Bash$&quot;,\r\n        &quot;hooks&quot;: [\r\n          {\r\n            &quot;type&quot;: &quot;command&quot;,\r\n            &quot;command&quot;: &quot;bash -lc &#x27;REPO=$(git rev-parse --show-toplevel); uv run --project \\&quot;$REPO\/.codex\/hooks-runtime\\&quot; python \\&quot;$REPO\/.codex\/hooks\/pre_tool_use_policy.py\\&quot;&#x27;&quot;,\r\n            &quot;statusMessage&quot;: &quot;Checking command&quot;\r\n          }\r\n        ]\r\n      }\r\n    ],\r\n    &quot;PermissionRequest&quot;: [\r\n      {\r\n        &quot;matcher&quot;: &quot;^Bash$&quot;,\r\n        &quot;hooks&quot;: [\r\n          {\r\n            &quot;type&quot;: &quot;command&quot;,\r\n            &quot;command&quot;: &quot;bash -lc &#x27;REPO=$(git rev-parse --show-toplevel); uv run --project \\&quot;$REPO\/.codex\/hooks-runtime\\&quot; python \\&quot;$REPO\/.codex\/hooks\/permission_request_policy.py\\&quot;&#x27;&quot;,\r\n            &quot;statusMessage&quot;: &quot;Checking approval request&quot;\r\n          }\r\n        ]\r\n      }\r\n    ],\r\n    &quot;PostToolUse&quot;: [\r\n      {\r\n        &quot;matcher&quot;: &quot;^Bash$&quot;,\r\n        &quot;hooks&quot;: [\r\n          {\r\n            &quot;type&quot;: &quot;command&quot;,\r\n            &quot;command&quot;: &quot;bash -lc &#x27;REPO=$(git rev-parse --show-toplevel); uv run --project \\&quot;$REPO\/.codex\/hooks-runtime\\&quot; python \\&quot;$REPO\/.codex\/hooks\/post_tool_use_review.py\\&quot;&#x27;&quot;,\r\n            &quot;statusMessage&quot;: &quot;Reviewing command output&quot;\r\n          }\r\n        ]\r\n      }\r\n    ],\r\n    &quot;Stop&quot;: [\r\n      {\r\n        &quot;hooks&quot;: [\r\n          {\r\n            &quot;type&quot;: &quot;command&quot;,\r\n            &quot;command&quot;: &quot;bash -lc &#x27;REPO=$(git rev-parse --show-toplevel); uv run --project \\&quot;$REPO\/.codex\/hooks-runtime\\&quot; python \\&quot;$REPO\/.codex\/hooks\/stop_check.py\\&quot;&#x27;&quot;,\r\n            &quot;statusMessage&quot;: &quot;Checking completion&quot;\r\n          }\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u3053\u306e\u8a2d\u5b9a\u3067\u306f\u3001<span class=\"Post-inline\">PreToolUse<\/span>\u3001<span class=\"Post-inline\">PermissionRequest<\/span>\u3001<span class=\"Post-inline\">PostToolUse<\/span> \u306e\u5bfe\u8c61\u3092Bash\u306b\u7d5e\u3063\u3066\u3044\u307e\u3059\u3002<span class=\"Post-inline\">apply_patch<\/span> \u3084MCP\u30c4\u30fc\u30eb\u3082\u5bfe\u8c61\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u3001matcher\u3092 <span class=\"Post-inline\">^Bash$<\/span> \u304b\u3089 <span class=\"Post-inline\">Bash|apply_patch|mcp__filesystem__.*<\/span> \u306e\u3088\u3046\u306a\u6b63\u898f\u8868\u73fe\u3078\u5e83\u3052\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5bfe\u8c61\u3092\u5e83\u3052\u308b\u307b\u3069\u6a19\u6e96\u5165\u529b\u306e <span class=\"Post-inline\">tool_input<\/span> \u3084 <span class=\"Post-inline\">tool_response<\/span> \u306e\u5f62\u304c\u5897\u3048\u308b\u305f\u3081\u3001\u6700\u521d\u306fBash\u304b\u3089\u59cb\u3081\u308b\u307b\u3046\u304c\u691c\u8a3c\u3057\u3084\u3059\u3044\u3067\u3059\u3002<br \/>\n<span class=\"Post-inline\">hooks.json<\/span> \u3060\u3051\u3092\u7f6e\u3044\u3066\u3001\u53c2\u7167\u5148\u306ePython\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u72b6\u614b\u306b\u3059\u308b\u3068hook\u5b9f\u884c\u6642\u306b\u5931\u6557\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u4e0a\u8a18\u306e6\u30d5\u30a1\u30a4\u30eb\u3092 <span class=\"Post-inline\">.codex\/hooks\/<\/span> \u306b\u914d\u7f6e\u3057\u307e\u3059\u3002\u307e\u305a\u3001<span class=\"Post-inline\">UserPromptSubmit<\/span> \u306e\u7c21\u5358\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u4f8b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002\u6a19\u6e96\u5165\u529b\u304b\u3089\u53d7\u3051\u53d6\u3063\u305fJSON\u3092\u8aad\u307f\u53d6\u308a\u3001API\u30ad\u30fc\u3084\u79d8\u5bc6\u9375\u3089\u3057\u304d\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u3092\u30d6\u30ed\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">user_prompt_guard.py<\/div>\n<pre class=\"Copy\"><code>\r\nimport json\r\nimport re\r\nimport sys\r\n\r\n\r\npayload = json.load(sys.stdin)\r\nprompt = payload.get(&quot;prompt&quot;, &quot;&quot;)\r\n\r\npatterns = [\r\n    r&quot;sk-[A-Za-z0-9_-]{20,}&quot;,\r\n    r&quot;-----BEGIN (?:RSA |OPENSSH |EC )?PRIVATE KEY-----&quot;,\r\n    r&quot;AKIA[0-9A-Z]{16}&quot;,\r\n]\r\n\r\nif any(re.search(pattern, prompt) for pattern in patterns):\r\n    print(\r\n        json.dumps(\r\n            {\r\n                &quot;decision&quot;: &quot;block&quot;,\r\n                &quot;reason&quot;: &quot;\u79d8\u5bc6\u60c5\u5831\u306e\u53ef\u80fd\u6027\u304c\u3042\u308b\u6587\u5b57\u5217\u3092\u691c\u51fa\u3057\u305f\u305f\u3081\u3001\u9001\u4fe1\u3092\u505c\u6b62\u3057\u307e\u3057\u305f\u3002&quot;,\r\n            },\r\n            ensure_ascii=False,\r\n        )\r\n    )\r\n<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u306f\u3042\u304f\u307e\u3067\u6700\u5c0f\u69cb\u6210\u3067\u3059\u3002\u672c\u756a\u904b\u7528\u3067\u306f\u3001\u691c\u51fa\u30eb\u30fc\u30eb\u3092\u30c1\u30fc\u30e0\u306e\u60c5\u5831\u7ba1\u7406\u57fa\u6e96\u306b\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u904e\u691c\u77e5\u3068\u691c\u77e5\u6f0f\u308c\u306e\u4e21\u65b9\u304c\u8d77\u3053\u308a\u5f97\u308b\u305f\u3081\u3001hook\u3060\u3051\u306b\u4f9d\u5b58\u305b\u305a\u3001\u5165\u529b\u30eb\u30fc\u30eb\u3001\u6a29\u9650\u8a2d\u5b9a\u3001\u30ec\u30d3\u30e5\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u6b8b\u308a\u306e5\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u5f8c\u6bb5\u306e\u5404hook\u30a4\u30d9\u30f3\u30c8\u306e\u8aac\u660e\u3067\u540c\u540d\u306e\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3068\u3057\u3066\u63b2\u8f09\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"section-4\" class=\"Heading Title Title--m\">WSL2\u5229\u7528\u6642\u306e\u91cd\u8981\u306a\u843d\u3068\u3057\u7a74<\/h3>\n<p>Windows\u7248Codex\u30a2\u30d7\u30ea\u3067WSL2\u4e0a\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u958b\u3044\u3066\u3044\u308b\u5834\u5408\u3067\u3082\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u3068WSL2\u5185\u306eCodex CLI\u304c\u540c\u3058\u8a2d\u5b9a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u6319\u52d5\u306fHooks\u3092\u6709\u52b9\u5316\u3059\u308b\u969b\u306b\u898b\u843d\u3068\u3057\u3084\u3059\u3044\u70b9\u3067\u3059\u3002<br \/>\nOpenAI\u306e<a href=\"https:\/\/developers.openai.com\/codex\/app\/windows\" class=\"Ext\">Windows\u5411\u3051\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3067\u306f\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u306fWindows\u30cd\u30a4\u30c6\u30a3\u30d6\u7248Codex\u3068\u540c\u3058\u304f <span class=\"Post-inline\">%USERPROFILE%\\.codex<\/span> \u3092Codex home\u3068\u3057\u3066\u4f7f\u3046\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4e00\u65b9\u3067\u3001WSL2\u5185\u3067Codex CLI\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3001\u65e2\u5b9a\u3067\u306fLinux\u5074\u306e <span class=\"Post-inline\">~\/.codex<\/span> \u304c\u4f7f\u308f\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001WSL2\u5185\u306eCLI\u3067 <span class=\"Post-inline\">\/hooks<\/span> \u3092\u958b\u3044\u3066\u30ec\u30d3\u30e5\u30fc\u3057\u3001<span class=\"Post-inline\">~\/.codex\/config.toml<\/span> \u306b <span class=\"Post-inline\">hooks.state<\/span> \u3084 <span class=\"Post-inline\">trusted_hash<\/span> \u304c\u4f5c\u6210\u3055\u308c\u3066\u3082\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u5074\u3067\u306f\u540c\u3058\u4fe1\u983c\u72b6\u614b\u3068\u3057\u3066\u6271\u308f\u308c\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-hooks-no-hooks-found.png\" alt=\"Windows\u7248Codex\u30a2\u30d7\u30ea\u3067hooks\u304c\u691c\u51fa\u3055\u308c\u306a\u3044\u753b\u9762\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">Windows\u7248Codex\u30a2\u30d7\u30ea\u3067\u306f\u3001WSL2\u5074\u3067\u30ec\u30d3\u30e5\u30fc\u6e08\u307f\u3067\u3082 No hooks found \u3068\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<p>\u3053\u306e\u72b6\u614b\u3067\u306f\u3001WSL2\u5074\u306e <span class=\"Post-inline\">config.toml<\/span> \u306b\u306f <span class=\"Post-inline\">trusted_hash<\/span> \u304c\u5b58\u5728\u3059\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u306eHooks\u753b\u9762\u306b\u306f <span class=\"Post-inline\">No hooks found<\/span> \u3084 <span class=\"Post-inline\">Projects with configured hooks will appear here<\/span> \u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306fhook\u5b9a\u7fa9\u304c\u7834\u640d\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u3088\u308a\u3001\u30ec\u30d3\u30e5\u30fc\u72b6\u614b\u3092\u4fdd\u5b58\u3057\u305fCodex home\u304cWindows\u7248Codex\u30a2\u30d7\u30ea\u306e\u53c2\u7167\u5148\u3068\u4e00\u81f4\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u539f\u56e0\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-wsl-trusted-hash.png\" alt=\"WSL2\u5074\u306econfig.toml\u306btrusted_hash\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u753b\u9762\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">WSL2\u5074\u306eCodex CLI\u3067\u30ec\u30d3\u30e5\u30fc\u3059\u308b\u3068\u3001Linux\u5074\u306e ~\/.codex\/config.toml \u306b\u4fe1\u983c\u72b6\u614b\u304c\u4fdd\u5b58\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<h4 id=\"section-4-1\" class=\"Heading Title Title--s\">\u89e3\u6d88\u7b56: CODEX_HOME\u3092Windows\u5074\u306b\u5411\u3051\u308b<\/h4>\n<p>\u3053\u306e\u554f\u984c\u3092\u907f\u3051\u308b\u306b\u306f\u3001WSL2\u5185\u306eCodex CLI\u304b\u3089\u3082Windows\u7248Codex\u30a2\u30d7\u30ea\u3068\u540c\u3058Codex home\u3092\u53c2\u7167\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002WSL2\u306e\u30b7\u30a7\u30eb\u3067\u6b21\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">bash<\/div>\n<pre class=\"Copy\"><code>\r\nexport CODEX_HOME=&quot;\/mnt\/c\/Users\/YOUR_WINDOWS_USER\/.codex&quot;\r\n<\/code><\/pre>\n<p>\u6bce\u56de\u8a2d\u5b9a\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u6052\u4e45\u7684\u306b\u4f7f\u3046\u5834\u5408\u306f <span class=\"Post-inline\">~\/.bashrc<\/span> \u3084 <span class=\"Post-inline\">~\/.zshrc<\/span> \u306b\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">bash<\/div>\n<pre class=\"Copy\"><code>\r\necho &#x27;export CODEX_HOME=&quot;\/mnt\/c\/Users\/YOUR_WINDOWS_USER\/.codex&quot;&#x27; &gt;&gt; ~\/.bashrc\r\nsource ~\/.bashrc\r\n<\/code><\/pre>\n<p>\u8a2d\u5b9a\u5f8c\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067WSL2\u5185\u306eCodex CLI\u304cWindows\u5074\u306eCodex home\u3092\u53c2\u7167\u3059\u308b\u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">bash<\/div>\n<pre class=\"Copy\"><code>\r\necho &quot;$CODEX_HOME&quot;\r\nls &quot;$CODEX_HOME&quot;\r\n<\/code><\/pre>\n<p>\u305d\u306e\u3046\u3048\u3067\u3001\u3042\u3089\u305f\u3081\u3066Codex CLI\u307e\u305f\u306fWindows\u7248Codex\u30a2\u30d7\u30ea\u5074\u3067 <span class=\"Post-inline\">\/hooks<\/span> \u3092\u958b\u304d\u3001\u5bfe\u8c61\u306ehook\u3092\u30ec\u30d3\u30e5\u30fc\u3057\u3066\u4fe1\u983c\u3057\u307e\u3059\u3002\u3059\u3067\u306bWSL2\u5074\u306e <span class=\"Post-inline\">~\/.codex\/config.toml<\/span> \u306b <span class=\"Post-inline\">trusted_hash<\/span> \u304c\u4f5c\u6210\u6e08\u307f\u3067\u3042\u3063\u3066\u3082\u3001<span class=\"Post-inline\">CODEX_HOME<\/span> \u3092\u5207\u308a\u66ff\u3048\u305f\u5f8c\u306fWindows\u5074\u306e <span class=\"Post-inline\">%USERPROFILE%\\.codex\\config.toml<\/span> \u306b\u5bfe\u3057\u3066\u518d\u5ea6\u30ec\u30d3\u30e5\u30fc\u3059\u308b\u3001\u3068\u3044\u3046\u7406\u89e3\u3067\u9032\u3081\u308b\u3068\u6df7\u4e71\u3092\u907f\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-codex-home-shared.png\" alt=\"CODEX_HOME\u3092Windows\u5074\u306e.codex\u3078\u5411\u3051\u305f\u78ba\u8a8d\u753b\u9762\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">CODEX_HOME\u3092Windows\u5074\u306e .codex \u306b\u5411\u3051\u308b\u3053\u3068\u3067\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u3068WSL2\u5185Codex CLI\u306e\u8a2d\u5b9a\u3092\u5171\u6709\u3067\u304d\u307e\u3059\u3002<\/div>\n<p>\u6574\u7406\u3059\u308b\u3068\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u3067WSL2 agent\u3092\u4f7f\u3046\u5834\u5408\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5834\u6240\u3001agent\u306e\u5b9f\u884c\u74b0\u5883\u3001Codex home\u306e\u5834\u6240\u3092\u5206\u3051\u3066\u8003\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002WSL2\u4e0a\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u958b\u3044\u3066\u3044\u308b\u3053\u3068\u306f\u3001WSL2\u5074\u306e <span class=\"Post-inline\">~\/.codex<\/span> \u3092Windows\u7248Codex\u30a2\u30d7\u30ea\u304c\u305d\u306e\u307e\u307e\u4f7f\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u305b\u3093\u3002Hooks\u3092WSL2\u5185CLI\u3068Windows\u7248Codex\u30a2\u30d7\u30ea\u306e\u4e21\u65b9\u304b\u3089\u6271\u3046\u5834\u5408\u306f\u3001<span class=\"Post-inline\">CODEX_HOME<\/span> \u3092\u660e\u793a\u3057\u3066\u3001\u8a2d\u5b9a\u3068\u4fe1\u983c\u72b6\u614b\u306e\u4fdd\u5b58\u5148\u3092\u305d\u308d\u3048\u3066\u304a\u304f\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h3 id=\"section-5\" class=\"Heading Title Title--m\">\u696d\u52d9\u30d5\u30ed\u30fc\u5225\u306b\u898b\u308bHooks\u306e\u7d44\u307f\u5408\u308f\u305b<\/h3>\n<p>Hooks\u306f\u30011\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u3060\u3051\u3067\u5b8c\u7d50\u3055\u305b\u308b\u3088\u308a\u3082\u3001\u8907\u6570\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u52b9\u679c\u304c\u51fa\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u524d\u306b\u6a5f\u5bc6\u60c5\u5831\u3092\u6b62\u3081\u3001\u30c4\u30fc\u30eb\u5b9f\u884c\u524d\u306b\u5371\u967a\u64cd\u4f5c\u3092\u6b62\u3081\u3001\u4f5c\u696d\u7d42\u4e86\u524d\u306b\u691c\u8a3c\u6f0f\u308c\u3092\u6b62\u3081\u308b\u3001\u3068\u3044\u3046\u3088\u3046\u306b\u6bb5\u968e\u3054\u3068\u306b\u5f79\u5272\u3092\u5206\u3051\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/hooks-use-case-map.png\" alt=\"Hooks\u6d3b\u7528\u30de\u30c3\u30d7\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">\u5165\u529b\u3001\u5b9f\u884c\u3001\u627f\u8a8d\u3001\u691c\u8a3c\u3001\u7d42\u4e86\u306e\u5404\u6bb5\u968e\u306bHooks\u3092\u914d\u7f6e\u3057\u3001Codex\u306e\u4f5c\u696d\u3092\u30c1\u30fc\u30e0\u306e\u904b\u7528\u30eb\u30fc\u30eb\u306b\u8fd1\u3065\u3051\u308b\u30a4\u30e1\u30fc\u30b8<\/div>\n<p>\u5b9f\u52d9\u3067\u4f7f\u3044\u3084\u3059\u3044\u7d44\u307f\u5408\u308f\u305b\u4f8b\u3092\u6574\u7406\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u696d\u52d9\u30d5\u30ed\u30fc<\/th>\n<th>\u4f7f\u3046hook<\/th>\n<th>\u5b9f\u73fe\u3057\u305f\u3044\u3053\u3068<\/th>\n<\/tr>\n<tr>\n<td>\u6a5f\u5bc6\u60c5\u5831\u306e\u6df7\u5165\u9632\u6b62<\/td>\n<td><span class=\"Post-inline\">UserPromptSubmit<\/span>\u3001<span class=\"Post-inline\">PreToolUse<\/span><\/td>\n<td>\u30d7\u30ed\u30f3\u30d7\u30c8\u3084\u30b3\u30de\u30f3\u30c9\u306b\u79d8\u5bc6\u60c5\u5831\u304c\u542b\u307e\u308c\u308b\u524d\u63d0\u3092\u65e9\u671f\u306b\u691c\u51fa\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u7834\u58ca\u7684\u64cd\u4f5c\u306e\u6291\u6b62<\/td>\n<td><span class=\"Post-inline\">PreToolUse<\/span>\u3001<span class=\"Post-inline\">PermissionRequest<\/span><\/td>\n<td>\u524a\u9664\u3001\u5f37\u5236\u30ea\u30bb\u30c3\u30c8\u3001\u6a29\u9650\u5909\u66f4\u3001\u5916\u90e8\u516c\u958b\u306a\u3069\u3092\u4eba\u9593\u306e\u78ba\u8a8d\u5bfe\u8c61\u306b\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u30c6\u30b9\u30c8\u5b9f\u884c\u306e\u5fb9\u5e95<\/td>\n<td><span class=\"Post-inline\">PostToolUse<\/span>\u3001<span class=\"Post-inline\">Stop<\/span><\/td>\n<td>\u5931\u6557\u30ed\u30b0\u3092\u8aad\u307f\u53d6\u308a\u3001\u672a\u691c\u8a3c\u306e\u307e\u307e\u7d42\u4e86\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u66f4\u65b0\u306e\u4fc3\u9032<\/td>\n<td><span class=\"Post-inline\">SessionStart<\/span>\u3001<span class=\"Post-inline\">Stop<\/span><\/td>\n<td>API\u5909\u66f4\u3084\u8a2d\u5b9a\u5909\u66f4\u304c\u3042\u3063\u305f\u5834\u5408\u306bREADME\u3084\u8a2d\u8a08\u30e1\u30e2\u306e\u78ba\u8a8d\u3092\u4fc3\u3059<\/td>\n<\/tr>\n<tr>\n<td>\u4f9d\u5b58\u95a2\u4fc2\u8ffd\u52a0\u306e\u7d71\u5236<\/td>\n<td><span class=\"Post-inline\">PreToolUse<\/span>\u3001<span class=\"Post-inline\">PermissionRequest<\/span>\u3001<span class=\"Post-inline\">Stop<\/span><\/td>\n<td>\u30d1\u30c3\u30b1\u30fc\u30b8\u8ffd\u52a0\u6642\u306b\u7406\u7531\u3001\u5f71\u97ff\u7bc4\u56f2\u3001\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u5dee\u5206\u3092\u78ba\u8a8d\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u30c1\u30fc\u30e0\u6a19\u6e96\u306e\u8aad\u307f\u8fbc\u307f<\/td>\n<td><span class=\"Post-inline\">SessionStart<\/span>\u3001<span class=\"Post-inline\">UserPromptSubmit<\/span><\/td>\n<td>\u30d6\u30e9\u30f3\u30c1\u7a2e\u5225\u3084\u4f5c\u696d\u5185\u5bb9\u306b\u5fdc\u3058\u3066\u3001\u5fc5\u8981\u306a\u30eb\u30fc\u30eb\u3060\u3051\u3092Codex\u3078\u6e21\u3059<\/td>\n<\/tr>\n<\/table>\n<p>\u3053\u306e\u3088\u3046\u306b\u6574\u7406\u3057\u3066\u304a\u304f\u3068\u3001hook\u3092\u300c\u4fbf\u5229\u305d\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u7f6e\u304d\u5834\u300d\u3068\u3057\u3066\u5897\u3084\u3059\u306e\u3067\u306f\u306a\u304f\u3001\u3069\u306e\u30ea\u30b9\u30af\u3092\u3069\u306e\u6bb5\u968e\u3067\u6271\u3046\u304b\u3092\u8a2d\u8a08\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3 id=\"section-6\" class=\"Heading Title Title--m\">6\u3064\u306eHook\u6d3b\u7528\u30a2\u30a4\u30c7\u30a2<\/h3>\n<p>\u3053\u3053\u304b\u3089\u306f\u30016\u7a2e\u985e\u306ehook\u30a4\u30d9\u30f3\u30c8\u3054\u3068\u306b\u3001Windows\u7248Codex\u30a2\u30d7\u30ea\u3068WSL2\u74b0\u5883\u3067\u4f7f\u3044\u3084\u3059\u3044\u6d3b\u7528\u30a2\u30a4\u30c7\u30a2\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n<h4 id=\"section-6-1\" class=\"Heading Title Title--s\">1. SessionStart\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u6587\u8108\u3092\u88dc\u3046<\/h4>\n<p><span class=\"Post-inline\">SessionStart<\/span> \u306f\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u958b\u59cb\u6642\u3001\u518d\u958b\u6642\u3001\u30af\u30ea\u30a2\u6642\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001<span class=\"Post-inline\">source<\/span> \u306b <span class=\"Post-inline\">startup<\/span>\u3001<span class=\"Post-inline\">resume<\/span>\u3001<span class=\"Post-inline\">clear<\/span> \u306e\u3044\u305a\u308c\u304b\u304c\u6e21\u3055\u308c\u3001\u6a19\u6e96\u51fa\u529b\u306e\u30c6\u30ad\u30b9\u30c8\u3084JSON\u306e <span class=\"Post-inline\">additionalContext<\/span> \u3092\u8ffd\u52a0\u306e\u958b\u767a\u8005\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u6e21\u305b\u308b\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u6d3b\u7528\u4f8b\u3068\u3057\u3066\u306f\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u5185\u306e\u8efd\u91cf\u306a\u904b\u7528\u30e1\u30e2\u3092\u8aad\u307f\u8fbc\u307f\u3001Codex\u306b\u88dc\u8db3\u3059\u308b\u4f7f\u3044\u65b9\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001WSL2\u74b0\u5883\u3067\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u7f6e\u304d\u5834\u6240\u3001Docker\u5229\u7528\u6642\u306e\u6ce8\u610f\u70b9\u3001Windows\u5074\u30d1\u30b9\u3092\u907f\u3051\u308b\u7406\u7531\u306a\u3069\u3092\u6bce\u56de\u77ed\u304f\u6e21\u305b\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">session_start.py<\/div>\n<pre class=\"Copy\"><code>\r\nimport json\r\n\r\n\r\ncontext = &quot;&quot;&quot;\r\n\u3053\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u306fCodex agent\u3092WSL2\u3067\u52d5\u304b\u3057\u307e\u3059\u3002\r\n\u4f9d\u5b58\u95a2\u4fc2\u306e\u8ffd\u52a0\u306f\u4e8b\u524d\u78ba\u8a8d\u3092\u53d6\u308a\u3001\u4f5c\u696d\u7d42\u4e86\u524d\u306b\u95a2\u9023\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\nWindows\u5074\u306e\u30d1\u30b9\u3067\u306f\u306a\u304f\u3001WSL\u5074\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d1\u30b9\u3092\u57fa\u6e96\u306b\u4f5c\u696d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n&quot;&quot;&quot;\r\n\r\nprint(\r\n    json.dumps(\r\n        {\r\n            &quot;hookSpecificOutput&quot;: {\r\n                &quot;hookEventName&quot;: &quot;SessionStart&quot;,\r\n                &quot;additionalContext&quot;: context.strip(),\r\n            }\r\n        },\r\n        ensure_ascii=False,\r\n    )\r\n)\r\n<\/code><\/pre>\n<p>AGENTS.md\u306b\u3082\u540c\u69d8\u306e\u5185\u5bb9\u3092\u66f8\u3051\u307e\u3059\u304c\u3001SessionStart\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u72b6\u6cc1\u306b\u5fdc\u3058\u305f\u6587\u8108\u3092\u751f\u6210\u3067\u304d\u308b\u70b9\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u73fe\u5728\u306e\u30d6\u30e9\u30f3\u30c1\u540d\u3001\u672a\u30b3\u30df\u30c3\u30c8\u5dee\u5206\u306e\u6709\u7121\u3001\u30ed\u30fc\u30ab\u30eb\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5b58\u5728\u78ba\u8a8d\u306a\u3069\u3092\u3082\u3068\u306b\u3001\u5fc5\u8981\u306a\u6ce8\u610f\u3060\u3051\u3092\u6e21\u3059\u8a2d\u8a08\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4 id=\"section-6-2\" class=\"Heading Title Title--s\">2. UserPromptSubmit\u3067\u5165\u529b\u3092\u691c\u67fb\u3059\u308b<\/h4>\n<p><span class=\"Post-inline\">UserPromptSubmit<\/span> \u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u304cCodex\u306b\u9001\u3089\u308c\u308b\u76f4\u524d\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u30d7\u30ed\u30f3\u30d7\u30c8\u672c\u6587\u3092\u53d7\u3051\u53d6\u308c\u308b\u305f\u3081\u3001\u79d8\u5bc6\u60c5\u5831\u306e\u8cbc\u308a\u4ed8\u3051\u3001\u9867\u5ba2\u540d\u3084\u500b\u4eba\u60c5\u5831\u306e\u6df7\u5165\u3001\u5371\u967a\u306a\u4f9d\u983c\u6587\u306e\u691c\u67fb\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5b9f\u52d9\u3067\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u691c\u67fb\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u691c\u67fb\u5bfe\u8c61<\/th>\n<th>hook\u306e\u52d5\u304d<\/th>\n<\/tr>\n<tr>\n<td>API\u30ad\u30fc\u3084\u79d8\u5bc6\u9375<\/td>\n<td>\u9001\u4fe1\u3092\u30d6\u30ed\u30c3\u30af\u3057\u3001\u30de\u30b9\u30ad\u30f3\u30b0\u3057\u3066\u518d\u5165\u529b\u3059\u308b\u3088\u3046\u6848\u5185\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u500b\u4eba\u60c5\u5831\u3092\u542b\u3080\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u6587\u9762<\/td>\n<td>\u9001\u4fe1\u524d\u306b\u78ba\u8a8d\u3092\u6c42\u3081\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u672c\u756a\u30c7\u30fc\u30bf\u306e\u8cbc\u308a\u4ed8\u3051<\/td>\n<td>\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3084\u8981\u7d04\u3078\u306e\u7f6e\u304d\u63db\u3048\u3092\u4fc3\u3059<\/td>\n<\/tr>\n<tr>\n<td>\u66d6\u6627\u306a\u5927\u898f\u6a21\u5909\u66f4\u4f9d\u983c<\/td>\n<td>\u5148\u306b\u8abf\u67fb\u3084\u8a08\u753b\u3092\u6c42\u3081\u308b\u8ffd\u52a0\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u6e21\u3059<\/td>\n<\/tr>\n<tr>\n<td>\u672c\u756a\u969c\u5bb3\u306e\u30ed\u30b0\u8cbc\u308a\u4ed8\u3051<\/td>\n<td>\u4e8b\u8c61\u306e\u8981\u7d04\u3068\u30de\u30b9\u30ad\u30f3\u30b0\u5f8c\u306e\u518d\u5165\u529b\u3092\u4fc3\u3059<\/td>\n<\/tr>\n<tr>\n<td>\u9867\u5ba2\u56fa\u6709\u306e\u8a2d\u5b9a\u5024<\/td>\n<td>\u6c4e\u7528\u540d\u3078\u306e\u7f6e\u63db\u3084\u30b5\u30f3\u30d7\u30eb\u5024\u5316\u3092\u4fc3\u3059<\/td>\n<\/tr>\n<\/table>\n<p>Codex\u306f\u30ed\u30fc\u30ab\u30eb\u306e\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3092\u6271\u3048\u308b\u305f\u3081\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u8cbc\u308a\u4ed8\u3051\u308b\u60c5\u5831\u306e\u7ba1\u7406\u306f\u91cd\u8981\u3067\u3059\u3002UserPromptSubmit\u3092\u4f7f\u3046\u3068\u3001\u9001\u4fe1\u524d\u306e\u6700\u5f8c\u306e\u78ba\u8a8d\u70b9\u3092\u30c1\u30fc\u30e0\u306e\u30eb\u30fc\u30eb\u3068\u3057\u3066\u7528\u610f\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-user-prompt-blocked-1.png\" alt=\"\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u30d6\u30ed\u30c3\u30af\u306e\u753b\u9762 1\" class=\"content_img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-user-prompt-blocked-2.png\" alt=\"\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u30d6\u30ed\u30c3\u30af\u306e\u753b\u9762 2\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">UserPromptSubmit hook\u304c\u79d8\u5bc6\u60c5\u5831\u3089\u3057\u304d\u6587\u5b57\u5217\u3092\u691c\u51fa\u3057\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u9001\u4fe1\u3092\u505c\u6b62\u3057\u305f\u753b\u9762\u4f8b<\/div>\n<p>\u3055\u3089\u306b\u3001UserPromptSubmit\u306f\u30d6\u30ed\u30c3\u30af\u3060\u3051\u3067\u306a\u304f\u8ffd\u52a0\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u6ce8\u5165\u306b\u3082\u4f7f\u3048\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u300c\u672c\u756a\u969c\u5bb3\u3092\u8abf\u67fb\u3057\u3066\u300d\u3068\u5165\u529b\u3057\u305f\u5834\u5408\u306b\u3001\u300c\u307e\u305a\u30ed\u30b0\u306e\u6a5f\u5bc6\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u3001\u5909\u66f4\u524d\u306b\u8abf\u67fb\u7d50\u679c\u3092\u8aac\u660e\u3059\u308b\u300d\u3068\u3044\u3046\u6307\u793a\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u62d2\u5426\u3059\u308b\u307b\u3069\u3067\u306f\u306a\u3044\u304c\u3001\u4f5c\u696d\u65b9\u91dd\u3092\u88dc\u6b63\u3057\u305f\u3044\u5834\u5408\u306b\u6709\u52b9\u3067\u3059\u3002<\/p>\n<h4 id=\"section-6-3\" class=\"Heading Title Title--s\">3. PreToolUse\u3067\u5371\u967a\u306a\u64cd\u4f5c\u3092\u4e8b\u524d\u306b\u6b62\u3081\u308b<\/h4>\n<p><span class=\"Post-inline\">PreToolUse<\/span> \u306f\u3001Bash\u3001<span class=\"Post-inline\">apply_patch<\/span>\u3001MCP\u30c4\u30fc\u30eb\u547c\u3073\u51fa\u3057\u306a\u3069\u3001\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30c4\u30fc\u30eb\u306e\u5b9f\u884c\u524d\u306b\u52d5\u304d\u307e\u3059\u3002Bash\u306e\u5834\u5408\u306f\u3001\u5b9f\u884c\u4e88\u5b9a\u306e\u30b3\u30de\u30f3\u30c9\u304c <span class=\"Post-inline\">tool_input.command<\/span> \u306b\u5165\u308a\u307e\u3059\u3002<br \/>\n\u305f\u3068\u3048\u3070\u3001\u6b21\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u691c\u51fa\u3057\u3066\u62d2\u5426\u3067\u304d\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u5bfe\u8c61<\/th>\n<th>\u5224\u5b9a\u4f8b<\/th>\n<\/tr>\n<tr>\n<td>\u7834\u58ca\u7684\u306a\u524a\u9664<\/td>\n<td><span class=\"Post-inline\">rm -rf<\/span>\u3001<span class=\"Post-inline\">git clean -fdx<\/span>\u3001<span class=\"Post-inline\">git reset &#8211;hard<\/span> \u3092\u542b\u3080\u5834\u5408\u306b\u62d2\u5426\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u6a29\u9650\u5909\u66f4<\/td>\n<td><span class=\"Post-inline\">chmod -R 777<\/span> \u306e\u3088\u3046\u306a\u5e83\u3059\u304e\u308b\u6a29\u9650\u5909\u66f4\u3092\u62d2\u5426\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u4f9d\u5b58\u95a2\u4fc2\u5909\u66f4<\/td>\n<td><span class=\"Post-inline\">npm install<\/span>\u3001<span class=\"Post-inline\">uv add<\/span>\u3001<span class=\"Post-inline\">pip install<\/span> \u3092\u627f\u8a8d\u30d5\u30ed\u30fc\u3078\u8a98\u5c0e\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u64cd\u4f5c<\/td>\n<td><span class=\"Post-inline\">curl<\/span>\u3001<span class=\"Post-inline\">wget<\/span>\u3001\u5916\u90e8\u30c7\u30d7\u30ed\u30a4\u30b3\u30de\u30f3\u30c9\u3092\u691c\u51fa\u3057\u3066\u7406\u7531\u78ba\u8a8d\u3092\u6c42\u3081\u308b<\/td>\n<\/tr>\n<tr>\n<td>Git\u5c65\u6b74\u64cd\u4f5c<\/td>\n<td>rebase\u3001force push\u3001\u30bf\u30b0\u64cd\u4f5c\u3092\u78ba\u8a8d\u5bfe\u8c61\u306b\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u751f\u6210\u7269\u306e\u76f4\u63a5\u7de8\u96c6<\/td>\n<td>generated\u3001dist\u3001build\u914d\u4e0b\u306e\u7de8\u96c6\u3092\u8ffd\u52a0\u8aac\u660e\u5bfe\u8c61\u306b\u3059\u308b<\/td>\n<\/tr>\n<\/table>\n<p>\u6700\u5c0f\u9650\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u4f8b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<div class=\"Pre-title\">pre_tool_use_policy.py<\/div>\n<pre class=\"Copy\"><code>\r\nimport json\r\nimport re\r\nimport sys\r\n\r\n\r\npayload = json.load(sys.stdin)\r\ntool_input = payload.get(&quot;tool_input&quot;, {})\r\ncommand = tool_input.get(&quot;command&quot;, &quot;&quot;)\r\n\r\nblocked_patterns = [\r\n    r&quot;\\brm\\s+-rf\\b&quot;,\r\n    r&quot;\\bgit\\s+reset\\s+--hard\\b&quot;,\r\n    r&quot;\\bgit\\s+clean\\s+-fdx\\b&quot;,\r\n    r&quot;\\bchmod\\s+-R\\s+777\\b&quot;,\r\n]\r\n\r\nif any(re.search(pattern, command) for pattern in blocked_patterns):\r\n    print(\r\n        json.dumps(\r\n            {\r\n                &quot;hookSpecificOutput&quot;: {\r\n                    &quot;hookEventName&quot;: &quot;PreToolUse&quot;,\r\n                    &quot;permissionDecision&quot;: &quot;deny&quot;,\r\n                    &quot;permissionDecisionReason&quot;: &quot;\u30ea\u30dd\u30b8\u30c8\u30ea\u30dd\u30ea\u30b7\u30fc\u306b\u3088\u308a\u5371\u967a\u306a\u30b3\u30de\u30f3\u30c9\u3092\u30d6\u30ed\u30c3\u30af\u3057\u307e\u3057\u305f\u3002&quot;,\r\n                }\r\n            },\r\n            ensure_ascii=False,\r\n        )\r\n    )\r\n<\/code><\/pre>\n<p>\u3053\u306ehook\u306f\u7279\u306b\u6709\u7528\u3067\u3059\u304c\u3001\u5b8c\u5168\u306a\u5f37\u5236\u5883\u754c\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3082\u3001\u3059\u3079\u3066\u306e\u30b7\u30a7\u30eb\u547c\u3073\u51fa\u3057\u3092\u5b8c\u5168\u306b\u6355\u6349\u3059\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3053\u3068\u3001\u5225\u306e\u30c4\u30fc\u30eb\u7d4c\u8def\u3067\u540c\u7b49\u306e\u4f5c\u696d\u304c\u884c\u308f\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u304c\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001sandbox\u3001\u627f\u8a8d\u30dd\u30ea\u30b7\u30fc\u3001Git\u5dee\u5206\u30ec\u30d3\u30e5\u30fc\u3068\u4f75\u7528\u3059\u308b\u524d\u63d0\u3067\u8a2d\u8a08\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-pre-tool-use-blocked-1.png\" alt=\"\u5371\u967a\u30b3\u30de\u30f3\u30c9\u306e\u30d6\u30ed\u30c3\u30af\u753b\u9762 1\" class=\"content_img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-pre-tool-use-blocked-2.png\" alt=\"\u5371\u967a\u30b3\u30de\u30f3\u30c9\u306e\u30d6\u30ed\u30c3\u30af\u753b\u9762 2\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">PreToolUse hook\u304c\u7834\u58ca\u7684\u306a\u30b3\u30de\u30f3\u30c9\u3092\u691c\u51fa\u3057\u3001\u5b9f\u884c\u524d\u306b\u30d6\u30ed\u30c3\u30af\u3057\u305f\u753b\u9762\u4f8b<\/div>\n<p>PreToolUse\u3067\u306f\u3001\u3059\u3079\u3066\u3092\u62d2\u5426\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u8ffd\u52a0\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3060\u3051\u3092\u8fd4\u3059\u8a2d\u8a08\u3082\u6709\u52b9\u3067\u3059\u3002\u305f\u3068\u3048\u3070\u3001<span class=\"Post-inline\">package.json<\/span> \u3084\u30ed\u30c3\u30af\u30d5\u30a1\u30a4\u30eb\u306b\u89e6\u308c\u308b\u30b3\u30de\u30f3\u30c9\u3092\u691c\u51fa\u3057\u305f\u5834\u5408\u306b\u3001\u300c\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306f\u3001\u8ffd\u52a0\u7406\u7531\u3001\u4ee3\u66ff\u6848\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u3001\u30d3\u30eb\u30c9\u5f71\u97ff\u3092\u8aac\u660e\u3059\u308b\u300d\u3068\u3044\u3046\u6587\u8108\u3092Codex\u306b\u6e21\u305b\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5909\u66f4\u305d\u306e\u3082\u306e\u306f\u9032\u3081\u3064\u3064\u3001\u30ec\u30d3\u30e5\u30fc\u306b\u5fc5\u8981\u306a\u8aac\u660e\u3092\u51fa\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4 id=\"section-6-4\" class=\"Heading Title Title--s\">4. PermissionRequest\u3067\u627f\u8a8d\u5224\u65ad\u3092\u6a19\u6e96\u5316\u3059\u308b<\/h4>\n<p><span class=\"Post-inline\">PermissionRequest<\/span> \u306f\u3001Codex\u304c\u30e6\u30fc\u30b6\u30fc\u306b\u627f\u8a8d\u3092\u6c42\u3081\u308b\u76f4\u524d\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u6a29\u9650\u6607\u683c\u3084\u7ba1\u7406\u3055\u308c\u305f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30af\u30bb\u30b9\u304c\u5fc5\u8981\u306a\u5834\u5408\u3067\u3059\u3002\u3053\u306ehook\u306f\u3001\u8a31\u53ef\u3001\u62d2\u5426\u3001\u307e\u305f\u306f\u901a\u5e38\u306e\u627f\u8a8d\u30d7\u30ed\u30f3\u30d7\u30c8\u3078\u306e\u59d4\u8b72\u3092\u8fd4\u305b\u307e\u3059\u3002<br \/>\nPreToolUse\u304c\u300c\u5b9f\u884c\u524d\u306e\u4e00\u822c\u7684\u306a\u691c\u67fb\u300d\u3060\u3068\u3059\u308c\u3070\u3001PermissionRequest\u306f\u300c\u627f\u8a8d\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u306b\u5bfe\u3059\u308b\u30c1\u30fc\u30e0\u6a19\u6e96\u306e\u5224\u65ad\u300d\u3092\u7f6e\u304f\u5834\u6240\u3067\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u30d1\u30bf\u30fc\u30f3<\/th>\n<th>\u8fd4\u3059\u5224\u65ad<\/th>\n<\/tr>\n<tr>\n<td>\u793e\u5185\u3067\u8a31\u53ef\u6e08\u307f\u306e\u4f9d\u5b58\u53d6\u5f97\u5148<\/td>\n<td>allow\u3067\u627f\u8a8d\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u7701\u7565\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u672c\u756a\u74b0\u5883\u3078\u5f71\u97ff\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/td>\n<td>deny\u3067\u62d2\u5426\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u5224\u65ad\u306b\u4eba\u9593\u306e\u78ba\u8a8d\u304c\u5fc5\u8981\u306a\u64cd\u4f5c<\/td>\n<td>hook\u3067\u306f\u6c7a\u3081\u305a\u3001\u901a\u5e38\u306e\u627f\u8a8d\u30d5\u30ed\u30fc\u306b\u6e21\u3059<\/td>\n<\/tr>\n<tr>\n<td>\u4e00\u6642\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u306e\u66f8\u304d\u8fbc\u307f<\/td>\n<td>\u4f5c\u696d\u5185\u5bb9\u306b\u5fdc\u3058\u3066allow\u306b\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u30ea\u30dd\u30b8\u30c8\u30ea\u5916\u306e\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c<\/td>\n<td>deny\u306b\u3059\u308b\u304b\u3001\u901a\u5e38\u306e\u627f\u8a8d\u30d5\u30ed\u30fc\u306b\u6e21\u3059<\/td>\n<\/tr>\n<\/table>\n<p><span class=\"Post-inline\">PermissionRequest<\/span> \u306e\u6700\u5c0f\u9650\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u4f8b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u672c\u756a\u74b0\u5883\u306b\u5f71\u97ff\u3057\u305d\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3084force push\u3092\u62d2\u5426\u3057\u3001\u305d\u308c\u4ee5\u5916\u306f\u4f55\u3082\u8fd4\u3055\u305a\u306b\u901a\u5e38\u306e\u627f\u8a8d\u30d5\u30ed\u30fc\u3078\u59d4\u8b72\u3057\u307e\u3059\u3002\u6700\u521d\u304b\u3089\u81ea\u52d5\u627f\u8a8d\u3092\u5e83\u304f\u4f7f\u3046\u3088\u308a\u3001deny\u3068\u59d4\u8b72\u3092\u4e2d\u5fc3\u306b\u3057\u305f\u307b\u3046\u304c\u904b\u7528\u30ea\u30b9\u30af\u3092\u6291\u3048\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">permission_request_policy.py<\/div>\n<pre class=\"Copy\"><code>\r\nimport json\r\nimport re\r\nimport sys\r\n\r\n\r\npayload = json.load(sys.stdin)\r\ntool_input = payload.get(&quot;tool_input&quot;, {})\r\ncommand = tool_input.get(&quot;command&quot;, &quot;&quot;)\r\n\r\ndeny_patterns = [\r\n    r&quot;\\bgit\\s+push\\s+--force\\b&quot;,\r\n    r&quot;\\bkubectl\\b.*\\b(prod|production)\\b&quot;,\r\n    r&quot;\\baws\\b.*\\b(prod|production)\\b&quot;,\r\n]\r\n\r\nif any(re.search(pattern, command, re.IGNORECASE) for pattern in deny_patterns):\r\n    print(\r\n        json.dumps(\r\n            {\r\n                &quot;hookSpecificOutput&quot;: {\r\n                    &quot;hookEventName&quot;: &quot;PermissionRequest&quot;,\r\n                    &quot;decision&quot;: {\r\n                        &quot;behavior&quot;: &quot;deny&quot;,\r\n                        &quot;message&quot;: &quot;\u672c\u756a\u74b0\u5883\u3084Git\u5c65\u6b74\u306b\u5f71\u97ff\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3001\u627f\u8a8d\u8981\u6c42\u3092\u62d2\u5426\u3057\u307e\u3057\u305f\u3002&quot;,\r\n                    },\r\n                }\r\n            },\r\n            ensure_ascii=False,\r\n        )\r\n    )\r\n<\/code><\/pre>\n<p>\u7ba1\u7406\u8005\u304c\u30dd\u30ea\u30b7\u30fc\u3092\u914d\u5e03\u3059\u308b\u5834\u5408\u306f\u3001<span class=\"Post-inline\">requirements.toml<\/span> \u3068managed hooks\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001\u7ba1\u7406\u8005\u304chook\u8a2d\u5b9a\u3092\u5f37\u5236\u3057\u3001\u5b9f\u969b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306fMDM\u306a\u3069\u306e\u7aef\u672b\u7ba1\u7406\u3067\u914d\u5e03\u3059\u308b\u69cb\u6210\u304c\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u500b\u4eba\u306e\u8a2d\u5b9a\u306b\u4f9d\u5b58\u3055\u305b\u305a\u3001\u30c1\u30fc\u30e0\u5168\u4f53\u3067\u540c\u3058\u627f\u8a8d\u65b9\u91dd\u3092\u9069\u7528\u3057\u305f\u3044\u5834\u5408\u306b\u6709\u52b9\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-permission-request-1.png\" alt=\"\u627f\u8a8d\u8981\u6c42\u306e\u753b\u9762 1\" class=\"content_img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-permission-request-2.png\" alt=\"\u627f\u8a8d\u8981\u6c42\u306e\u753b\u9762 2\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">PermissionRequest hook\u3068\u901a\u5e38\u306e\u627f\u8a8d\u30d5\u30ed\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u3001\u6a29\u9650\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u753b\u9762\u4f8b<\/div>\n<p>\u7279\u306b\u30c1\u30fc\u30e0\u904b\u7528\u3067\u306f\u3001\u300c\u6bce\u56de\u4eba\u9593\u304c\u627f\u8a8d\u3059\u308b\u64cd\u4f5c\u300d\u3068\u300c\u30dd\u30ea\u30b7\u30fc\u4e0a\u306f\u81ea\u52d5\u627f\u8a8d\u3057\u3066\u3088\u3044\u64cd\u4f5c\u300d\u3092\u5206\u3051\u308b\u3068\u904b\u7528\u8ca0\u8377\u3092\u4e0b\u3052\u3089\u308c\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u81ea\u52d5\u627f\u8a8d\u306e\u7bc4\u56f2\u3092\u5e83\u3052\u3059\u304e\u308b\u3068\u672c\u6765\u306e\u78ba\u8a8d\u70b9\u304c\u5931\u308f\u308c\u307e\u3059\u3002\u6700\u521d\u306fdeny\u3068\u901a\u5e38\u627f\u8a8d\u3078\u306e\u59d4\u8b72\u3092\u4e2d\u5fc3\u306b\u3057\u3001allow\u306f\u5f71\u97ff\u7bc4\u56f2\u304c\u660e\u78ba\u306a\u64cd\u4f5c\u306b\u9650\u5b9a\u3059\u308b\u307b\u3046\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n<h4 id=\"section-6-5\" class=\"Heading Title Title--s\">5. PostToolUse\u3067\u5b9f\u884c\u7d50\u679c\u3092\u8aad\u307f\u53d6\u308b<\/h4>\n<p><span class=\"Post-inline\">PostToolUse<\/span> \u306f\u3001\u5bfe\u5fdc\u30c4\u30fc\u30eb\u306e\u5b9f\u884c\u5f8c\u306b\u52d5\u304d\u307e\u3059\u3002Bash\u306e\u5834\u5408\u306f\u3001\u30b3\u30de\u30f3\u30c9\u304c\u975e\u30bc\u30ed\u7d42\u4e86\u3057\u305f\u5834\u5408\u306b\u3082\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u30c4\u30fc\u30eb\u5165\u529b\u306b\u52a0\u3048\u3066\u3001\u30c4\u30fc\u30eb\u51fa\u529b\u3082\u53d7\u3051\u53d6\u308c\u308b\u305f\u3081\u3001\u30c6\u30b9\u30c8\u7d50\u679c\u3084Lint\u7d50\u679c\u3092\u8aad\u307f\u53d6\u308a\u3001Codex\u306b\u8ffd\u52a0\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u6e21\u3059\u7528\u9014\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305f\u3068\u3048\u3070\u3001\u30c6\u30b9\u30c8\u5931\u6557\u6642\u306b\u30ed\u30b0\u304b\u3089\u5931\u6557\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u62bd\u51fa\u3057\u3001\u6b21\u306e\u4f5c\u696d\u3067\u898b\u308b\u3079\u304d\u7bc4\u56f2\u3092Codex\u306b\u4f1d\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">post_tool_use_review.py<\/div>\n<pre class=\"Copy\"><code>\r\nimport json\r\nimport sys\r\n\r\n\r\npayload = json.load(sys.stdin)\r\ntool_response = payload.get(&quot;tool_response&quot;, {})\r\ntext = json.dumps(tool_response, ensure_ascii=False)\r\n\r\nif &quot;FAILED&quot; in text or &quot;Error:&quot; in text:\r\n    print(\r\n        json.dumps(\r\n            {\r\n                &quot;decision&quot;: &quot;block&quot;,\r\n                &quot;reason&quot;: &quot;\u30c6\u30b9\u30c8\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u51fa\u529b\u306b\u5931\u6557\u3092\u691c\u51fa\u3057\u307e\u3057\u305f\u3002\u5931\u6557\u7b87\u6240\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u6b21\u306e\u4f5c\u696d\u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002&quot;,\r\n                &quot;hookSpecificOutput&quot;: {\r\n                    &quot;hookEventName&quot;: &quot;PostToolUse&quot;,\r\n                    &quot;additionalContext&quot;: &quot;\u76f4\u524d\u306e\u30b3\u30de\u30f3\u30c9\u51fa\u529b\u306b\u5931\u6557\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u5dee\u5206\u3092\u5e83\u3052\u308b\u524d\u306b\u539f\u56e0\u3092\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;,\r\n                },\r\n            },\r\n            ensure_ascii=False,\r\n        )\r\n    )\r\n<\/code><\/pre>\n<p>\u6ce8\u610f\u70b9\u3068\u3057\u3066\u3001PostToolUse\u306f\u5b9f\u884c\u5f8c\u306b\u52d5\u304f\u305f\u3081\u3001\u3059\u3067\u306b\u767a\u751f\u3057\u305f\u526f\u4f5c\u7528\u3092\u53d6\u308a\u6d88\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u5371\u967a\u306a\u64cd\u4f5c\u3092\u672a\u7136\u306b\u6b62\u3081\u308b\u7528\u9014\u306fPreToolUse\u3084PermissionRequest\u306b\u5bc4\u305b\u3001PostToolUse\u306f\u7d50\u679c\u306e\u89e3\u91c8\u3084\u8ffd\u52a0\u691c\u8a3c\u306b\u4f7f\u3046\u306e\u304c\u9069\u5207\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-post-tool-use-test-failure-1.png\" alt=\"\u30c6\u30b9\u30c8\u5931\u6557\u691c\u51fa\u306e\u753b\u9762 1\" class=\"content_img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-post-tool-use-test-failure-2.png\" alt=\"\u30c6\u30b9\u30c8\u5931\u6557\u691c\u51fa\u306e\u753b\u9762 2\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">PostToolUse hook\u304c\u30c6\u30b9\u30c8\u5931\u6557\u3092\u691c\u51fa\u3057\u3001Codex\u306b\u8ffd\u52a0\u78ba\u8a8d\u3092\u4fc3\u3057\u3066\u3044\u308b\u753b\u9762\u4f8b<\/div>\n<p>PostToolUse\u306f\u3001\u30ec\u30d3\u30e5\u30fc\u89b3\u70b9\u306e\u81ea\u52d5\u88dc\u8db3\u306b\u3082\u4f7f\u3048\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30c6\u30b9\u30c8\u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u306bsnapshot\u66f4\u65b0\u3001\u578b\u30a8\u30e9\u30fc\u3001\u8106\u5f31\u6027\u8b66\u544a\u3001\u975e\u63a8\u5968API\u306e\u8b66\u544a\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u305d\u308c\u305e\u308c\u306e\u78ba\u8a8d\u89b3\u70b9\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002\u4eba\u9593\u304c\u30ed\u30b0\u5168\u4f53\u3092\u8aad\u3080\u524d\u306b\u3001Codex\u81ea\u8eab\u3078\u300c\u6b21\u306b\u78ba\u8a8d\u3059\u3079\u304d\u3053\u3068\u300d\u3092\u6e21\u305b\u308b\u70b9\u304c\u5b9f\u52d9\u4e0a\u306e\u5229\u70b9\u3067\u3059\u3002<\/p>\n<h4 id=\"section-6-6\" class=\"Heading Title Title--s\">6. Stop\u3067\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u3092\u631f\u3080<\/h4>\n<p><span class=\"Post-inline\">Stop<\/span> \u306f\u3001Codex\u304c\u30bf\u30fc\u30f3\u3092\u7d42\u4e86\u3057\u3088\u3046\u3068\u3057\u305f\u6642\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001<span class=\"Post-inline\">decision: &quot;block&quot;<\/span> \u3092\u8fd4\u3059\u3068\u3001\u30bf\u30fc\u30f3\u3092\u62d2\u5426\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u6307\u5b9a\u3057\u305f\u7406\u7531\u3092\u65b0\u3057\u3044\u7d99\u7d9a\u30d7\u30ed\u30f3\u30d7\u30c8\u3068\u3057\u3066Codex\u306b\u6e21\u3057\u3066\u4f5c\u696d\u3092\u7d9a\u3051\u308b\u3068\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u6027\u8cea\u306f\u3001\u7d42\u4e86\u524d\u306e\u54c1\u8cea\u30c1\u30a7\u30c3\u30af\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u76f4\u8fd1\u306e\u5fdc\u7b54\u306b\u300c\u30c6\u30b9\u30c8\u672a\u5b9f\u884c\u300d\u300c\u78ba\u8a8d\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u300d\u306e\u3088\u3046\u306a\u6587\u8a00\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u6b21\u306e\u78ba\u8a8d\u3092\u4fc3\u305b\u307e\u3059\u3002<\/p>\n<div class=\"Pre-title\">stop_check.py<\/div>\n<pre class=\"Copy\"><code>\r\nimport json\r\nimport sys\r\n\r\n\r\npayload = json.load(sys.stdin)\r\n\r\nif payload.get(&quot;stop_hook_active&quot;):\r\n    sys.exit(0)\r\n\r\nmessage = payload.get(&quot;last_assistant_message&quot;) or &quot;&quot;\r\n\r\nmarkers = [&quot;\u30c6\u30b9\u30c8\u306f\u5b9f\u884c\u3057\u3066\u3044\u307e\u305b\u3093&quot;, &quot;\u78ba\u8a8d\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f&quot;, &quot;\u672a\u691c\u8a3c&quot;]\r\n\r\nif any(marker in message for marker in markers):\r\n    print(\r\n        json.dumps(\r\n            {\r\n                &quot;decision&quot;: &quot;block&quot;,\r\n                &quot;reason&quot;: &quot;\u672a\u691c\u8a3c\u306e\u307e\u307e\u7d42\u4e86\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u5b9f\u884c\u3067\u304d\u308b\u78ba\u8a8d\u30b3\u30de\u30f3\u30c9\u3092\u63a2\u3057\u3001\u5b9f\u884c\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u7406\u7531\u3068\u4ee3\u66ff\u78ba\u8a8d\u3092\u660e\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;,\r\n            },\r\n            ensure_ascii=False,\r\n        )\r\n    )\r\n<\/code><\/pre>\n<p>Stop hook\u306f\u3001\u54c1\u8cea\u30b2\u30fc\u30c8\u3068\u3057\u3066\u4fbf\u5229\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u7121\u6761\u4ef6\u306b\u7d99\u7d9a\u3055\u305b\u308b\u3068\u30eb\u30fc\u30d7\u306b\u8fd1\u3044\u6319\u52d5\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002hook\u5165\u529b\u306b\u306f <span class=\"Post-inline\">stop_hook_active<\/span> \u304c\u542b\u307e\u308c\u308b\u305f\u3081\u3001\u3059\u3067\u306bStop hook\u3067\u7d99\u7d9a\u3055\u308c\u305f\u30bf\u30fc\u30f3\u304b\u3069\u3046\u304b\u3092\u898b\u3066\u3001\u518d\u5b9f\u884c\u3092\u6291\u5236\u3059\u308b\u8a2d\u8a08\u306b\u3057\u3066\u304a\u304f\u3068\u5b89\u5168\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-stop-hook-continuation-1.png\" alt=\"\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u306e\u753b\u9762 1\" class=\"content_img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-stop-hook-continuation-2.png\" alt=\"\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u306e\u753b\u9762 2\" class=\"content_img\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/05\/screenshot-stop-hook-continuation-3.png\" alt=\"\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u306e\u753b\u9762 3\" class=\"content_img\" \/><\/p>\n<div class=\"Image-caption\">Stop hook\u304c\u672a\u691c\u8a3c\u306e\u7d42\u4e86\u3092\u691c\u51fa\u3057\u3001\u8ffd\u52a0\u78ba\u8a8d\u306e\u7d99\u7d9a\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u767a\u751f\u3055\u305b\u305f\u753b\u9762\u4f8b<\/div>\n<p>Stop hook\u3067\u6271\u3044\u3084\u3059\u3044\u78ba\u8a8d\u9805\u76ee\u306f\u3001\u4f5c\u696d\u7d50\u679c\u306e\u81ea\u5df1\u7533\u544a\u306b\u8fd1\u3044\u9818\u57df\u3067\u3059\u3002\u30c6\u30b9\u30c8\u672a\u5b9f\u884c\u3001\u5dee\u5206\u672a\u78ba\u8a8d\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u672a\u66f4\u65b0\u3001\u624b\u5143\u3067\u518d\u73fe\u3067\u304d\u306a\u304b\u3063\u305f\u4e8b\u8c61\u306a\u3069\u306f\u3001\u6700\u5f8c\u306b\u660e\u793a\u3055\u308c\u308b\u3060\u3051\u3067\u3082\u30ec\u30d3\u30e5\u30fc\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u4e00\u65b9\u3067\u3001Stop hook\u306b\u3059\u3079\u3066\u306e\u54c1\u8cea\u5224\u5b9a\u3092\u96c6\u7d04\u3059\u308b\u3068\u3001\u4f5c\u696d\u306e\u6700\u5f8c\u306b\u5927\u91cf\u306e\u6307\u6458\u304c\u8fd4\u308b\u69cb\u6210\u306b\u306a\u308a\u307e\u3059\u3002\u3067\u304d\u308b\u3060\u3051UserPromptSubmit\u3001PreToolUse\u3001PostToolUse\u3067\u65e9\u3044\u6bb5\u968e\u306b\u5206\u6563\u3055\u305b\u3001Stop\u306f\u6700\u7d42\u78ba\u8a8d\u306b\u9650\u5b9a\u3059\u308b\u8a2d\u8a08\u304c\u6271\u3044\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<h3 id=\"section-7\" class=\"Heading Title Title--m\">\u904b\u7528\u6642\u306e\u6ce8\u610f\u70b9<\/h3>\n<p>Hooks\u306f\u5f37\u529b\u3067\u3059\u304c\u3001\u5c0e\u5165\u6642\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u6ce8\u610f\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u7b2c\u4e00\u306b\u3001hook\u3092\u8907\u96d1\u306b\u3057\u3059\u304e\u306a\u3044\u3053\u3068\u3067\u3059\u3002Codex\u306e\u5168\u4f5c\u696d\u306b\u95a2\u308f\u308b\u305f\u3081\u3001\u91cd\u3044\u51e6\u7406\u3084\u4e0d\u5b89\u5b9a\u306a\u5916\u90e8API\u547c\u3073\u51fa\u3057\u3092\u5165\u308c\u308b\u3068\u3001\u901a\u5e38\u306e\u958b\u767a\u4f5c\u696d\u307e\u3067\u9045\u304f\u306a\u308a\u307e\u3059\u3002\u6700\u521d\u306f\u30d7\u30ed\u30f3\u30d7\u30c8\u691c\u67fb\u3001\u5371\u967a\u30b3\u30de\u30f3\u30c9\u691c\u67fb\u3001\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u306e\u3088\u3046\u306a\u5c0f\u3055\u306a\u7528\u9014\u304b\u3089\u59cb\u3081\u308b\u306e\u304c\u73fe\u5b9f\u7684\u3067\u3059\u3002<br \/>\n\u7b2c\u4e8c\u306b\u3001\u30c1\u30fc\u30e0\u3067\u5171\u6709\u3059\u308bhook\u306f\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u5bfe\u8c61\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002hook\u306f\u30ed\u30fc\u30ab\u30eb\u3067\u5b9f\u884c\u3055\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3042\u308a\u3001\u958b\u767a\u8005\u306e\u7aef\u672b\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u3084\u30b3\u30de\u30f3\u30c9\u306b\u95a2\u308f\u308a\u307e\u3059\u3002<span class=\"Post-inline\">.codex\/hooks.json<\/span> \u3068 <span class=\"Post-inline\">.codex\/hooks\/<\/span> \u914d\u4e0b\u3092Git\u7ba1\u7406\u3059\u308b\u5834\u5408\u306f\u3001\u901a\u5e38\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u3068\u540c\u3058\u304f\u30ec\u30d3\u30e5\u30fc\u3057\u307e\u3059\u3002<br \/>\n\u7b2c\u4e09\u306b\u3001AGENTS.md\u3084Skills\u3068\u306e\u5f79\u5272\u5206\u62c5\u3092\u660e\u78ba\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002AGENTS.md\u306f\u3001\u30d3\u30eb\u30c9\u624b\u9806\u3001\u30c6\u30b9\u30c8\u65b9\u6cd5\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u898f\u7d04\u306e\u3088\u3046\u306a\u9759\u7684\u306a\u6307\u793a\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002Skills\u306f\u3001\u7279\u5b9a\u4f5c\u696d\u306e\u624b\u9806\u3084\u53c2\u7167\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u308b\u7528\u9014\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002\u4e00\u65b9\u3001Hooks\u306f\u3001Codex\u306e\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u5408\u308f\u305b\u3066\u5224\u5b9a\u3084\u88dc\u8db3\u3092\u884c\u3046\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/p>\n<a class=\"Internal-post\" href=\"https:\/\/techfun.cc\/generative-ai\/gen-ai-skills-introduction.html\"><div class=\"Internal-post__thumb\" style=\"background: url(\/wp-content\/uploads\/2026\/03\/gen-ai-skills-introduction-scaled.png) no-repeat; background-size: cover; background-position: 50% 50%;\"><\/div><div class=\"Internal-post-content\"><div class=\"Category Category--generative-ai\"> \u751f\u6210AI\u95a2\u9023<\/div><div class=\"Internal-post__title\">\u751f\u6210AI\u306eSkills\u3068\u306f\uff1f\u4ed5\u7d44\u307f\u30fbMCP\u3084\u30ab\u30b9\u30bf\u30e0\u6307\u793a\u3068\u306e\u9055\u3044\u30fb\u30c7\u30e2\u307e\u3067<\/div><\/div><\/a>\n<p>\u5f79\u5272\u3092\u6574\u7406\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<table class=\"Base-table\">\n<tr>\n<th>\u4ed5\u7d44\u307f<\/th>\n<th>\u5411\u3044\u3066\u3044\u308b\u7528\u9014<\/th>\n<\/tr>\n<tr>\n<td>AGENTS.md<\/td>\n<td>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5168\u4f53\u306e\u9759\u7684\u306a\u4f5c\u696d\u30eb\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>Skills<\/td>\n<td>\u7279\u5b9a\u30bf\u30b9\u30af\u306e\u518d\u5229\u7528\u53ef\u80fd\u306a\u4f5c\u696d\u624b\u9806<\/td>\n<\/tr>\n<tr>\n<td>Hooks<\/td>\n<td>\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u5fdc\u3058\u305f\u691c\u67fb\u3001\u88dc\u8db3\u3001\u30d6\u30ed\u30c3\u30af<\/td>\n<\/tr>\n<tr>\n<td>Rules<\/td>\n<td>\u30b3\u30de\u30f3\u30c9\u627f\u8a8d\u3084\u6a29\u9650\u306e\u660e\u793a\u7684\u306a\u5236\u5fa1<\/td>\n<\/tr>\n<\/table>\n<p>\u7b2c\u56db\u306b\u3001Windows\u3068WSL2\u306e\u5883\u754c\u3092\u66d6\u6627\u306b\u3057\u306a\u3044\u3053\u3068\u3067\u3059\u3002Codex\u30a2\u30d7\u30ea\u306eagent\u3092WSL\u306b\u3057\u305f\u5834\u5408\u3001hook\u3082WSL\u5074\u306e\u30b3\u30de\u30f3\u30c9\u3068\u3057\u3066\u8a2d\u8a08\u3059\u308b\u307b\u3046\u304c\u4e00\u8cab\u3057\u307e\u3059\u3002Windows native agent\u3067\u4f7f\u3046hook\u3068WSL2 agent\u3067\u4f7f\u3046hook\u3067\u306f\u3001\u30d1\u30b9\u3001\u30b7\u30a7\u30eb\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30c4\u30fc\u30eb\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u30c1\u30fc\u30e0\u3067\u5171\u6709\u3059\u308b\u5834\u5408\u306f\u3001\u3069\u3061\u3089\u3092\u524d\u63d0\u306b\u3059\u308b\u304b\u3092AGENTS.md\u3084README\u306b\u660e\u8a18\u3057\u3066\u304a\u304f\u3068\u3001\u5c0e\u5165\u6642\u306e\u6df7\u4e71\u3092\u6e1b\u3089\u305b\u307e\u3059\u3002<\/p>\n<h3 id=\"section-8\" class=\"Heading Title Title--m\">\u307e\u3068\u3081<\/h3>\n<p>Codex Hooks\u306f\u3001Codex\u306e\u4f5c\u696d\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u306b\u30c1\u30fc\u30e0\u72ec\u81ea\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d44\u307f\u8fbc\u3080\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002Windows\u7248Codex\u30a2\u30d7\u30ea\u3092WSL2\u524d\u63d0\u3067\u4f7f\u3046\u5834\u5408\u3001Bash\u3084uv\u3092\u524d\u63d0\u306bhook\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6574\u7406\u3067\u304d\u308b\u305f\u3081\u3001Linux\u5bc4\u308a\u306e\u958b\u767a\u74b0\u5883\u3068\u5408\u308f\u305b\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u7d39\u4ecb\u3057\u305f6\u7a2e\u985e\u306ehook\u306f\u3001\u305d\u308c\u305e\u308c\u5f79\u5272\u304c\u7570\u306a\u308a\u307e\u3059\u3002SessionStart\u306f\u4f5c\u696d\u958b\u59cb\u6642\u306e\u6587\u8108\u88dc\u8db3\u3001UserPromptSubmit\u306f\u5165\u529b\u691c\u67fb\u3001PreToolUse\u306f\u5b9f\u884c\u524d\u30ac\u30fc\u30c9\u3001PermissionRequest\u306f\u627f\u8a8d\u5224\u65ad\u3001PostToolUse\u306f\u5b9f\u884c\u7d50\u679c\u306e\u89e3\u91c8\u3001Stop\u306f\u7d42\u4e86\u524d\u30c1\u30a7\u30c3\u30af\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4e00\u65b9\u3067\u3001hook\u306f\u4e07\u80fd\u306a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u6a5f\u69cb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002sandbox\u3001\u627f\u8a8d\u30dd\u30ea\u30b7\u30fc\u3001Rules\u3001Git\u5dee\u5206\u30ec\u30d3\u30e5\u30fc\u3001AGENTS.md\u3001Skills\u3068\u7d44\u307f\u5408\u308f\u305b\u3001\u30c1\u30fc\u30e0\u306e\u958b\u767a\u30d5\u30ed\u30fc\u306e\u4e2d\u3067\u6bb5\u968e\u7684\u306b\u5c0e\u5165\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u307e\u305a\u306f\u30d7\u30ed\u30f3\u30d7\u30c8\u691c\u67fb\u3084\u5371\u967a\u30b3\u30de\u30f3\u30c9\u691c\u67fb\u306e\u3088\u3046\u306b\u52b9\u679c\u304c\u898b\u3048\u3084\u3059\u3044\u7b87\u6240\u304b\u3089\u59cb\u3081\u3001\u904b\u7528\u3057\u306a\u304c\u3089\u30eb\u30fc\u30eb\u3092\u6d17\u7df4\u3055\u305b\u308b\u306e\u304c\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3 id=\"section-9\" class=\"Heading Title Title--m\">\u751f\u6210AI\u6d3b\u7528\u652f\u63f4\u30b5\u30fc\u30d3\u30b9\u306e\u3054\u7d39\u4ecb<\/h3>\n<p>Tech Fun\u3067\u306f\u3001\u304a\u5ba2\u69d8\u306e\u30d5\u30a7\u30fc\u30ba\u306b\u5408\u308f\u305b\u3001\u751f\u6210AI\u6d3b\u7528\u306b\u5411\u3051\u305f\u652f\u63f4\u30923\u3064\u306e\u30d1\u30c3\u30af\u3067\u3054\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol class=\"Base-list Base-list--ol\">\n<li class=\"Base-list__child\">\n        <a href=\"https:\/\/www.techfun.co.jp\/services\/ai\/diagnosis\/\" class=\"Ext\">\u7121\u6599\u8a3a\u65ad\u30d1\u30c3\u30af<\/a>\uff1a\u696d\u52d9\u30fb\u30d7\u30ed\u30bb\u30b9\u306e\u73fe\u72b6\u3092\u7121\u6599\u3067\u8a3a\u65ad\u3057\u3001\u751f\u6210AI\u6d3b\u7528\u306e\u53ef\u80fd\u6027\u3092\u30ec\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n    <\/li>\n<li class=\"Base-list__child\">\n        <a href=\"https:\/\/www.techfun.co.jp\/services\/ai\/poc\/\" class=\"Ext\">\u691c\u8a3c\uff08PoC\uff09\u30d1\u30c3\u30af<\/a>\uff1a\u8a3a\u65ad\u3067\u6709\u52b9\u6027\u304c\u78ba\u8a8d\u3055\u308c\u305f\u696d\u52d9\u3092\u5bfe\u8c61\u306b\u3001\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u69cb\u7bc9\u3092\u652f\u63f4\u3057\u307e\u3059\u3002\n    <\/li>\n<li class=\"Base-list__child\">\n        <a href=\"https:\/\/www.techfun.co.jp\/services\/ai\/consulting\/\" class=\"Ext\">\u30b3\u30f3\u30b5\u30eb\u30c6\u30a3\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9<\/a>\uff1a\u751f\u6210AI\u5c0e\u5165\u6226\u7565\u306e\u7b56\u5b9a\u304b\u3089\u904b\u7528\u4f53\u5236\u69cb\u7bc9\u307e\u3067\u3092\u5305\u62ec\u7684\u306b\u652f\u63f4\u3057\u307e\u3059\u3002\n    <\/li>\n<\/ol>\n<p>\u751f\u6210AI\u306b\u9650\u3089\u305a\u3001Web\u30fb\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3084\u30a4\u30f3\u30d5\u30e9\u8a2d\u8a08\u306a\u3069\u3001\u6280\u8853\u9818\u57df\u3092\u554f\u308f\u305a\u3054\u76f8\u8ac7\u3092\u627f\u3063\u3066\u3044\u307e\u3059\u3002\u300c\u4f55\u304b\u3089\u59cb\u3081\u308c\u3070\u826f\u3044\u304b\u5206\u304b\u3089\u306a\u3044\u300d\u3068\u3044\u3046\u6bb5\u968e\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u306e\u3067\u3001\u305c\u3072\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b Windows\u3067Codex\u30a2\u30d7\u30ea\u3092\u4f7f\u3046\u5834\u5408\u3001PowerShell\u3067\u52d5\u304fWindows native agent\u3068\u3001WSL2\u4e0a\u3067\u52d5\u304fagent\u306e\u3069\u3061\u3089\u3082\u9078\u629e\u3067\u304d\u307e\u3059\u3002\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001Windows\u74b0\u5883\u3067Codex\u2026<\/p>\n","protected":false},"author":6,"featured_media":7052,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[91],"class_list":["post-7071","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-generative-ai"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts\/7071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/comments?post=7071"}],"version-history":[{"count":1,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts\/7071\/revisions"}],"predecessor-version":[{"id":7072,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/posts\/7071\/revisions\/7072"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/media\/7052"}],"wp:attachment":[{"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/media?parent=7071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techfun.cc\/wp-json\/wp\/v2\/categories?post=7071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}