Summary
Make the trajectory flush timeout (time before reasoning traces are flushed to storage) configurable via openclaw.json or environment variables.
Problem to solve
The trajectory flush timeout is currently hardcoded in OpenClaw. This prevents tuning for different use cases:
- Longer timeouts reduce excessive storage writes for complex, multi-step reasoning tasks
- Shorter timeouts improve low-latency interactive use
Self-hosted deployments with specific infrastructure constraints cannot adjust this behavior without modifying source code.
Proposed solution
Add a configurable parameter:
- Config key: trajectoryFlushTimeoutMs in openclaw.json (e.g., under reasoning or traces section)
- Environment variable fallback: OPENCLAW_TRAJECTORY_FLUSH_TIMEOUT_MS
Default to the current hardcoded value if not set to maintain backward compatibility.
Alternatives considered
None — this is a core configuration knob that should be user-adjustable. Modifying source code directly is not sustainable for self-hosted deployments.
Impact
- Affected users/systems: Self-hosted OpenClaw operators, users running reasoning-heavy workloads, low-latency interactive use cases
- Severity: Medium (blocks optimal tuning for specific use cases)
- Frequency: Always (affects all deployments that need to tune this behavior)
- Consequence: Excessive storage writes for long reasoning tasks, delayed trace availability for interactive use, extra manual work to patch source code
Evidence/examples
Raised as part of self-hosted OpenClaw deployment where reasoning trace storage behavior needs tuning to specific infrastructure constraints.
Additional information
Must remain backward-compatible with existing config keys. Default value should match the current hardcoded timeout to avoid breaking changes.
Summary
Make the trajectory flush timeout (time before reasoning traces are flushed to storage) configurable via openclaw.json or environment variables.
Problem to solve
The trajectory flush timeout is currently hardcoded in OpenClaw. This prevents tuning for different use cases:
Self-hosted deployments with specific infrastructure constraints cannot adjust this behavior without modifying source code.
Proposed solution
Add a configurable parameter:
Default to the current hardcoded value if not set to maintain backward compatibility.
Alternatives considered
None — this is a core configuration knob that should be user-adjustable. Modifying source code directly is not sustainable for self-hosted deployments.
Impact
Evidence/examples
Raised as part of self-hosted OpenClaw deployment where reasoning trace storage behavior needs tuning to specific infrastructure constraints.
Additional information
Must remain backward-compatible with existing config keys. Default value should match the current hardcoded timeout to avoid breaking changes.