fix(minimax-m3-max, fable-low-effort): H-SECRET-4 rejected MAX_THINKING_TOKENS in env
The validator pattern-matches *TOKEN* as credential-shaped and rejected both contexts, failing every task on the new harnesses. The env var name is fixed by Claude Code, so deliver the thinking budget via the settings.json env map in init.sh instead (jq-merge preserves apiKeyHelper from the minimax/oauth layer). Claude-Session: https://claude.ai/code/session_019tJk7P8tZzJ24PvtgoGhLN
This commit is contained in:
@@ -8,9 +8,12 @@ provides: []
|
||||
# Model pin + effort dial for Claude Code against the Anthropic cloud.
|
||||
# - ANTHROPIC_MODEL forces Fable 5; workflow nodes using this layer must
|
||||
# NOT set a node-level model: (the --model flag would override this env).
|
||||
# - MAX_THINKING_TOKENS keeps the extended-thinking budget small ("low
|
||||
# effort") — Fable's raw capability at minimal thinking is the point:
|
||||
# frontier judgment without frontier token burn.
|
||||
# - The small thinking budget ("low effort") is set by init.sh via
|
||||
# settings.json — the env var name trips H-SECRET-4's credential pattern
|
||||
# so it cannot live in this env: block. Fable's raw capability at minimal
|
||||
# thinking is the point: frontier judgment without frontier token burn.
|
||||
env:
|
||||
ANTHROPIC_MODEL: "claude-fable-5"
|
||||
MAX_THINKING_TOKENS: "1024"
|
||||
|
||||
scripts:
|
||||
init: ./init.sh
|
||||
|
||||
41
harnesses/contexts/fable-low-effort/v1/init.sh
Executable file
41
harnesses/contexts/fable-low-effort/v1/init.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# fable-low-effort init — set MAX_THINKING_TOKENS via Claude Code settings.json.
|
||||
#
|
||||
# MAX_THINKING_TOKENS cannot go in the harness env: block — H-SECRET-4
|
||||
# pattern-matches "*TOKEN*" as credential-shaped and rejects the harness.
|
||||
# It is plain config (thinking budget), so deliver it through the
|
||||
# settings.json "env" map instead. Runs after anthropic-cloud-paul-oauth/v1's init.sh, so
|
||||
# merge into the existing file (which carries apiKeyHelper).
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
AGENT_USER="${AGENT_USER:-agent}"
|
||||
AGENT_HOME=$(getent passwd "$AGENT_USER" | cut -d: -f6)
|
||||
if [ -z "$AGENT_HOME" ] || [ ! -d "$AGENT_HOME" ]; then
|
||||
AGENT_HOME="/home/$AGENT_USER"
|
||||
fi
|
||||
|
||||
CONFIG_DIR="${CLAUDE_CONFIG_DIR:-$AGENT_HOME/.claude}"
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
chown "$AGENT_USER:" "$CONFIG_DIR" 2>/dev/null || true
|
||||
SETTINGS_FILE="$CONFIG_DIR/settings.json"
|
||||
|
||||
THINKING_BUDGET="1024"
|
||||
|
||||
if [ -f "$SETTINGS_FILE" ] && command -v jq >/dev/null 2>&1; then
|
||||
TMP=$(mktemp)
|
||||
jq --arg v "$THINKING_BUDGET" \
|
||||
'.env = ((.env // {}) + {MAX_THINKING_TOKENS: $v})' \
|
||||
"$SETTINGS_FILE" > "$TMP"
|
||||
mv "$TMP" "$SETTINGS_FILE"
|
||||
else
|
||||
cat > "$SETTINGS_FILE" <<EOF
|
||||
{
|
||||
"env": { "MAX_THINKING_TOKENS": "$THINKING_BUDGET" }
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
chown "$AGENT_USER:" "$SETTINGS_FILE" 2>/dev/null || true
|
||||
chmod 0644 "$SETTINGS_FILE"
|
||||
echo "fable-low-effort: MAX_THINKING_TOKENS=$THINKING_BUDGET wired in $SETTINGS_FILE"
|
||||
Reference in New Issue
Block a user