Expose custom interaction hooks and APIs for Codex desktop pets
What variant of Codex are you using?
Codex App (desktop), with custom pets generated/installed through Hatch Pet. This may also be relevant to CLI/SDK surfaces if they expose the same pet/action contract later.
What feature would you like to see?
Please expose a supported interaction/API contract for Codex desktop pets, beyond visual spritesheet customization.
Requested capabilities:
- Let a custom pet declare safe interactions in
pet.json, e.g. click, double-click, right-click/context menu, hover, drag/drop, and optional keyboard shortcut actions. - Let those interactions call first-party Codex actions or approved deep links, such as:
- open/tuck the pet;
- open the current or related Codex thread;
- create a new thread for a configured workspace/prompt;
- open a local project dashboard or app route through an allowlisted URL/deeplink;
- invoke a named skill/command where permissions allow.
- Expose a small, documented read-only status/event API for pets to observe agent/thread state, e.g. idle, running, waiting for user, ready for review, failure, latest activity category, active workspace/thread id.
- Keep the contract permissioned and safe: no arbitrary command execution by default; require user approval/allowlisting for external URLs, local apps, workspace commands, and any write-capable integration.
- Document the interaction contract so third-party dashboards can integrate with the official Codex pet instead of building their own always-on launcher.
Additional information
Related but distinct: #20863 asks for configurable animation sequences and activity events. This request is about interaction hooks and open integration surfaces.
Use case: a local project dashboard or personal wiki may want the official Codex pet to act as a lightweight entry point and status surface. For example, clicking the pet could open the project dashboard, create a project-specific Codex thread, or show safe actions for maintaining the project. Without supported hooks, users either treat pets as visual-only status indicators or build a separate desktop companion/launcher, which duplicates the Codex pet's role.
A minimal first version could be a manifest-defined context menu with allowlisted codex:// actions and read-only status events. More advanced versions could expose a small SDK/API for registered local apps.
6 Comments
+1
+1
I’d like to add a related use case that would benefit from a small plugin-published pet state API, not just read-only pet/status observation.
I’m building a local Codex plugin for a Steam-focused Windows setup. The plugin can already detect useful external state locally, for example:
Today the plugin can render a separate dashboard companion using the same Codex pet spritesheet contract, but it cannot drive the native floating Codex pet. That means the official pet and the plugin companion duplicate each other.
A minimal API that would solve this cleanly:
Suggested constraints:
idle,waving,jumping,failed,waiting,running,review, etc.The broader design ask: let trusted plugins publish ephemeral, permissioned pet state to the native floating pet overlay, while Codex remains the arbiter of priority and safety. This would let local integrations such as Steam, OBS, CI monitors, build dashboards, or hardware monitors use the official pet as the shared status surface instead of each building their own overlay.
I want to add a related product-design point from the CLI user side.
For my workflow, the main value of pets is not that they appear inside the current terminal surface. The value is that they are an ambient, always-visible status surface for Codex work: running, waiting for input or approval, ready for review, failed, idle, etc. If the pet is confined to a terminal pane, it only works while that terminal is visible and focused enough to notice. That makes it much less useful as a status indicator.
This is also why terminal pets feel like the wrong primary design direction to me, independent of tmux / Sixel / Kitty compatibility. Terminal rendering is useful as a fallback for SSH, headless, or no-Desktop environments, but the primary local experience should be:
This is related to #22625, but I do not think the important framing is “the terminal pet does not work” or “tmux does not support images.” The more important issue is that pets are fundamentally ambient status UI, and ambient status UI should live outside the terminal container. A small permissioned state API like the one discussed above (
codex.pet.setState(...), or a first-party CLI -> Desktop event bridge) would solve this cleanly without requiring every integration to build its own overlay.+1 for a documented, read-only pet/task status API. I have a concrete external-monitoring use case that is not currently covered by hooks or by connecting to a separately managed app-server.
I want to run a small local background service that can reflect Codex activity while I continue using Codex normally across the Desktop app, CLI, and IDE. The minimum useful state model would be:
idle: no active turnrunning: Codex is reasoning, calling tools, editing files, or streaming a replywaiting_for_approval: the active turn is waiting for command/file/network/tool approvalerror: the turn failed or the thread entered a system-error stateA minimal API could expose both a current snapshot and a stream of transitions, for example over a user-scoped local socket:
desktop,cli,ide)Important lifecycle semantics would include explicit approval-requested and approval-resolved transitions, plus turn-failed/turn-completed events. Prompt text, assistant messages, commands, and file contents should be excluded by default.
Today the available mechanisms leave gaps:
UserPromptSubmit,PermissionRequest, andStop, but there is no complete approval-resolved or turn-error lifecycle for an external status service.The built-in floating pet already derives equivalent product states (Running, Needs input, Ready, Blocked). Exposing a privacy-preserving read-only view of that same derived state would let menu-bar apps, accessibility tools, hardware indicators, and custom desktop companions integrate without parsing conversations or forcing every Codex client through a custom shared app-server.
I opened #34145 as an implementation-focused child proposal for the interaction contract discussed here. It narrows the first deliverable to manifest-defined, permissioned bindings for actions already advertised by Codex or an installed app, with an illustrative music-control use case, a backwards-compatible pet.json shape, dispatcher pseudocode, security boundaries, staged implementation cost, and MVP acceptance criteria. It is intended to complement—not replace—this broader API request.