Skip to content

fix(core): enhance shell agent-file exception robustness#835

Open
StoneChin wants to merge 2 commits intoMoonshotAI:mainfrom
StoneChin:main
Open

fix(core): enhance shell agent-file exception robustness#835
StoneChin wants to merge 2 commits intoMoonshotAI:mainfrom
StoneChin:main

Conversation

@StoneChin
Copy link

@StoneChin StoneChin commented Feb 1, 2026

Related Issue

Resolve #826

Description

#826

  1. Following Agent 配置包含 subagents 时启动静默失败(Exit code 1,无错误输出) || Agent configuration fails to start silently when it contains subagents (Exit code 1, no error output) #826 thought, I discovered more related bugs. Incorrect document formatting may cause bugs like empty yaml file or the file contains only one line of string. This bug is caused by incorrect return type of yaml.safe_load() in file src/kimi-cli/agentspec.py
  2. Referring to the agent usage logic of gemini-cli, when a sub-agent error occurs, an error is output in the terminal, and the system starts with default parameters. Therefore, I believe that the logic for using agent-file should be changed to something similar.
  3. add src/kimi-cli/exception.py simple exception log example for Agent 配置包含 subagents 时启动静默失败(Exit code 1,无错误输出) || Agent configuration fails to start silently when it contains subagents (Exit code 1, no error output) #826. (Maybe it's not necessary.)

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View issues and 3 additional flags in Devin Review.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant