MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / _patch_codex_tool_timeout

Function _patch_codex_tool_timeout

codewiki/src/be/caw_backend.py:98–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96_CODEX_TOOL_TIMEOUT_SEC = 86400 # 24 h
97
98
99def _patch_codex_tool_timeout() -> None:
100 global _CODEX_PATCH_APPLIED
101 if _CODEX_PATCH_APPLIED:
102 return
103 from caw.providers.codex import CodexSession
104
105 _orig = CodexSession._mcp_config_args
106
107 def _patched(self) -> list[str]:
108 args = list(_orig(self))
109 for srv in self._mcp_servers:
110 args += [
111 "-c",
112 f"mcp_servers.{srv.name}.tool_timeout_sec={_CODEX_TOOL_TIMEOUT_SEC}",
113 ]
114 return args
115
116 CodexSession._mcp_config_args = _patched
117 _CODEX_PATCH_APPLIED = True
118
119

Callers 1

caw_backend.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected