openai / openai/codex

Expose Codex task lifecycle events to other VS Code extensions

Open
#38,747 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement extension hooks
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What variant of Codex are you using?

IDE Extension (VS Code)

What feature would you like to see?

Summary

It would be very useful if the Codex VS Code extension exposed a stable, documented way for other VS Code extensions or local developer tooling to observe Codex task lifecycle events, especially when a task starts, completes, fails, or is aborted.

This request is not about notifications or sounds specifically. The broader need is integration with local developer workflows that depend on knowing when Codex has finished a turn or task.

Motivation

Many teams build local automation around their development workflow: documentation validators, review gates, CI preflight scripts, local dashboards, QA checklists, branch status monitors, and custom review tools.

Today, if a team wants to react when Codex finishes, the most reliable workaround is to ask the agent itself to run a command at the end of each turn. That works for some cases, but it is fragile because it depends on instruction-following rather than an explicit product-level integration point.

A first-class lifecycle API would make these workflows more reliable and composable.

Example use cases

  • Trigger local post-task validation after Codex completes a turn.
  • Update a local project dashboard showing active/completed Codex tasks.
  • Integrate Codex task completion with internal review queues.
  • Start CI preflight checks once Codex has stopped modifying files.
  • Let other VS Code extensions react to Codex task status without scraping UI state or patching private internals.
  • Improve accessibility and workflow feedback for long-running Codex tasks.
  • Coordinate multi-step human review flows after a Codex task completes.

Proposed API

Expose a stable VS Code extension API from the Codex extension, for example:

export type CodexTaskStatus =
  | "started"
  | "completed"
  | "failed"
  | "aborted";

export interface CodexTaskLifecycleEvent {
  taskId: string;
  conversationId?: string;
  workspaceFolder?: string;
  status: CodexTaskStatus;
  timestamp: string;
  source: "local" | "cloud";
  errorMessage?: string;
}

export interface CodexExtensionApi {
  onDidChangeTaskStatus(
    listener: (event: CodexTaskLifecycleEvent) => void
  ): vscode.Disposable;
}

### Additional information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or extension API entry point are identified in the issue. Start by locating the Codex VS Code extension's public API boundary and existing task-state handling, then clarify lifecycle semantics and compatibility requirements. Done means other extensions can reliably observe the documented task events without scraping UI state or using private internals.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.