resolveSandboxAgentId returns string | undefined but was passed
directly to resolveConfiguredImage which expects string.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The session-context hook pushed bootstrap entries without the required
`path` property, causing a TypeError in buildInjectedWorkspaceFiles when
it called .replace() on undefined. Add fallback to file.name when path
is missing, and skip entries with no path in the report builder.
Also add stack trace logging to lane task errors and embedded agent
failures to make future debugging faster.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The performance optimization that skips plugin loading for builtin
commands prevented memory-neo4j from registering its "neo4j" subcommand,
causing "openclaw memory neo4j sleep" to fail with "unknown command".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add task ledger (TASKS.md) parsing and stale-task archival for maintaining
agent task state across context compactions. Post-compaction recovery injects
memory_recall + TASKS.md read steps after auto-compaction. Sleep cycle gains
entity dedup (Phase 1d) and credential scanning. Memory flush now extracts
active task checkpoints. Compaction instructions prioritize active tasks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The upstream added --local-time as an opt-in flag, but our branch
already makes all timestamps local. Remove the dead parameter,
CLI option, and update tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a model's contextWindow is explicitly set in modelsConfig (openclaw.json),
don't warn about it being below 32k. The user deliberately chose that value.
The warning still fires for auto-detected (model metadata) and default sources.
shouldBlock is unaffected — hard minimum still enforced regardless of source.
Closes#13933
Allow small-context models like ollama/qwen2.5:7b-2k (2048 tokens) to
run without being blocked by the guard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gateway (pipecat compatibility):
- openai-http: add finish_reason:"stop" on final SSE chunk, fix ID format
(chatcmpl- not chatcmpl_), capture timestamp once, use delta only, add
writable checks and flush after writes
- http-common: add TCP_NODELAY, X-Accel-Buffering:no, flush after writes,
writable checks on writeDone
- agent-events: fix seqByRun memory leak in clearAgentRunContext
Voice-call security:
- manager.ts, twiml.ts, twilio.ts: escape voice/language XML attributes
to prevent XML injection
- voice-mapping: strip control characters in escapeXml
Voice-call bugs:
- tts-openai: fix broken resample24kTo8k (interpolation frac always 0)
- stt-openai-realtime: close zombie WebSocket on connection timeout
- telnyx: extract direction/from/to for inbound calls (were silently dropped)
- plivo: clean up 5 internal maps on terminal call states (memory leak)
- twilio: clean up callWebhookUrls on terminal call states
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents managed/bundled skill file paths from leaking into sandboxed
agent skill snapshots, which caused 'path escapes sandbox root' errors.
Adds scopeToWorkspace option to loadSkillEntries/buildWorkspaceSkillSnapshot.
Also fixes stale Docker mount detection on container probe failure.
Add `coreMemory.refreshAtContextPercent` config option to re-inject
core memories when context usage exceeds a threshold. This counters
the "lost in the middle" phenomenon documented by Liu et al. (2023).
Implementation:
- Extend before_agent_start hook event with context usage info
- Pass contextWindowTokens and estimatedUsedTokens to hooks
- Track mid-session refresh per session to prevent over-refreshing
- Clear refresh tracking on compaction
- Add comprehensive tests
Based on research: Liu et al., "Lost in the Middle: How Language
Models Use Long Contexts" (Stanford, 2023)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Detect configured memory plugins (memory-neo4j, memory-lancedb) and show
their status alongside core memory search. Provides helpful hints about
plugin-specific commands when plugins are enabled.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>