Skip to content

Fix boot timing, CLI flags, and SSH quoting (review sweep #40)#41

Open
TechNickAI wants to merge 3 commits intomainfrom
review-sweep-40
Open

Fix boot timing, CLI flags, and SSH quoting (review sweep #40)#41
TechNickAI wants to merge 3 commits intomainfrom
review-sweep-40

Conversation

@TechNickAI
Copy link
Owner

Summary

Follow-up fixes from bot review of PR #40 (fleet-announce + BOOT.md).

  • BOOT.md: Reorder steps so conversation recovery check (Step 1) happens before reading context files. The 1-minute recovery window was being measured after Orient loaded SOUL.md/USER.md/memory — by then significant time could have elapsed. Session store data is accessible from the system prompt's agent ID without reading any files first.
  • fleet-announce.md: Fix -t/-m short flags → --target/--message to match all other openclaw message send usages in the codebase
  • fleet-announce.md: Change SSH command quoting to single quotes so $, backticks, and backslashes in announcement messages aren't expanded by the local shell before reaching SSH

Test plan

  • Review BOOT.md step ordering makes sense end-to-end
  • Verify fleet-announce.md SSH command template is syntactically correct
  • Check --target/--message flags match health-check.md and other usages

🤖 Generated with Claude Code

- BOOT.md: Move conversation recovery check to Step 1 so the 1-minute
  window is measured from actual restart time, not after Orient finishes
  loading SOUL.md/USER.md/memory files
- fleet-announce.md: Use --target/--message long flags for consistency
  with all other openclaw CLI usages in the codebase
- fleet-announce.md: Wrap SSH command in single quotes so $ signs,
  backticks, and backslashes in messages aren't expanded by local shell

Addresses bot feedback from PR #40 review sweep.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TechNickAI TechNickAI added review-sweep Follow-up fixes from PR review comments Hex Created by Hex labels Mar 25, 2026
- BOOT.md: Interrupted path now runs Orient (Step 2) before sending
  recovery message, ensuring SOUL.md/USER.md/memory are always loaded
- fleet-announce.md: Update escaping note to cover single-quote escaping
  (escape as '\'' when using single-quote outer SSH quoting)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81ad263c52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 93 to 94
ssh <host> 'openclaw message send --channel <channel> --target <recipient_id> --message "<message>"'
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Escape apostrophes before interpolating announcement text

The new ssh template wraps the entire remote command in single quotes, so an unescaped apostrophe inside <message> (for example, don't or Nick's) terminates the local quote and causes a shell parse error before the command is sent. Because fleet announcements are natural-language messages that commonly contain contractions, following this template as written will fail for valid messages.

Useful? React with 👍 / 👎.


```bash
ssh <host> "openclaw message send --channel <channel> -t <recipient_id> -m '<message>'"
ssh <host> 'openclaw message send --channel <channel> --target <recipient_id> --message "<message>"'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent remote expansion inside quoted message payload

Using --message "<message>" in the remote command still allows the remote shell to expand $..., ..., and $() before openclaw message send receives the text. That means announcement content containing these characters can be altered (or trigger command substitution) instead of being delivered literally, which contradicts the intent of preserving message text through SSH.

Useful? React with 👍 / 👎.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Both outer-single-quote and outer-double-quote SSH templates have edge
cases for natural language messages (contractions, dollar signs, backticks).
Use Python subprocess + shlex.quote() which handles all special characters
correctly regardless of message content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hex Created by Hex review-sweep Follow-up fixes from PR review comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant