openclaw - ✅(Solved) Fix [Bug]: openclaw agents add TypeError [1 pull requests, 4 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59654Fetched 2026-04-08 02:42:06
View on GitHub
Comments
4
Participants
4
Timeline
7
Reactions
0
Timeline (top)
commented ×4labeled ×2cross-referenced ×1

openclaw agents add ops

🦞 OpenClaw 2026.4.1 (da64a97) — No $999 stand required.

┌ Add OpenClaw agent │ ◇ Workspace directory │ /Users/lizhenzhong/.openclaw/workspace-ops │ ◇ Copy auth profiles from "main"? │ No │ ◇ Configure model/auth for this agent now? │ No 19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent TypeError: Cannot read properties of undefined (reading 'resolveConfigured')

Error Message

3.add agent error:19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent

Root Cause

openclaw agents add ops

🦞 OpenClaw 2026.4.1 (da64a97) — No $999 stand required.

┌ Add OpenClaw agent │ ◇ Workspace directory │ /Users/lizhenzhong/.openclaw/workspace-ops │ ◇ Copy auth profiles from "main"? │ No │ ◇ Configure model/auth for this agent now? │ No 19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent TypeError: Cannot read properties of undefined (reading 'resolveConfigured')

Fix Action

Fixed

PR fix notes

PR #59759: fix(cli): prevent unconditional model check when skipping auth in agents add

Description (problem / solution / changelog)

Summary

  • Problem: When running openclaw agents add and answering "No" to "Configure model/auth for this agent now?", the CLI crashes with TypeError: Cannot read properties of undefined (reading 'resolveConfigured'). This completely blocks adding new agents without immediate auth configuration. (Issue #59654)
  • Root Cause: The warnIfModelConfigLooksOff function was being called unconditionally after the auth prompt, even when wantsAuth === false. This function triggers loadModelCatalog, which loads provider plugins and initializes the plugin registry. Because the new agent's directory and auth state are not fully initialized when auth is skipped, subsequent channel setup logic (setupChannels -> collectChannelStatus) attempts to resolve the status of lazy-loaded channel setup wizards. These wizards fail to initialize their status property correctly in this incomplete state, leading to the TypeError when wizard.status.resolveConfigured is accessed.
  • Fix: Moved the warnIfModelConfigLooksOff call inside the if (wantsAuth) block. This ensures the model/auth consistency check only runs when the user actually configures auth, matching the behavior in the main setup.ts wizard. This prevents premature plugin registry initialization and avoids the downstream crash in channel setup.
  • What changed:
    • src/commands/agents.commands.add.ts: Moved warnIfModelConfigLooksOff inside the wantsAuth condition.
    • src/commands/agents.add.test.ts: Added a regression test to verify warnIfModelConfigLooksOff is not called when auth setup is skipped.
  • What did NOT change (scope boundary): The logic inside warnIfModelConfigLooksOff itself was not changed. The channel setup logic (setupChannels) and plugin loading mechanisms remain untouched. The fix is strictly limited to the control flow of the agents add wizard.

Reproduction

  1. Run openclaw agents add test-agent
  2. Enter a workspace directory
  3. Answer "No" to "Copy auth profiles from main?" (if prompted)
  4. Answer "No" to "Configure model/auth for this agent now?"
  5. Observe that the wizard continues to channel setup instead of crashing with a TypeError.

Risk / Mitigation

  • Risk: The model check warning might be skipped in cases where it would have been useful to warn the user about a missing default model.
  • Mitigation: This is the intended behavior when a user explicitly chooses not to configure auth/models at creation time. They can always run openclaw configure later. A regression test was added to agents.add.test.ts to ensure this specific interactive path remains stable and does not trigger the check.

Change Type (select all)

  • Bug fix

Scope (select all touched areas)

  • CLI

Linked Issue/PR

Fixes #59654

Changed files

  • src/commands/agents.add.test.ts (modified, +54/-0)
  • src/commands/agents.commands.add.ts (modified, +4/-5)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

openclaw agents add ops

🦞 OpenClaw 2026.4.1 (da64a97) — No $999 stand required.

┌ Add OpenClaw agent │ ◇ Workspace directory │ /Users/lizhenzhong/.openclaw/workspace-ops │ ◇ Copy auth profiles from "main"? │ No │ ◇ Configure model/auth for this agent now? │ No 19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent TypeError: Cannot read properties of undefined (reading 'resolveConfigured')

Steps to reproduce

1.openclaw agents add ops 2.any action 3.add agent error:19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent TypeError: Cannot read properties of undefined (reading 'resolveConfigured')

Expected behavior

add agent success

Actual behavior

19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent TypeError: Cannot read properties of undefined (reading 'resolveConfigured')

OpenClaw version

OpenClaw 2026.4.1 (da64a97)

Operating system

macOS

Install method

npm

Model

qwen3.5-plus

Provider / routing chain

openclaw

Additional provider/model setup details

openclaw agents add ops

🦞 OpenClaw 2026.4.1 (da64a97) — No $999 stand required.

┌ Add OpenClaw agent │ ◇ Workspace directory │ /Users/lizhenzhong/.openclaw/workspace-ops │ ◇ Copy auth profiles from "main"? │ No │ ◇ Configure model/auth for this agent now? │ No 19:58:57+08:00 [agents/auth-profiles] inherited auth-profiles from main agent TypeError: Cannot read properties of undefined (reading 'resolveConfigured')

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The error "TypeError: Cannot read properties of undefined (reading 'resolveConfigured')" suggests a configuration issue when adding an OpenClaw agent, which may be resolved by verifying the configuration setup or updating the OpenClaw version.

Guidance

  • Verify that the resolveConfigured property is correctly defined in the configuration files or code related to the OpenClaw agent setup.
  • Check the OpenClaw documentation for any specific requirements or changes in configuration for version 2026.4.1.
  • Ensure that the auth-profiles inheritance from the "main" agent is properly configured, as the error occurs during this process.
  • Review the OpenClaw version history for any known issues or fixes related to agent configuration and authentication profiles.

Example

No specific code example can be provided without more context on the configuration files or code structure used by OpenClaw.

Notes

The provided information does not include detailed configuration files, code snippets, or specific version history, which could help in pinpointing the exact cause. The solution may involve updating configurations, checking for version-specific bugs, or adjusting the authentication profile setup.

Recommendation

Apply workaround: Given the lack of detailed information on the configuration and version history, the best approach is to carefully review and adjust the configuration settings related to agent setup and authentication profiles, ensuring they align with the requirements of OpenClaw version 2026.4.1.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

add agent success

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING