Skip to content

Comments

Improve execute_commands response schema and diagnostics#4

Open
cuspymd wants to merge 3 commits intomainfrom
feat/execute-commands-response-improvements
Open

Improve execute_commands response schema and diagnostics#4
cuspymd wants to merge 3 commits intomainfrom
feat/execute-commands-response-improvements

Conversation

@cuspymd
Copy link
Owner

@cuspymd cuspymd commented Feb 19, 2026

Improves execute_commands response schema and diagnostics, including per-command status fields, safety rejection per-command results, and related tests/docs.

Copy link

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

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: 94a4504d6a

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +235 to +236
CommandOutcomeAnalyzer.Outcome outcome =
CommandOutcomeAnalyzer.analyze(true, chatMessages, result.getSummary());

Choose a reason for hiding this comment

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

P1 Badge Filter non-command chat before classifying command outcomes

applyOutcomeAnalysis derives status/applied from the raw chatMessages list, but that list is fed by ChatMessageCapture (via ChatHud.addMessage) and therefore includes unrelated player/server chat. On multiplayer or noisy servers, an unrelated message containing markers like "cannot" or "successfully" can misclassify a command as rejected_by_game or applied, which breaks the new per-command diagnostics and any automation consuming them.

Useful? React with 👍 / 👎.


private CommandResult executeCommandWithTimeout(String command) {
try {
return executeOneCommand(command).get(config.getServer().getRequestTimeoutMs(), TimeUnit.MILLISECONDS);

Choose a reason for hiding this comment

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

P1 Badge Cancel timed-out command execution before continuing sequence

The timeout path returns a synthetic timed_out result but never cancels the underlying CompletableFuture; executeOneCommand can still run later and call sendChatCommand. When requestTimeoutMs is low or the client thread is stalled, the loop proceeds to subsequent commands while the timed-out command may execute afterward, violating the documented sequential behavior and making the reported status diverge from actual world changes.

Useful? React with 👍 / 👎.

…-response-improvements

# Conflicts:
#	src/client/java/cuspymd/mcp/mod/command/CommandExecutor.java
#	src/main/java/cuspymd/mcp/mod/server/MCPProtocol.java
#	src/test/java/cuspymd/mcp/mod/server/MCPProtocolTest.java
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