Skip to content

Add configurable hook context spill limits - #34393

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/55ddc2dbbdf9067dceee3e1968c03617bbf6bcea
Jul 20, 2026
Merged

Add configurable hook context spill limits#34393
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/55ddc2dbbdf9067dceee3e1968c03617bbf6bcea

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 20, 2026

Copy link
Copy Markdown

Add configurable hook context spill limits

What changed

  • Add additionalContextLimit to command hook configuration for events that can emit additionalContext.
  • Apply the limit independently to each hook's context before it is sent to the model. Unset values retain the 2,500-token default, while 0 disables spilling for that hook.
  • Expose configured limits through app-server hook and requirements responses, and show them in the TUI hooks browser.

Testing

  • Cover JSON and TOML parsing, discovery and hashing, per-hook spilling behavior, app-server responses, and TUI rendering.

## What changed

- Add `additionalContextLimit` to command hook configuration for events that can emit `additionalContext`.
- Apply the limit independently to each hook's context before it is sent to the model. Unset values retain the 2,500-token default, while `0` disables spilling for that hook.
- Expose configured limits through app-server hook and requirements responses, and show them in the TUI hooks browser.

## Testing

- Cover JSON and TOML parsing, discovery and hashing, per-hook spilling behavior, app-server responses, and TUI rendering.

GitOrigin-RevId: 55ddc2dbbdf9067dceee3e1968c03617bbf6bcea
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/55ddc2dbbdf9067dceee3e1968c03617bbf6bcea branch from 42cf7ec to e4836f9 Compare July 20, 2026 18:47
@copyberry
copyberry Bot merged commit e4836f9 into main Jul 20, 2026
18 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/55ddc2dbbdf9067dceee3e1968c03617bbf6bcea branch July 20, 2026 18:48
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants