[BUG] read_console_messages cannot capture page-context console output
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
read_console_messages MCP tool does not capture any console output
(console.log, console.warn, console.error) from the page context (MAIN world).
Only Chrome extension content script messages are captured.
This makes the documented "Debug with console logs" workflow
(https://code.claude.com/docs/en/chrome#debug-with-console-logs) non-functional.
What Should Happen?
read_console_messages should capture console.log, console.warn, and
console.error output from the page context, allowing developers to add
console.log to their application code and have Claude read the output.
Error Messages/Logs
# After javascript_tool emits console.log/warn/error:
read_console_messages result:
"No console messages found for this tab."
# Only extension messages are ever captured:
[WARNING] (chrome-extension://acaonckckmmakfgjfkgbfeepdhmajkeg/static/js/content.js)
ObjectMultiplex - orphaned data for stream "publicConfig"
Steps to Reproduce
- Start
claude --chrome - Create a new MCP tab:
tabs_create_mcp - Navigate to any page:
navigateto https://example.com - Initialize tracking: call
read_console_messages(first call activates tracking) - Emit test logs via
javascript_tool:
console.log('[TEST] log message');
console.warn('[TEST] warn message');
console.error('[TEST] error message');
- Call
read_console_messageswith pattern "TEST" - Result: No messages found. Only extension content script messages are ever captured.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.80
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Tested on multiple domains (example.com, webchat.worksmobile.com:8090).
Tested with Chrome restart. Results are consistent.
The tool appears to listen only to the content script world console,
not the page (MAIN world) console. Since application code and
javascript_tool both execute in the page context, their console
output is invisible to read_console_messages.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗