Commit Graph
5659 Commits
Author SHA1 Message Date
rhan-oai 22668d9771 merge commit for archive created by Sapling 2026-04-10 17:13:12 -07:00
rhan-oai 7538889d4a [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 17:12:00 -07:00
rhan-oai 3519f14bf7 [codex-analytics] add steering metadata 2026-04-10 17:11:10 -07:00
rhan-oai 24c819097c [codex-analytics] add token usage metadata 2026-04-10 17:11:10 -07:00
rhan-oai 9c6c06bb25 [codex-analytics] feature plumbing and emittance 2026-04-10 17:11:10 -07:00
rhan-oai 1e2562bd92 merge commit for archive created by Sapling 2026-04-10 17:00:04 -07:00
rhan-oai 65767d6418 [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 16:53:46 -07:00
rhan-oai ba4058c916 [codex-analytics] add steering metadata 2026-04-10 16:53:46 -07:00
rhan-oai 2a16ce9e0d [codex-analytics] add token usage metadata 2026-04-10 16:53:46 -07:00
rhan-oai 6a83f5548c [codex-analytics] feature plumbing and emittance 2026-04-10 16:53:46 -07:00
rhan-oai 7ce3f6b996 merge commit for archive created by Sapling 2026-04-10 16:35:31 -07:00
rhan-oai 4956c535a4 [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 16:34:45 -07:00
rhan-oai c6c98c0fe2 [codex-analytics] add steering metadata 2026-04-10 16:34:45 -07:00
Shijie Rao 930e5adb7e Revert "Option to Notify Workspace Owner When Usage Limit is Reached" (#17391)
Reverts openai/codex#16969

#sev3-2026-04-10-accountscheckversion-500s-for-openai-workspace-7300
2026-04-10 23:33:13 +00:00
Owen Lin a3be74143a fix(guardian, app-server): introduce guardian review ids (#17298)
## Description

This PR introduces `review_id` as the stable identifier for guardian
reviews and exposes it in app-server `item/autoApprovalReview/started`
and `item/autoApprovalReview/completed` events.

Internally, guardian rejection state is now keyed by `review_id` instead
of the reviewed tool item ID. `target_item_id` is still included when a
review maps to a concrete thread item, but it is no longer overloaded as
the review lifecycle identifier.

## Motivation

We'd like to give users the ability to preempt a guardian review while
it's running (approve or decline).

However, we can't implement the API that allows the user to override a
running guardian review because we didn't have a unique `review_id` per
guardian review. Using `target_item_id` is not correct since:
- with execve reviews, there can be multiple execve calls (and therefore
guardian reviews) per shell command
- with network policy reviews, there is no target item ID

The PR that actually implements user overrides will use `review_id` as
the stable identifier.
2026-04-10 16:21:02 -07:00
Abhinav 7999b0f60f Support clear SessionStart source (#17073)
## Motivation

The `SessionStart` hook already receives `startup` and `resume` sources,
but sessions created from `/clear` previously looked like normal startup
sessions. This makes it impossible for hook authors to distinguish
between these with the matcher.

## Summary

- Add `InitialHistory::Cleared` so `/clear`-created sessions can be
distinguished from ordinary startup sessions.
- Add `SessionStartSource::Clear` and wire it through core, app-server
thread start params, and TUI clear-session flow.
- Update app-server protocol schemas, generated TypeScript, docs, and
related tests.


https://github.com/user-attachments/assets/9cae3cb4-41c7-4d06-b34f-966252442e5c
2026-04-10 16:05:21 -07:00
rhan-oai 6564c4e772 merge commit for archive created by Sapling 2026-04-10 16:02:30 -07:00
rhan-oai e2cc7faac6 [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 16:00:26 -07:00
rhan-oai b2b81bde9b [codex-analytics] add steering metadata 2026-04-10 16:00:19 -07:00
rhan-oai f5f5501319 merge commit for archive created by Sapling 2026-04-10 15:45:59 -07:00
rhan-oai 3a931e4a74 [codex-analytics] add steering metadata 2026-04-10 15:43:07 -07:00
rhan-oai bf02586efd merge commit for archive created by Sapling 2026-04-10 15:39:21 -07:00
rhan-oai 60c2461b82 [codex-analytics] add steering metadata 2026-04-10 15:38:28 -07:00
rhan-oai 5269188c55 Merge c83f69b09e into sapling-pr-archive-rhan-oai 2026-04-10 15:29:27 -07:00
rhan-oai c83f69b09e [codex-analytics] add steering metadata 2026-04-10 15:27:37 -07:00
rhan-oai 08d37fefab merge commit for archive created by Sapling 2026-04-10 15:17:54 -07:00
rhan-oai 7021d18218 [codex-analytics] add steering metadata 2026-04-10 15:08:39 -07:00
rhan-oai 25244aa5f5 Merge f71df46ada into sapling-pr-archive-rhan-oai 2026-04-10 14:42:11 -07:00
rhan-oai 32d1704205 merge commit for archive created by Sapling 2026-04-10 14:40:34 -07:00
rhan-oai 290c485ab5 [codex-analytics] add token usage metadata 2026-04-10 14:38:25 -07:00
rhan-oai f71df46ada [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 14:38:25 -07:00
rhan-oai b18388f2e6 [codex-analytics] add steering metadata 2026-04-10 14:38:25 -07:00
rhan-oai 2e21934e10 [codex-analytics] feature plumbing and emittance 2026-04-10 14:38:18 -07:00
rhan-oai 8af0af0000 merge commit for archive created by Sapling 2026-04-10 14:26:37 -07:00
rhan-oai f42998d852 [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 14:24:52 -07:00
rhan-oai f00fe86b78 [codex-analytics] add steering metadata 2026-04-10 14:24:52 -07:00
rhan-oai 9323523020 [codex-analytics] add token usage metadata 2026-04-10 14:24:52 -07:00
rhan-oai d91bd51ff9 [codex-analytics] feature plumbing and emittance 2026-04-10 14:24:52 -07:00
rhan-oai a5a281c5a1 Merge 169d814006 into sapling-pr-archive-rhan-oai 2026-04-10 14:17:19 -07:00
rhan-oai 169d814006 [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 14:15:53 -07:00
rhan-oai 6123f210f4 Merge aa2b4665c7 into sapling-pr-archive-rhan-oai 2026-04-10 14:08:59 -07:00
rhan-oai a1405eb1d7 [codex-analytics] add steering metadata 2026-04-10 14:07:57 -07:00
rhan-oai aa2b4665c7 [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 14:07:57 -07:00
rhan-oai e7c81347bf [codex-analytics] add token usage metadata 2026-04-10 14:07:57 -07:00
rhan-oai 8dba615a8b [codex-analytics] feature plumbing and emittance 2026-04-10 14:07:57 -07:00
Abhinav 87b9275fff [codex] Improve hook status rendering (#17266)
# Motivation

Make hook display less noisy and more useful by keeping transient hook
activity out of permanent history unless there is useful output,
preserving visibility for meaningful hook work, and making completed
hook severity easier to scan.

Also addresses some of the concerns in
https://github.com/openai/codex/issues/15497

# Changes

## Demo


https://github.com/user-attachments/assets/9d8cebd4-a502-4c95-819c-c806c0731288

Reverse spec for the behavior changes in this branch:

## Hook Lifecycle Rendering
- Hook start events no longer write permanent history rows like `Running
PreToolUse hook`.
- Running hooks now render in a dedicated live hook area above the
composer. It's similar to the active cell we use for tool calls but its
a separate lane.
- Running hook rows use the existing animation setting.

## Hook Reveal Timing
- We wait 300ms before showing running hook rows and linger for up to
600ms once visible.
- This is so fast hooks don't flash a transient `Running hook` row
before user can read it every time.
- If a fast hook completes with meaningful output, only the completed
hook result is written to history.
- If a fast hook completes successfully with no output, it leaves no
visible trace.

## Completed Hook Output
- Completed hooks with output are sticky, for example `• SessionStart
hook (completed)`.
- Hook output entries are rendered under that row with stable prefixes:
`warning:`, `stop:`, `feedback:`, `hook context:`, and `error:`.
- Blocked hooks show feedback entries, for example `• PreToolUse hook
(blocked)` followed by `feedback: ...`.
- Failed hooks show error entries, for example `• PostToolUse hook
(failed)` followed by `error: ...`.
- Stopped hooks show stop entries and remain visually treated as
non-success.

## Parallel Hook Behavior
- Multiple simultaneously running hooks can be tracked in one live hook
cell.
- Adjacent running hooks with the same hook event name and same status
message collapse into a count, for example `• Running 3 PreToolUse
hooks: checking command policy`.
- Running hooks with different event names or different status messages
remain separate rows.

## Hook Run Identity
- `PreToolUse` and `PostToolUse` hook run IDs now include the tool call
ID which prevents concurrent tool-use hooks from sharing a run ID and
clobbering each other in the UI.
- This ID scoping applies to tool-use hooks only; other hook event types
keep their existing run identity behavior.

## App-Server Hook Notifications
- App-server `HookStarted` and `HookCompleted` notifications use the
same live hook rendering path as core hook events.
- `UserPromptSubmit` hook notifications now render through the same
completed hook output format, including warning and stop entries.
2026-04-10 14:05:47 -07:00
Won Park 147cb84112 add parent-id to guardian context (#17194)
adding parent codex session id to guardian prompt
2026-04-10 13:57:56 -07:00
rhan-oai 8005c858f9 merge commit for archive created by Sapling 2026-04-10 13:38:58 -07:00
rhan-oai bcc8196c4f [codex-analytics] denormalize thread metadata onto turn events 2026-04-10 13:37:25 -07:00
rhan-oai 1a060ac1c9 [codex-analytics] add steering metadata 2026-04-10 13:37:25 -07:00