- Updated extension.ts MCP server definition
- Updated server.ts config name
- Added auto-growing textarea to web interface
- Tool now referenced as HumanAgentMCP/HumanAgent_Chat (no space)
- Fixes tool reference issues in .agent.md files
- Implement exponential backoff for SSE reconnection (1s → 30s max, no timeout)
- Update connection status indicator (green/orange/red dot)
- Reset backoff and reconnect immediately when server manually started
- Add Report Issue and Request Feature options to cog menu
- Add bugs field to package.json for native VS Code issue reporting
- Improve README with actual usage instructions and troubleshooting
- Fix status indicator to update properly on disconnect
- Close EventSource to prevent browser auto-reconnect interference
- Added special handling for HumanAgent_Chat tool calls to prevent Node.js undici 5-minute timeout
- Send HTTP headers immediately with Transfer-Encoding: chunked to stop headersTimeout
- Implement 4-minute keepalive mechanism writing space character to reset bodyTimeout
- Allows indefinite wait times for human responses in tool calls
- Tested successfully with 35+ minute wait time without timeout
Resolves issue where VS Code MCP client would cancel tool calls after ~5-6 minutes
with error 'The user cancelled the tool call' due to undici hardcoded timeouts.
- Removed 'Reload Override File' option from cog menu
- Removed reloadOverrideFile() method and related handlers
- Clean solution: users restart VS Code when changing override files
- Startup override loading works perfectly with version-based cache invalidation
- Eliminates hanging 'Update Tools' process and duplicate tool issues
Override file changes now require VS Code restart/reload to take effect.
- Added serverVersion property to McpServerDefinitionProvider that updates on override reloads
- VS Code now refreshes cached tool definitions when server version changes
- Fixed tool override caching issue where old descriptions persisted
- Removed unnecessary delay in notification system
- Added debug endpoint /debug/tools for inspecting server-side tool definitions
Progress: Startup override loading now works correctly, investigating override reload hang in VS Code
- Added separate /mcp-tools endpoint for VS Code extension MCP protocol
- Maintained /mcp endpoint for webview SSE connections (heartbeats, messages)
- Eliminated competing SSE connections that caused message delivery failures
- Enhanced SSE connection health monitoring with detailed diagnostics
- Added connection state management to prevent race conditions
- Fixed sendToSession() to use proper health checking instead of raw writes
- Improved logging to track connection conflicts and message delivery
- Maintains proper session separation between different VS Code workspaces
This resolves the issue where VS Code webview received heartbeats but not
tool call messages due to competing SSE connections overwriting each other.
- README.md: Clean user-facing documentation with truthful feature descriptions
- ReadMeDev.md: Technical developer documentation with architecture details
- No exaggeration or marketing fluff - just what we actually built
- Covers real features: VS Code interface, MCP server, tool overrides, web interface
- Includes honest installation, configuration, and troubleshooting sections
- Removed hidden 300-second default timeout that created unpredictable behavior
- Tool now waits indefinitely if no timeout specified (explicit behavior)
- When timeout IS provided via params.timeout, uses that value exactly
- Tool overrides can still configure workspace-specific timeouts as before
- No more silent fallbacks - behavior is now explicit and predictable
- Added HumanAgentMcpProvider class with onDidChangeMcpServerDefinitions event
- Registered MCP provider with VS Code lm.registerMcpServerDefinitionProvider
- Added mcpServerDefinitionProviders contribution point to package.json
- Implemented startup event firing when override files exist
- Fixed session name loading timing by moving after server startup with retry
- Chat webview now fires MCP events when override files are reloaded
- VS Code Configure Tools will now automatically refresh tool descriptions
- Modified mcpConfigManager.ts to include sessionId in MCP URL configuration
- Fixed server.ts URL parsing to handle query parameters properly
- Enhanced reloadOverrideFile to trigger MCP notifications
- VS Code now shows custom tool descriptions from HumanAgentOverride.json
- Fixed JavaScript syntax error in escapeHtml comment that was breaking web interface
- Completed message formatting fix with CSS white-space: pre-wrap
- Fixed VS Code chat history synchronization by removing local message arrays
- Added unified message loading via server API for both VS Code and web
- Fixed display labels to show 'You (VS Code)' and 'You (Web)' consistently
- Implemented autoAppendEnabled logic to properly respect enable/disable setting
- Added default auto-append text for HumanAgent_Chat tool in templates
- Enhanced auto-append formatting with period + space and 'Appended:' prefix
- Added MCP tool notification method for dynamic tool discovery
- All web interface and VS Code chat functionality now working correctly
EXACTLY as requested - persist session names same way as session IDs:
✅ Session names saved to context.globalState when user names chat in VS Code
✅ Session names restored on startup and sent to server automatically
✅ Uses same workspace-based key system as session ID persistence
✅ Web interface will now show friendly names after VS Code restart
Workflow: VS Code 'Name This Chat' → persist to globalState → restore on startup → web shows friendly name
No web interface changes needed - server already has name display logic
MAJOR IMPROVEMENT: Replace confusing 'human-agent-request' event with clean 'request-state-change' SSE system
✅ NEW: request-state-change events for both web and VS Code interfaces
✅ CLEAN: Separate message display (via ChatManager) from input control (via request state)
✅ CONSISTENT: Both interfaces get same state updates via SSE
✅ ELIMINATED: Duplicate message display issues
✅ PROPER: Input enabling/disabling and 'waiting for response' indicators
States: 'waiting_for_response' → 'completed'
Benefits: Clean separation of concerns, no more mixed event types causing confusion
Ready for testing: VS Code input should enable when AI asks questions, disable when complete
✅ FIXED: AI messages now stored in ChatManager when HumanAgent_Chat tool is called
✅ FIXED: User messages stored with source tracking (web vs vscode)
✅ FIXED: Eliminated redundant /chat endpoint - only /response endpoint needed
✅ CONFIRMED: API shows correct message flow: AI → User → AI with proper storage
Key insight: AI communicates BY calling HumanAgent_Chat tool, not via responses afterward.
Message storage working perfectly. Only remaining issue: web interface display showing duplicates (storage is correct per curl verification)
Key changes:
- Fixed sessionId detection in HumanAgent_Chat tool (use sessionToUse instead of params.sessionId)
- Added source field to ChatMessage interface for tracking web vs vscode origin
- Updated web interface to show message source in headers
- Removed incorrect storage of human responses as assistant messages
- AI responses need proper capture mechanism (not human answers stored as AI responses)
Issue: Still need to eliminate redundant /chat endpoint causing potential duplicates
Found root cause: HumanAgent_Chat tool only stores AI responses when params.sessionId exists,
but sessionId detection may be failing. Only user messages are being stored in ChatManager,
causing web interface to show incomplete conversation history.
Next: Fix sessionId detection and add message source tracking.
- Removed pendingHumanRequests Map completely
- Added findPendingRequest() method to ChatManager for cross-session lookups
- Created minimal requestResolvers Map only for Promise resolve/reject functions
- Replaced all 9 calls to old system with ChatManager equivalents:
* /response endpoint now uses ChatManager.findPendingRequest()
* Timeout cleanup uses ChatManager.removePendingRequest()
* Request storage uses ChatManager.addPendingRequest() only
* respondToHumanRequest() and resolvePendingRequest() updated
- No more duplicate data storage - single source of truth in ChatManager
- All functionality preserved, cleaner architecture
- Added conversationToSession mapping to link VS Code conversation IDs to registered session IDs
- Updated handleToolCall to extract session ID from _meta.vscode.conversationId
- Auto-maps VS Code conversations to first available registered session
- Both VS Code and web interface now use same registered session ID
- Fixes 'No pending AI request found' error in web interface
- Changed 'Override Prompt' to contextual text:
- '📁 Create Override File' when file doesn't exist
- '📁 Recreate Override File' when file exists
- Added dynamic webview updating after override file creation
- Fixed cog menu not showing reload option when override created during session
- Added updateOverrideFileExists message handler to refresh menu state
- Fixed character encoding issues in webview menu options
- Remove all hardcoded tool description fallbacks
- Ensure override file creation fetches complete tool definition from server
- Verify IMPORTANT text is preserved in all tool descriptions
- Fix word wrapping for better code readability
- Confirm true single source of truth for all tool definitions
- Implement proper override file reload functionality with session re-registration
- Add tools endpoint with sessionId query parameter support
- Remove hardcoded tool description fallbacks (single source of truth)
- Fix ServerManager duplicate setTimeout in startServer method
- Add /response and /reload HTTP endpoints to server
- Ensure server remains independent across VS Code restarts
- Format long tool description for better readability
- Remove automatic status display on webview load (line 964)
- Fix status command routing - unified status display via dedicated command
- Remove unused showStatus command duplicate
- Add Override Prompt to default menu when status unknown
- Clean up status notification behavior - only show on manual request
- Remove session management complexity from MCP server and UI
- Update chatWebviewProvider for direct messaging without sessions
- Fix MCP tool response format to use content array as per specification
- Restore cog icon for MCP configuration (install global/local)
- Add safety checks for message content handling
- Resolve 'o.content is not iterable' error by using proper MCP format