fix(setup): non-destructive sync + context window reduction#34
Merged
Conversation
- fullLengthMessages: 5 → 3 - additionalMessages: 15 → 7 - fullMaxChars: 2000 → 1500 - truncatedMaxChars: 500 → 400 Total messages injected per message: 20 → 10. Root cause: in active group threads with many long agent responses, the per-message context injection was pushing even fresh sessions over the model's context limit. /new and /reset don't help because the history is re-injected from the platform on every incoming message, not from session history. Also applied to installed extension at .openclaw/extensions/ax-platform/ and switched compaction.mode to 'summarize' in openclaw.json.
setup.sh sync was overwriting critical config during agent credential updates — hardcoding backendUrl, wiping workspace paths, deleting heartbeat/model config, clearing the plugin install manifest, and removing staging agents not in ax-agents.env. Changes: - sync now only updates plugins.entries.ax-platform.config.agents - agent entries and bindings are merged (add missing, never overwrite) - extension files are copied over (no delete-first) - config is backed up before every sync (~/.openclaw/backups/) - gateway restart uses openclaw CLI with proper process detection - CLAUDE.md updated to document the safe deployment flow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed
setup.sh (major rewrite)
syncnow only updatesplugins.entries.ax-platform.config.agents~/.openclaw/backups/openclaw gatewayCLI with proper Linux process detectionextension/lib/context.ts
fullLengthMessages: 5 to 3additionalMessages: 15 to 7fullMaxChars: 2000 to 1500truncatedMaxChars: 500 to 400CLAUDE.md
Test plan
🤖 Generated with Claude Code