Skip to content

Expose Codex task lifecycle events to other VS Code extensions #38747

Description

@appfeel

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_

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextensionIssues related to the VS Code extensionhooksIssues related to event hooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions