Skip to content

fix: native agent creation status error#473

Open
suxinshuo wants to merge 1 commit intodataelement:mainfrom
suxinshuo:hotfix/create_agent_status
Open

fix: native agent creation status error#473
suxinshuo wants to merge 1 commit intodataelement:mainfrom
suxinshuo:hotfix/create_agent_status

Conversation

@suxinshuo
Copy link
Copy Markdown
Contributor

Summary

Fix native agent creation status error.

This closes #472

Copy link
Copy Markdown

@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: 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".

Comment thread backend/app/api/agents.py
Comment on lines +344 to +345
agent.status = "idle"
agent.last_active_at = datetime.now(timezone.utc)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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.

[Bug] Native agent creation status error

1 participant