{"record":{"id":"500625451da23d30","repo":"langchain-ai/deepagents","slug":"interpreter-ptc-list-entries-cannot-include-all-500625","errorCode":null,"errorMessage":"`interpreter_ptc` list entries cannot include 'all'; use 'all' as a standalone value or list explicit tool names (optionally with the 'safe' preset).","messagePattern":"`interpreter_ptc` list entries cannot include 'all'; use 'all' as a standalone value or list explicit tool names \\(optionally with the 'safe' preset\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/config.py","lineNumber":2460,"sourceCode":"    if isinstance(raw, list):\n        if not raw:\n            return False\n        names: list[str] = []\n        for entry in raw:\n            if not isinstance(entry, str) or not entry.strip():\n                msg = (\n                    \"`interpreter_ptc` list entries must be non-empty strings; \"\n                    f\"got {entry!r}.\"\n                )\n                raise ValueError(msg)\n            cleaned = entry.strip()\n            if cleaned.lower() == INTERPRETER_PTC_ALL_SENTINEL:\n                msg = (\n                    \"`interpreter_ptc` list entries cannot include 'all'; use \"\n                    \"'all' as a standalone value or list explicit tool names \"\n                    \"(optionally with the 'safe' preset).\"\n                )\n                raise ValueError(msg)\n            names.append(cleaned)\n        return names\n    msg = (\n        f\"`interpreter_ptc` must be False, 'safe', 'all', or a list of tool \"\n        f\"names; got {type(raw).__name__}.\"\n    )\n    raise ValueError(msg)\n\n\n@dataclass(frozen=True)\nclass _ProviderRetryConfig:\n    \"\"\"Validated retry settings for one provider.\"\"\"\n\n    max_retries: int | None = None\n    param: str | None = None\n\n\n@dataclass(frozen=True)","sourceCodeStart":2442,"sourceCodeEnd":2478,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/config.py#L2442-L2478","documentation":"Inside an interpreter_ptc list, the sentinel 'all' is not allowed as an entry; 'all' must be the standalone scalar value (or combined via the 'safe' preset note in the message). This keeps the allow-list semantics unambiguous — a list means explicit tool names only.","triggerScenarios":"Passing interpreter_ptc = [\"all\"] or [\"safe\", \"all\", \"bash\"] — any list element equal to 'all' case-insensitively after trimming.","commonSituations":"Users assuming lists behave like the allow-list merge logic ('safe' plus extras) and appending 'all', or scripting config generation that adds 'all' as a fallback entry.","solutions":["Use interpreter_ptc = \"all\" as a standalone value instead of a list containing 'all'.","Drop the 'all' entry and list only explicit tool names, optionally prefixing with 'safe' as the message suggests.","If you want 'safe' plus specific tools, pass [\"safe\", \"tool_a\"] without 'all'."],"exampleFix":"// before\ninterpreter_ptc = [\"all\"]\n// after\ninterpreter_ptc = \"all\"  # or [\"safe\", \"bash\"]","handlingStrategy":"validation","validationCode":"if isinstance(raw, list) and any(t.strip().lower() == \"all\" for t in raw if isinstance(t, str)):\n    raise ValueError(\"'all' must be standalone, not a list entry\")","typeGuard":"def is_explicit_tool_list(v: object) -> bool:\n    return (isinstance(v, list) and all(isinstance(t, str) and t.strip()\n            and t.strip().lower() != \"all\" for t in v))","tryCatchPattern":"try:\n    ptc = _parse_interpreter_ptc(raw)\nexcept ValueError as e:\n    sys.exit(f\"invalid interpreter_ptc: {e}\")","preventionTips":["Use the scalar \"all\" for enable-everything; lists are for explicit names only","Combine \"safe\" with named tools in lists instead of \"all\"","Normalize and check entries case-insensitively before writing config"],"tags":["config","toml","validation","security"],"backgroundTag":"invalid-enum-value","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}