Trunkate AI

SuspiciousAudited by ClawScan on May 10, 2026.

Overview

Trunkate AI matches its context-compression purpose, but its recommended silent hooks can automatically send session history to an external API and replace the agent’s memory without clear per-request control.

Before installing, decide whether your conversation history and project context may be sent to Trunkate. Prefer manual invocation or a confirmed threshold-based mode, review any optimized history before it replaces the original, and secure the TRUNKATE_API_KEY.

Findings (5)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

Conversation history, project details, logs, and other context may be transmitted to Trunkate for processing.

Why it was flagged

The optimizer posts the supplied prompt text to a remote Trunkate API using the user's API key; when invoked by the hook, that prompt can be the active session history.

Skill content
payload = {"text": prompt, "budget": budget, "model": model}
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
response = requests.post(f"{api_url}/optimize", json=payload, headers=headers, timeout=10)
Recommendation

Use this only for data you are comfortable sending to Trunkate, and require clear retention/privacy terms plus user-controlled approval for automatic uploads.

What this means

If the summary is wrong, incomplete, or manipulated, future agent behavior can be steered by altered memory; sensitive restored content may also re-enter the agent state pipeline.

Why it was flagged

A remote optimization result is restored and emitted as an OpenClaw directive to replace the agent's history.

Skill content
optimized_filtered = optimize_prompt(filtered_history, budget=target_budget)
...
optimized = _restore_sensitive_content(optimized_filtered, protected_blocks)
...
print(f"OPENCLAW_ACTION:SET_HISTORY={optimized}")
Recommendation

Show a diff or summary for user approval before SET_HISTORY, validate remote output, and keep a reversible backup of the original history.

What this means

The skill can incur API use, transmit history, and alter context automatically during normal agent operation.

Why it was flagged

The activator is designed to optimize whenever a history file is available, rather than requiring explicit user approval for each high-impact memory rewrite.

Skill content
# Proactive Principle: We systematically optimize every call to ensure 
# the agent's memory is always lean and cost-effective.
if not history_path or not os.path.exists(history_path):
    return
Recommendation

Gate automatic optimization behind a real token threshold, provide a manual-only mode, and require confirmation before high-impact history changes.

ConcernMedium Confidence
ASI05: Unexpected Code Execution
What this means

A path-resolution mistake could execute unintended local code with access to OpenClaw state and the Trunkate API key.

Why it was flagged

The hook executes a relative subprocess path. If the hook is launched from an unexpected working directory, it could run a different scripts/activator.py while inheriting environment variables.

Skill content
script_path = os.path.join("scripts", "activator.py")
...
subprocess.run(
    [sys.executable, script_path], 
    env=os.environ.copy(), 
    check=True
)
Recommendation

Resolve the activator path relative to the hook file, verify the target path before execution, and avoid passing unnecessary environment variables.

What this means

Anyone with access to the environment or process could potentially use the Trunkate API key.

Why it was flagged

The skill uses a Trunkate API key to authenticate requests, which is expected for this integration but still grants delegated access to the service.

Skill content
api_key = os.environ.get("TRUNKATE_API_KEY")
...
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
Recommendation

Use a scoped key if available, store it securely, and rotate it if exposed.