debug command provides debugging utilities for troubleshooting Codex internals, primarily focused on app server communication.
Usage
Subcommands
app-server
Debug app server communication and protocol issues:send-message-v2
Send a test message to a running app server (V2 protocol):Examples
Test App Server Connection
Start an app server in one terminal:Debug Protocol Issues
When debugging IDE integration issues, you can manually send messages to verify the app server is responding correctly.Use Cases
IDE Integration Development
When building IDE extensions that communicate with the Codex app server:- Start the app server with debug logging
- Use debug commands to send test messages
- Verify responses match expected schema
Protocol Debugging
Test JSON-RPC message handling:CI Testing
Verify app server functionality in automated tests:Internal Use
These commands are primarily intended for internal development and debugging. Regular users typically don’t need these tools.
Related Commands
codex app-server
Start the app server
App Server API
App server API documentation
Troubleshooting
App Server Not Responding
If the app server doesn’t respond to debug commands:- Verify the app server is running
- Check that stdio transport is being used
- Review app server logs for errors
Protocol Errors
If you see JSON-RPC protocol errors:- Ensure you’re using the correct protocol version (V2)
- Verify message format matches the schema
- Check for missing required fields