-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Subagent completion output leaks internal tool-failure reasoning to requester session #39032
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
When a subagent encounters a tool failure (e.g. calling
messagewith a session key instead of a Telegram chat ID), the agent's internal reasoning about the failure leaks into the auto-announce completion output delivered to the requester session.Steps to reproduce
sessions_spawnmessagetool with a session key (e.g.agent:main:main) instead of a Telegram chat ID"The message tool needs a Telegram chat ID, not a session key..."Expected behaviour
Subagent completion output should only include the final task result, not internal tool-failure reasoning or debugging thoughts.
Actual behaviour
Internal reasoning / error-handling thoughts from the subagent are forwarded to the requester as part of the completion announcement.
Impact
Proposed fixes
messagetool in subagent context so it cannot be called with session key format (validate input, reject early with helpful error)Workaround
Updated all subagent
AGENTS.mdfiles with explicit rule: usesessions_send(notmessagetool) for inter-agent communication. This prevents the trigger but doesn't fix the underlying leak.Environment
message(channel tool)