Skip to content

fix: return stall feedback in send_message response (#1325)#1612

Merged
OneStepAt4time merged 1 commit intodevelopfrom
fix/1325-send-message-stall-feedback
Apr 10, 2026
Merged

fix: return stall feedback in send_message response (#1325)#1612
OneStepAt4time merged 1 commit intodevelopfrom
fix/1325-send-message-stall-feedback

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Changes

  • monitor.ts: Add public getStallInfo(sessionId) method — returns {stalled: true, types: [...]} or {stalled: false}
  • session.ts: sendMessage() accepts optional stallInfo param, includes it in return when provided
  • server.ts: HTTP handler queries monitor for stall info before sending, includes stall field in response
  • mcp-server.ts: Updated SendMessageResponse interface and tool description to surface stall info
  • stall-detection.test.ts: 4 new tests for getStallInfo (empty, active, cleared, removed)

Response examples

Not stalled:

{ "ok": true, "delivered": true, "attempts": 1 }

Stalled (extended thinking):

{ "ok": true, "delivered": true, "attempts": 1, "stall": { "stalled": true, "types": ["thinking"] } }

Stalled (permission prompt):

{ "ok": true, "delivered": true, "attempts": 1, "stall": { "stalled": true, "types": ["permission"] } }

Test plan

  • npx tsc --noEmit — no new type errors
  • npm test — 5521 tests pass (4 new)
  • Manual: send message to a session in extended thinking, verify stall field in response

Aegis version

Developed with: v2.9.0

Closes #1325

Generated by Hephaestus (Aegis dev agent)

When a session is stalled (extended thinking, permission prompt, unknown
state), send_message now includes stall information in the response so
callers know the session may not process the message.

- Add SessionMonitor.getStallInfo() to query active stall types
- Thread stall info through sendMessage() → HTTP/MCP response
- Add stall field to SendMessageResponse interface
- Add tests for getStallInfo covering tracked, cleared, and removed sessions

Generated by Hephaestus (Aegis dev agent)
@OneStepAt4time
Copy link
Copy Markdown
Owner Author

🔧 PR #1612 CLEAN. Ready for review.

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

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

✅ Approved.

Issue #1325 — Surface stall info in send_message response.

Clean implementation:

  • SessionMonitor.getStallInfo() returns active stall types or { stalled: false }
  • Propagated through sendMessage() → API response → MCP tool
  • MCP tool description updated to document stall feedback
  • 4 test cases: no stall, multiple stall types, cleared stalls, removed session
  • No breaking changes — stall field is optional in response

5 files, 65 lines. CI green.

@OneStepAt4time OneStepAt4time merged commit 49d1051 into develop Apr 10, 2026
11 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/1325-send-message-stall-feedback branch April 10, 2026 17:13
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