From cf8f1e64b1f960a1c7bb268c8a49e25d34082d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Fri, 15 May 2026 18:09:05 +0200 Subject: [PATCH] claude settings: extract to prompts/claude-settings.json (formatted) --- hive-ag3nt/prompts/claude-settings.json | 5 +++++ hive-ag3nt/src/turn.rs | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 hive-ag3nt/prompts/claude-settings.json diff --git a/hive-ag3nt/prompts/claude-settings.json b/hive-ag3nt/prompts/claude-settings.json new file mode 100644 index 0000000..612237d --- /dev/null +++ b/hive-ag3nt/prompts/claude-settings.json @@ -0,0 +1,5 @@ +{ + "autoCompactEnabled": false, + "autoMemoryEnabled": false, + "effortLevel": "medium" +} diff --git a/hive-ag3nt/src/turn.rs b/hive-ag3nt/src/turn.rs index f1f38fd..93f712a 100644 --- a/hive-ag3nt/src/turn.rs +++ b/hive-ag3nt/src/turn.rs @@ -17,15 +17,15 @@ use crate::events::{Bus, LiveEvent}; use crate::login::{self, LoginState}; use crate::mcp; -/// Inline `--settings` JSON applied to every claude invocation. We turn off -/// claude's in-session auto-compaction and its cross-session auto-memory -/// because hyperhive owns those concerns: compaction is operator/harness- -/// driven (`/compact` on overflow), notes persistence is a hyperhive -/// concern (planned, not yet wired). Unknown keys are silently ignored by -/// claude-code; if the key names ever rename, we'll spot it because -/// auto-compact will start firing mid-turn again. -const CLAUDE_SETTINGS: &str = - r#"{"autoCompactEnabled":false,"autoMemoryEnabled":false,"effortLevel":"medium"}"#; +/// `--settings` JSON applied to every claude invocation. Lives as a +/// properly-formatted file in `prompts/claude-settings.json` so it's easy +/// to read and edit; we ship it via `include_str!`. We turn off claude's +/// in-session auto-compaction and its cross-session auto-memory because +/// hyperhive owns those concerns (`/compact` on overflow, notes +/// persistence under `/state`). Unknown keys are silently ignored by +/// claude-code; if a key gets renamed we'll spot it because the +/// corresponding behavior will start firing mid-turn again. +const CLAUDE_SETTINGS: &str = include_str!("../prompts/claude-settings.json"); /// Regex-ish marker claude-code emits when context overflows. Same string /// bitburner-agent watches for. Empirically reliable across claude-code