Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)
Python
patch: Allow tool network access in Claude Desktop profiles (#1953)
Ali Khokhar549918e2e243
diff --git a/src/free_claude_code/harnesses/claude_desktop_integration.py b/src/free_claude_code/harnesses/claude_desktop_integration.pyindex f29f5772..129612ee 100644--- a/src/free_claude_code/harnesses/claude_desktop_integration.py+++ b/src/free_claude_code/harnesses/claude_desktop_integration.py@@ -295,6 +295,8 @@ def _update_profile(library: _Library, values: JsonObject) -> bool:}headers[_VIEW_HEADER] = "claude-desktop"profile.update(values)+ # Desktop otherwise restricts tool network access to the inference gateway.+ profile.setdefault("coworkEgressAllowedHosts", ["*"])profile["inferenceCustomHeaders"] = headersprofile.pop("inferenceModels", None)return _write(library.profile_path, profile)diff --git a/tests/harnesses/test_claude_desktop_integration.py b/tests/harnesses/test_claude_desktop_integration.pyindex ad508a9b..5f58a393 100644--- a/tests/harnesses/test_claude_desktop_integration.py+++ b/tests/harnesses/test_claude_desktop_integration.py@@ -170,6 +170,7 @@ def test_fresh_connection_and_disconnect_preserve_native_library(tmp_path):assert read(meta(root))["appliedId"] == desktop.FCC_IDassert read(mode(root))["deploymentMode"] == "3p"assert read(profile(root))["inferenceGatewayApiKey"] == TOKEN+ assert read(profile(root))["coworkEgressAllowedHosts"] == ["*"]before = {p: p.read_bytes() for p in root.rglob("*.json")}assert (desktop.refresh_connected(@@ -200,6 +201,42 @@ def test_fresh_connection_and_disconnect_preserve_native_library(tmp_path):assert {p: p.read_bytes() for p in root.rglob("*.json")} == after[email protected]("reconnect", [False, True])+ "egress",+ [+ {},+ {"coworkEgressAllowedHosts": []},+ {"coworkEgressAllowedHosts": ["github.com"]},+ ],+)+def test_connection_defaults_missing_egress_and_preserves_explicit_policy(+ tmp_path, reconnect, egress+):+ record = claude_desktop_disconnect_path()+ desktop.configure(tmp_path, URL, TOKEN, True, disconnect_path=record)+ config = read(profile(tmp_path))+ config.pop("coworkEgressAllowedHosts", None)+ config.update(egress)+ write(profile(tmp_path), config)+ before = profile(tmp_path).read_bytes()+ assert desktop.configure(tmp_path, URL, TOKEN, disconnect_path=record)["connected"]+ assert profile(tmp_path).read_bytes() == before++ if reconnect:+ desktop.configure(tmp_path, URL, TOKEN, True, disconnect_path=record)+ else:+ assert desktop.refresh_connected(+ tmp_path, URL, TOKEN, disconnect_path=record+ ) is (not egress)++ assert read(profile(tmp_path))["coworkEgressAllowedHosts"] == egress.get(+ "coworkEgressAllowedHosts", ["*"]+ )+ assert desktop.configure(tmp_path, URL, TOKEN, disconnect_path=record)["connected"]+ assert not desktop.refresh_connected(tmp_path, URL, TOKEN, disconnect_path=record)++def test_refresh_rotates_credentials_without_reactivating(tmp_path):desktop.configure(tmp_path, URL, TOKEN, True, disconnect_path=claude_desktop_disconnect_path()