Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(computer): keep CLAUDE.md files out of Claude Agent runs
Ethan9dc4ab5395bc
diff --git a/apps/computer/local-daemon/internal/provider/native/claude_policy.go b/apps/computer/local-daemon/internal/provider/native/claude_policy.goindex 7426c434..dd8a690f 100644--- a/apps/computer/local-daemon/internal/provider/native/claude_policy.go+++ b/apps/computer/local-daemon/internal/provider/native/claude_policy.go@@ -127,7 +127,11 @@ const claudeLongContextWindow = 1_000_000// claudeSettings sizes Claude by the model's context window; zero is unknown.func claudeSettings(contextWindow int) string {- settingsEnv := map[string]string{"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS": "1"}+ // The project setting source loads the Context's own Skills, but it also+ // loads every CLAUDE.md and AGENTS.md from the workspace up to the root,+ // which reaches the user's home. Agent instructions come only from the+ // appended system prompt, so no CLAUDE.md is read.+ settingsEnv := map[string]string{"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS": "1", "CLAUDE_CODE_DISABLE_CLAUDE_MDS": "1"}settings := map[string]any{"disableBundledSkills": true, "syncClaudeAiSkills": false, "syncClaudeAiPlugins": false,"disableAgentView": true, "disableRemoteControl": true, "autoMemoryEnabled": false,diff --git a/apps/computer/local-daemon/internal/provider/native/claude_runtime_test.go b/apps/computer/local-daemon/internal/provider/native/claude_runtime_test.goindex f8c5cdc9..65b134b7 100644--- a/apps/computer/local-daemon/internal/provider/native/claude_runtime_test.go+++ b/apps/computer/local-daemon/internal/provider/native/claude_runtime_test.go@@ -303,7 +303,7 @@ func TestClaudeArgv(t *testing.T) {if encoded, _ := json.Marshal(managed); string(encoded) != wantManaged {t.Fatalf("managed = %s", encoded)}- wantSettings := `{"autoCompactWindow":200000,"autoMemoryEnabled":false,"cleanupPeriodDays":36500,"disableAgentView":true,"disableBundledSkills":true,"disableRemoteControl":true,"env":{"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS":"1"},"syncClaudeAiPlugins":false,"syncClaudeAiSkills":false}`+ wantSettings := `{"autoCompactWindow":200000,"autoMemoryEnabled":false,"cleanupPeriodDays":36500,"disableAgentView":true,"disableBundledSkills":true,"disableRemoteControl":true,"env":{"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS":"1","CLAUDE_CODE_DISABLE_CLAUDE_MDS":"1"},"syncClaudeAiPlugins":false,"syncClaudeAiSkills":false}`if encoded, _ := json.Marshal(settings); string(encoded) != wantSettings {t.Fatalf("settings = %s", encoded)}@@ -334,7 +334,7 @@ func TestClaudeSettingsFollowContextWindow(t *testing.T) {if small["autoCompactWindow"] != float64(200000) || small["bashOutputMaxChars"] != float64(12978) ||env["CLAUDE_CODE_MAX_CONTEXT_TOKENS"] != "64896" || env["CLAUDE_CODE_DISABLE_1M_CONTEXT"] != "1" ||env["CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS"] != "9734" || env["MAX_MCP_OUTPUT_TOKENS"] != "9734" ||- env["CLAUDE_CODE_DISABLE_BACKGROUND_TASKS"] != "1" {+ env["CLAUDE_CODE_DISABLE_BACKGROUND_TASKS"] != "1" || env["CLAUDE_CODE_DISABLE_CLAUDE_MDS"] != "1" {t.Fatalf("64k settings = %v", small)}// A large window caps tool output at Claude's own Read and MCP limit;@@ -347,7 +347,7 @@ func TestClaudeSettingsFollowContextWindow(t *testing.T) {if _, env := settingsFor(1000000); env["CLAUDE_CODE_DISABLE_1M_CONTEXT"] != nil {t.Fatalf("1M settings env = %v", env)}- if claudeSettings(0) != `{"autoCompactWindow":200000,"autoMemoryEnabled":false,"cleanupPeriodDays":36500,"disableAgentView":true,"disableBundledSkills":true,"disableRemoteControl":true,"env":{"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS":"1"},"syncClaudeAiPlugins":false,"syncClaudeAiSkills":false}` {+ if claudeSettings(0) != `{"autoCompactWindow":200000,"autoMemoryEnabled":false,"cleanupPeriodDays":36500,"disableAgentView":true,"disableBundledSkills":true,"disableRemoteControl":true,"env":{"CLAUDE_CODE_DISABLE_BACKGROUND_TASKS":"1","CLAUDE_CODE_DISABLE_CLAUDE_MDS":"1"},"syncClaudeAiPlugins":false,"syncClaudeAiSkills":false}` {t.Fatalf("unknown window settings = %s", claudeSettings(0))}// The settings are part of the argv a parked process keeps, so another