This document helps agents quickly answer:
- Which app-server events CodexMonitor supports right now.
- Which app-server requests CodexMonitor sends right now.
- Where to look in CodexMonitor to add support.
- Where to look in
../Codexto compare event lists and find emitters.
When updating this document:
- Fetch latest refs with
git -C ../Codex fetch --all --prune. - Update the Codex hash in the title using
git -C ../Codex rev-parse origin/main. - Compare Codex events vs CodexMonitor routing.
- Compare Codex client request methods vs CodexMonitor outgoing request methods.
- Compare Codex server request methods vs CodexMonitor inbound request handling.
- Update supported and missing lists below.
Related project skill:
.codex/skills/app-server-events-sync/SKILL.md
Primary app-server event source of truth (methods + typed parsing helpers):
src/utils/appServerEvents.ts
Primary event router:
src/features/app/hooks/useAppServerEvents.ts
Event handler composition:
src/features/threads/hooks/useThreadEventHandlers.ts
Thread/turn/item handlers:
src/features/threads/hooks/useThreadTurnEvents.tssrc/features/threads/hooks/useThreadItemEvents.tssrc/features/threads/hooks/useThreadApprovalEvents.tssrc/features/threads/hooks/useThreadUserInputEvents.tssrc/features/skills/hooks/useSkills.ts
State updates:
src/features/threads/hooks/useThreadsReducer.ts
Item normalization / display shaping:
src/utils/threadItems.ts
UI rendering of items:
src/features/messages/components/Messages.tsx
Primary outgoing request layer:
src/services/tauri.tssrc-tauri/src/shared/codex_core.rssrc-tauri/src/codex/mod.rssrc-tauri/src/bin/codex_monitor_daemon.rs
These are the current Codex v2 ServerNotification methods that CodexMonitor
supports in src/utils/appServerEvents.ts (SUPPORTED_APP_SERVER_METHODS) and
then either routes in useAppServerEvents.ts or handles in feature-specific
subscriptions.
account/login/completedaccount/rateLimits/updatedaccount/updatedapp/list/updatederrorhook/completedhook/starteditem/agentMessage/deltaitem/commandExecution/outputDeltaitem/commandExecution/terminalInteractionitem/completeditem/fileChange/outputDeltaitem/plan/deltaitem/reasoning/summaryPartAddeditem/reasoning/summaryTextDeltaitem/reasoning/textDeltaitem/startedthread/archivedthread/closedthread/name/updatedthread/startedthread/status/changedthread/tokenUsage/updatedthread/unarchivedturn/completedturn/diff/updatedturn/plan/updatedturn/started
These arrive on the same frontend event stream but are not Codex v2
ServerNotification methods:
- approval requests ending in
requestApproval, includingitem/commandExecution/requestApproval,item/fileChange/requestApproval, anditem/permissions/requestApproval, via suffix match inisApprovalRequestMethod(method) item/tool/requestUserInput(a Codex v2 server request, not a notification)codex/backgroundThread(CodexMonitor synthetic bridge event)codex/connected(CodexMonitor synthetic bridge event)codex/event/skills_update_available(handled viaisSkillsUpdateAvailableEvent(...)inuseSkills.ts)
Codex currently exposes two compaction signals:
- Preferred:
item/started+item/completedwithitem.type = "contextCompaction"(ThreadItem::ContextCompaction). - Deprecated:
thread/compacted(ContextCompactedNotification).
CodexMonitor status:
- It routes
item/startedanditem/completed, so the preferred signal reaches the frontend event layer. - It renders/stores
contextCompactionitems via the normal item lifecycle. - It no longer routes deprecated
thread/compacted.
Compared against Codex app-server protocol v2 notifications, the following events are currently not routed:
configWarningcommand/exec/outputDeltadeprecationNoticefuzzyFileSearch/sessionCompletedfuzzyFileSearch/sessionUpdateditem/mcpToolCall/progressitem/autoApprovalReview/completeditem/autoApprovalReview/startedmcpServer/oauthLogin/completedmcpServer/startupStatus/updatedmodel/reroutedrawResponseItem/completedserverRequest/resolvedskills/changedthread/compacted(deprecated; intentionally not routed)thread/realtime/closedthread/realtime/errorthread/realtime/itemAddedthread/realtime/outputAudio/deltathread/realtime/startedthread/realtime/transcriptUpdatedwindows/worldWritableWarningwindowsSandbox/setupCompleted
These are v2 request methods CodexMonitor currently sends to Codex app-server:
thread/startthread/resumethread/forkthread/listthread/archivethread/compact/startthread/name/setturn/startturn/steer(used for explicit steer follow-ups while a turn is active)turn/interruptreview/startmodel/listexperimentalFeature/listcollaborationMode/listmcpServerStatus/listaccount/login/startaccount/login/cancelaccount/rateLimits/readaccount/readskills/listapp/list
Notes:
turn/startnow forwards the optionalserviceTieroverride ("fast"for/fast,nullfor default/off) alongsidemodel,effort, andcollaborationMode.
Compared against Codex v2 request methods, CodexMonitor currently does not send:
account/logoutcommand/execcommand/exec/resizecommand/exec/terminatecommand/exec/writeconfig/batchWriteconfig/mcpServer/reloadconfig/readconfig/value/writeconfigRequirements/readexternalAgentConfig/detectexternalAgentConfig/importfeedback/uploadfs/copyfs/createDirectoryfs/getMetadatafs/readDirectoryfs/readFilefs/removefs/writeFilefuzzyFileSearch/sessionStartfuzzyFileSearch/sessionStopfuzzyFileSearch/sessionUpdatemcpServer/oauth/loginmock/experimentalMethodplugin/installplugin/listplugin/readplugin/uninstallskills/config/writethread/backgroundTerminals/cleanthread/decrement_elicitationthread/increment_elicitationthread/loaded/listthread/metadata/updatethread/readthread/realtime/appendAudiothread/realtime/appendTextthread/realtime/startthread/realtime/stopthread/rollbackthread/shellCommandthread/unarchivethread/unsubscribewindowsSandbox/setupStart
Supported server requests:
item/commandExecution/requestApprovalitem/fileChange/requestApprovalitem/permissions/requestApprovalitem/tool/requestUserInput
Missing server requests:
item/tool/callaccount/chatgptAuthTokens/refreshmcpServer/elicitation/request
Start here for the authoritative v2 notification list:
../Codex/codex-rs/app-server-protocol/src/protocol/common.rs
Useful follow-ups:
- Notification payload types:
../Codex/codex-rs/app-server-protocol/src/protocol/v2.rs
- Emitters / wiring from core events to server notifications:
../Codex/codex-rs/app-server/src/bespoke_event_handling.rs
- Human-readable protocol notes:
../Codex/codex-rs/app-server/README.md
Use this workflow to update the lists above:
- Get the current Codex hash:
git -C ../Codex fetch --all --prune && git -C ../Codex rev-parse origin/main
- List Codex v2 notification methods:
git -C ../Codex show origin/main:codex-rs/app-server-protocol/src/protocol/common.rs | awk '/server_notification_definitions! \\{/,/client_notification_definitions! \\{/' | rg -N -o '=>\\s*\"[^\"]+\"|rename = \"[^\"]+\"' | sed -E 's/.*\"([^\"]+)\".*/\\1/' | sort -u
- List CodexMonitor routed methods:
rg -n \"SUPPORTED_APP_SERVER_METHODS\" src/utils/appServerEvents.ts
- Update the Supported and Missing sections.
Use this workflow to update request support lists:
- Get the current Codex hash:
git -C ../Codex fetch --all --prune && git -C ../Codex rev-parse origin/main
- List Codex client request methods:
git -C ../Codex show origin/main:codex-rs/app-server-protocol/src/protocol/common.rs | awk '/client_request_definitions! \\{/,/\\/\\/\\/ DEPRECATED APIs below/' | rg -N -o '=>\\s*\"[^\"]+\"\\s*\\{' | sed -E 's/.*\"([^\"]+)\".*/\\1/' | sort -u
- List Codex server request methods:
git -C ../Codex show origin/main:codex-rs/app-server-protocol/src/protocol/common.rs | awk '/server_request_definitions! \\{/,/\\/\\/\\/ DEPRECATED APIs below/' | rg -N -o '=>\\s*\"[^\"]+\"\\s*\\{' | sed -E 's/.*\"([^\"]+)\".*/\\1/' | sort -u
- List CodexMonitor outgoing requests:
perl -0777 -ne 'while(/send_request_for_workspace\\(\\s*&[^,]+\\s*,\\s*\"([^\"]+)\"/g){print \"$1\\n\"}' src-tauri/src/shared/codex_core.rs | sort -u
- Update the Supported Requests, Missing Client Requests, and Server Requests sections.
Use this when the method list is unchanged but behavior looks off.
- Confirm the current Codex hash:
git -C ../Codex fetch --all --prune && git -C ../Codex rev-parse origin/main
- Inspect the authoritative notification structs:
git -C ../Codex show origin/main:codex-rs/app-server-protocol/src/protocol/v2.rs | rg -n \"struct .*Notification\"
- For a specific method, jump to its struct definition:
- Example:
git -C ../Codex show origin/main:codex-rs/app-server-protocol/src/protocol/v2.rs | rg -n \"struct TurnPlanUpdatedNotification|struct ThreadTokenUsageUpdatedNotification|struct AccountRateLimitsUpdatedNotification|struct ItemStartedNotification|struct ItemCompletedNotification\"
- Example:
- Compare payload shapes to the router expectations:
- Parser/source of truth:
src/utils/appServerEvents.ts - Router:
src/features/app/hooks/useAppServerEvents.ts - Turn/plan/token/rate-limit normalization:
src/features/threads/utils/threadNormalize.ts - Item shaping for display:
src/utils/threadItems.ts
- Parser/source of truth:
- Verify the ThreadItem schema (many UI issues start here):
git -C ../Codex show origin/main:codex-rs/app-server-protocol/src/protocol/v2.rs | rg -n \"enum ThreadItem|CommandExecution|FileChange|McpToolCall|EnteredReviewMode|ExitedReviewMode|ContextCompaction\"
- Check for camelCase vs snake_case mismatches:
- The protocol uses
#[serde(rename_all = \"camelCase\")], but fields are often declared in snake_case. - CodexMonitor generally defends against this by checking both forms (for example in
threadNormalize.tsanduseAppServerEvents.ts), while centralizing method/type parsing inappServerEvents.ts.
- The protocol uses
- If a schema change is found, fix it at the edges first:
- Prefer updating
src/utils/appServerEvents.ts,useAppServerEvents.ts, andthreadNormalize.tsrather than spreading conditionals into components.
- Prefer updating
- Not all missing events must be surfaced in the conversation view; some may be better as toasts, settings warnings, or debug-only entries.
- For conversation view changes, prefer:
- Add method/type support in
src/utils/appServerEvents.ts - Route in
useAppServerEvents.ts - Handle in
useThreadTurnEvents.tsoruseThreadItemEvents.ts - Update state in
useThreadsReducer.ts - Render in
Messages.tsx
- Add method/type support in
turn/diff/updatedis now fully wired:- Routed in
useAppServerEvents.ts - Handled in
useThreadTurnEvents.ts/useThreadEventHandlers.ts - Stored in
useThreadsReducer.ts(turnDiffByThread) - Exposed by
useThreads.tsfor UI consumers
- Routed in
- Steering behavior while a turn is processing:
- CodexMonitor attempts
turn/steeronly when steer capability is enabled, the thread is processing, and an active turn id exists. - If
turn/steerfails, CodexMonitor does not fall back toturn/start; it clears stale processing/turn state when applicable, surfaces an error, and returnssteer_failed. - Local queue fallback on
steer_failedis handled in the composer queued-send flow (useQueuedSend), not by all directsendUserMessageToThreadcallers.
- CodexMonitor attempts
- Feature toggles in Settings:
experimentalFeature/listis an app-server request.- Toggle writes use local/daemon command surfaces (
set_codex_feature_flagand app settings update), which writeconfig.toml; they are not app-serverClientRequestmethods.