fix(mothership): keep display activity out of integration and mcp tool arguments by waleedlatif1 · Pull Request #9284 · simstudioai/sim · GitHub
Skip to content

fix(mothership): keep display activity out of integration and mcp tool arguments - #9284

Merged
waleedlatif1 merged 5 commits into
stagingfrom
fix/strip-activity-app-tools
Oct 21, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
fix/strip-activity-app-tools

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • When the agent grouped integration calls under an activity, Sim's stream handler copied the gateway call's display activity into the resolved operation's arguments, so the tool received a key it never declared; an MCP server's strict schema refused it (must NOT have additional properties 'activity') and the agent had to retry without the grouping
  • The handler now completes only a display label the frame's own arguments carry. An inherited grouping is held on the call state (ToolCallState.activity, beside activityDescription) and never enters the arguments, which execute exactly as given
  • Persistence merges the held grouping back into the stored arguments, so history keeps grouping the call as before; the stored format is unchanged
  • A tool's own activity argument (e.g. Azure DevOps' Activity field) can no longer be overwritten by the gateway's grouping

Type of Change

  • Bug fix

Testing

  • Handler: a resolved MCP operation under a completed gateway grouping executes with exactly its own arguments; an Azure DevOps operation keeps its Activity string
  • Persistence: a resolved operation's inherited grouping is stored with its arguments
  • All three fail before the fix; lib/mothership and home suites pass

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/mothership/tool-executor/executor.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Separates inherited display grouping from arguments sent to integration and MCP tools. History restores the grouping without overwriting a tool’s own activity argument.

  • Resolved integration calls keep gateway labels out of their tool arguments.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Gateway display grouping] --> B[ToolCallState.activity]
  C[Operation arguments] --> D[Tool execution]
  B --> E[Stored history arguments]
  C --> E
Loading

Reviews (5) · Last reviewed commit: "fix(mothership): persist an inherited gr..." · Reviewed by Greptile

Comment thread apps/sim/lib/mothership/tool-executor/executor.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/mothership/request/handlers/handlers.test.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/mothership/chat/persisted-message.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit b1168ac into staging Oct 21, 2026
55 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/strip-activity-app-tools branch October 21, 2026 18:42

This branch was previously deployed

1 inactive deployment
Preview — 893a1edf Deployed Oct 21, 2026 by vercel[bot]
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