ALL MEMOS Download .docx

Claude Code Update Audit — TITAN-Relevant Features

Date: 2026-05-09

Window covered: ~2026-04-01 → 2026-05-09 (versions 2.1.101 → 2.1.138)

Sources: Raw changelog archived at F:/TITAN/plans/claude-code-release-notes-raw-2026-05-09.md (287 KB, fetched from https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md); cross-referenced via Perplexity sonar-pro synthesis (recency=month).

---

Recent Claude Code Releases (April–May 2026)

Compact timeline of the releases shipped in the last ~30–40 days. Each line is one version; only TITAN-relevant items are listed (omits pure UI/terminal-rendering fixes).

---

TITAN-Relevant Features (ranked by impact)

Tier 1 — High impact, immediate ROI

1. PreCompact hook can now BLOCK compaction (v2.1.105).

Hooks emitting exit 2 or {"decision":"block"} halt compaction. TITAN already wires both titan-precompact.py and precompact_dump.py as PreCompact hooks (settings.json lines 95–115). Today they only dump state. Now they can also veto compaction when conditions aren't safe (e.g., uncommitted memory writes, mid-batch). Patch surface: F:/TITAN/scripts/titan-precompact.py. Effort: ~15 min.

2. PostToolUse hook can replace tool output via hookSpecificOutput.updatedToolOutput for ALL tools (v2.1.121).

Previously MCP-only. Now hooks like titan-injection-scan.py (currently matcher Read|WebFetch|WebSearch, settings.json lines 65–73) can redact prompt-injection payloads instead of just scanning. Today it can flag — now it can sanitize before the model sees it. Patch surface: titan-injection-scan.py. Effort: ~30 min.

3. PostToolUse hook input now includes duration_ms (v2.1.119).

TITAN's titan-metrics.py runs after every Bash/Read/Glob/Grep/WebSearch/WebFetch/Write/Edit (settings.json lines 35–62). Right now it has no per-tool latency signal. With duration_ms we get a free per-tool latency histogram → feeds titan-daily-token-audit and SCOUT diagnostics. Patch surface: F:/TITAN/scripts/titan-metrics.py. Effort: ~20 min.

4. Hooks/skills receive effort.level and $CLAUDE_EFFORT (v2.1.119, v2.1.120, v2.1.133).

TITAN has no current visibility into what effort level the model is running at. Knowing this lets skills branch behavior — e.g., /dream can do deeper consolidation under xhigh, lighter at medium. Skills can inline ${CLAUDE_EFFORT} in content. Patch surface: ~/.claude/skills/dream/SKILL.md, ~/.claude/skills/sense/SKILL.md, optionally inject into session_start_inject.py. Effort: ~20 min.

5. claude_code.skill_activated OTel event with invocation_trigger (v2.1.126).

Distinguishes user-slash vs claude-proactive vs nested-skill. TITAN already runs titan-metrics.py; if you opt into OTel export this is a free signal for "is Claude using my skills proactively or am I always typing them?" — directly feeds DARWIN's evolution analysis. Effort: ~30 min if OTel collector not already running, ~5 min if it is.

Tier 2 — Medium impact, queue for next sprint

6. --plugin-url <url> (v2.1.129) + claude plugin prune (v2.1.121).

TITAN doesn't ship plugins yet, but --plugin-url is the path to one-line distribution of a TITAN plugin pack (skills + agents + hooks bundled). When you eventually package TITAN for portability, this is the install vector.

7. MCP alwaysLoad: true per-server config (v2.1.121).

Skips tool-search deferral. If you have MCPs you depend on every session (e.g., GitHub, filesystem, browser), marking them alwaysLoad removes the first-turn "tools not available" race condition. Patch surface: any .mcp.json or settings MCP block.

8. CLAUDE_CODE_SESSION_ID env var in Bash subprocesses (v2.1.132).

Bash-tool scripts can now correlate themselves with the session_id passed to hooks. TITAN's titan-bash-guardrail.py and titan-token-saver.py could log against session, enabling per-session forensics. Effort: ~10 min.

9. Plan mode now blocks file writes even when Edit(...) allow-rule matches (v2.1.136).

Pure security tightening. Confirms TITAN's bypassPermissions defaultMode + plan mode is now properly layered.

10. settings.autoMode.hard_deny (v2.1.136).

Unconditional deny for auto-mode classifier. If TITAN ever flips into auto-mode for scheduled tasks, this is where you put rm -rf, git push --force, DROP TABLE, AWS credential paths, etc.

11. worktree.baseRef: 'fresh' | 'head' (v2.1.133).

Default flipped back to fresh (origin/<default>). If TITAN agent-isolation worktrees rely on local HEAD commits, set this to 'head' explicitly. Currently TITAN doesn't appear to use EnterWorktree heavily.

12. Native bfs/ugrep replacing Glob/Grep on macOS/Linux native builds (v2.1.117).

Faster searches, no tool round-trip. Windows unchanged — TITAN runs on Windows so this is mostly informational, except SCOUT memo searches will be faster on Linux/Mac mirror sessions.

Tier 3 — Useful to know, low priority

13. /recap command + CLAUDE_CODE_ENABLE_AWAY_SUMMARY (v2.1.108, v2.1.110). Auto session-recap when returning. TITAN's session_start_inject.py already provides this kind of context — check for redundancy.

14. Sub-agent progress summaries now use prompt cache (v2.1.128). Free 3× cost reduction on cache_creation for sub-agents — applies automatically. No patch needed; just confirm it's in effect.

15. Skill descriptions raised from 250 → 1,536 chars (v2.1.105). TITAN skills can have longer descriptions. Currently each SKILL.md is fine; this is headroom if you want richer routing hints.

16. claude project purge [path] (v2.1.126). Use to clean up Claude Code state for archived TITAN sub-projects (transcripts, file history, config entries).

17. PowerShell tool on Windows (v2.1.111, v2.1.119). TITAN runs on Windows. PowerShell tool can now be auto-approved like Bash. If TITAN is currently routing through Git Bash, opting into PowerShell tool could unify shell semantics. Watch out — TITAN's hooks call python F:/TITAN/... and assume POSIX-ish shell on Bash tool; switching primary shell to PowerShell could break 2>/dev/null || true chains throughout settings.json. Recommendation: do NOT enable yet.

---

Recommended Patches (priority order, NOT YET APPLIED)

Patch 1 — Wire duration_ms into titan-metrics.py

Why: Free per-tool latency signal lights up DARWIN/SCOUT diagnostics with zero extra work.

Where: F:/TITAN/scripts/titan-metrics.py

What changes: Read duration_ms from hook stdin JSON, append to per-tool histogram alongside existing token counts.

Effort: 20 min. Risk: zero — additive only.


# In titan-metrics.py, near where hook JSON is parsed:
hook_input = json.load(sys.stdin)
duration_ms = hook_input.get("duration_ms")  # NEW (v2.1.119+)
tool_name = hook_input.get("tool_name")
if duration_ms is not None:
    metrics_log.append({"tool": tool_name, "duration_ms": duration_ms, "ts": now})

Patch 2 — Make titan-injection-scan.py redact (not just flag) prompt-injection payloads

Why: Closes a real attack surface (web pages, file reads, search results) by sanitizing output BEFORE model sees it. Was MCP-only; now works on Read/WebFetch/WebSearch.

Where: F:/TITAN/scripts/titan-injection-scan.py

What changes: When injection pattern matches, return hookSpecificOutput.updatedToolOutput with the offending span replaced by [REDACTED: prompt-injection attempt].

Effort: 30 min. Risk: low — fail-open if hook errors (already does).


# Return shape (PostToolUse hook):
print(json.dumps({
  "hookSpecificOutput": {
    "updatedToolOutput": sanitized_text  # was: "decision": "block" or scan-only
  }
}))

Patch 3 — Upgrade PreCompact hooks to BLOCK when memory writes are pending

Why: TITAN's precompact_dump.py snapshots state, but if a VAULT write is mid-flight, compaction races. Now the hook can refuse compaction until the staging dir is quiescent.

Where: F:/TITAN/scripts/titan-precompact.py (or precompact_dump.py)

What changes: Check for lock files in F:/TITAN/knowledge/memory/staging/ or auto-memory/; if any are <30s old, exit 2 (or emit {"decision":"block","reason":"memory write in flight"}) to defer compaction by one turn.

Effort: 15 min. Risk: low — Claude will retry the compact in the next idle window.


# In titan-precompact.py:
if any_recent_lockfile_exists(STAGING_DIR, max_age_s=30):
    print(json.dumps({"decision": "block", "reason": "VAULT write in flight"}))
    sys.exit(2)

---

Patches NOT recommended yet

---

Top 3 Most TITAN-Impactful Features (Last 30 Days)

1. PostToolUse hook can replace tool output for all tools (v2.1.121) → enables redacting prompt-injection in Read/WebFetch/WebSearch.

2. PreCompact hook can block compaction (v2.1.105) → safer memory-write/compaction interleaving.

3. PostToolUse hook input now includes duration_ms (v2.1.119) → free per-tool latency telemetry.

All three are hook upgrades on hooks TITAN already runs. Highest ROI / lowest risk patch family in the entire 30-day window.

---

Sources