fix: native agent creation status error#473
fix: native agent creation status error#473suxinshuo wants to merge 1 commit intodataelement:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bb1c8ddfb
ℹ️ 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".
| agent.status = "idle" | ||
| agent.last_active_at = datetime.now(timezone.utc) |
There was a problem hiding this comment.
Preserve running status for newly created native agents
This change now forces every non-OpenClaw agent to idle at creation time and no longer calls agent_manager.start_container, so native agents no longer transition to running even in environments where runtime startup is available. That breaks features that still require running status (for example, backend/app/services/scheduler.py:43 skips scheduled executions, and backend/app/services/collaboration.py:39 rejects delegation), causing newly created native agents to lose automation/collaboration behavior until status is manually changed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
However, starting the native agent now also requires starting the OpenClaw container, which is unreasonable. If Docker isn't used for deployment, it will directly enter an idle state, affecting the two points mentioned above. Therefore, setting it to idle here is reasonable, at least it won't cause any further problems.

@yaojin3616 PTAL
Summary
Fix native agent creation status error.
This closes #472