Skip to content

fix: clarify subagent and background task stop messages as user-initiated - #189

Merged
kermanx merged 1 commit into
mainfrom
fix/subagent-stop-wording
May 29, 2026
Merged

fix: clarify subagent and background task stop messages as user-initiated#189
kermanx merged 1 commit into
mainfrom
fix/subagent-stop-wording

Conversation

@kermanx

@kermanx kermanx commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — this is a small wording fix observed during usage.

Problem

When a user stops a foreground subagent (e.g. via Ctrl+C or session termination) or stops a background task, the agent receives a generic failure message like subagent error: Aborted or background task killed.. This wording is ambiguous and does not make it clear that the interruption was initiated by the user, not an internal error.

What changed

  • Foreground subagent (AgentTool): When the subagent promise rejects with an AbortError, the tool result now says The subagent was stopped by the user. instead of the raw abort message.
  • Background task notification (BackgroundManager): When a background task reaches the killed state, the notification body now says {description} was stopped by the user. instead of {description} killed..
  • Timeout cases remain unchanged and still report Agent timed out after Xs..
  • Updated the corresponding test assertion in background-manager.test.ts.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cd2957f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/agent-core Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@cd2957f
npx https://pkg.pr.new/@moonshot-ai/kimi-code@cd2957f

commit: cd2957f

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: f8aff05ad6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/agent-core/src/agent/background/index.ts Outdated
@kermanx
kermanx force-pushed the fix/subagent-stop-wording branch from f8aff05 to cd2957f Compare May 29, 2026 05:18
@kermanx
kermanx merged commit 564721f into main May 29, 2026
6 checks passed
@kermanx
kermanx deleted the fix/subagent-stop-wording branch May 29, 2026 05:22
@github-actions github-actions Bot mentioned this pull request May 29, 2026
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