fix: preserve MCP session lifecycle across sequential tool calls#3143
Draft
leonam13 wants to merge 1 commit intomobile-dev-inc:mainfrom
Draft
fix: preserve MCP session lifecycle across sequential tool calls#3143leonam13 wants to merge 1 commit intomobile-dev-inc:mainfrom
leonam13 wants to merge 1 commit intomobile-dev-inc:mainfrom
Conversation
Keep MCP tools from tearing down Maestro sessions after each invocation by reusing persistent sessions and isolating one-shot cleanup to CLI flows. This avoids repeated driver reinstall/startup between back-to-back MCP commands while preserving original command failures when cleanup also errors. Made-with: Cursor
1 task
Contributor
|
Had a test of this @leonam13 and it still seemed to be failing after a while for me - also then running CLI separately afterwards still had an error launching app too - have you tested this out? |
Author
|
@simon-gilmurray there are two different issues. When running MCP and then running CLI, the latter will drop the former. I've been experiencing this issue and the workaround was to avoid using CLI while the MCP session is on. For a pure MCP test, this did it work for me, the agent was able to launch and stop the app multiple times, only invoking the launch app tool. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This solves this issue: #3142
closeOnCompletionis disabledTest plan
./gradlew :maestro-cli:compileKotlinlaunch_appthenrun_flow) and verify no repeated driver reinstall