Skip to content

feat: support OPENCLAW_PROFILE env var for multi-profile setups#1

Merged
jontsai merged 1 commit intomainfrom
feat/openclaw-profile-support
Feb 4, 2026
Merged

feat: support OPENCLAW_PROFILE env var for multi-profile setups#1
jontsai merged 1 commit intomainfrom
feat/openclaw-profile-support

Conversation

@jontsai
Copy link
Copy Markdown
Owner

@jontsai jontsai commented Feb 4, 2026

Summary

  • All openclaw CLI invocations (via runOpenClaw() and one direct execSync call) now respect the OPENCLAW_PROFILE environment variable
  • When set, appends --profile <name> to every openclaw command
  • Backward compatible — no change in behavior when OPENCLAW_PROFILE is unset

Problem

Without --profile, openclaw uses the default profile which may return non-JSON output (e.g. interactive/styled text with box-drawing characters), causing JSON parse failures and empty session lists on the dashboard.

Test plan

  • Start dashboard with OPENCLAW_PROFILE=myprofile npm start and verify sessions load
  • Start dashboard without OPENCLAW_PROFILE and verify no regression (uses default profile)
  • Verify /api/sessions returns valid JSON with session data

🤖 Generated with Claude Code

All `openclaw` CLI invocations now respect the `OPENCLAW_PROFILE`
environment variable, appending `--profile <name>` when set.

Fixes session listing returning non-JSON output when the default
profile doesn't match the target OpenClaw instance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jontsai jontsai merged commit b3c014c into main Feb 4, 2026
4 checks passed
@jontsai jontsai deleted the feat/openclaw-profile-support branch February 4, 2026 05:34
jontsai added a commit that referenced this pull request Feb 11, 2026
All `openclaw` CLI invocations now respect the `OPENCLAW_PROFILE`
environment variable, appending `--profile <name>` when set.

Fixes session listing returning non-JSON output when the default
profile doesn't match the target OpenClaw instance.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant