Track source attribution for individual context parts (#52195)

## What changed

- Add `ContentItemMetadata` to distinguish user input, developer instructions, `AGENTS.md`, skills, harness context, and tool-supplied context independently of message role and content classification.
- Keep attribution attached to content through prompt assembly, history processing, and hook-output spilling. Distinguish command hooks from MCP hooks and retain tool namespaces when known.
- Treat missing historical attribution as unknown and send per-content metadata only to Responses Lite.

## Testing

Update request and history assertions to cover attribution persistence and Responses Lite metadata handling.

GitOrigin-RevId: 24e56005f5bdb98bf82f2b3943f29c4c81f3d587
This commit is contained in:
tongzhou wang
2026-10-08 17:56:54 +00:00
committed by copyberry
parent f90a578f76
commit ad54b75574
78 changed files with 943 additions and 260 deletions
+1
View File
@@ -1209,6 +1209,7 @@ impl CodexThread {
/*requested_timeout*/ None, /*wait_for_server*/ true,
)
.await
.map(|call| call.result)
}
pub fn enabled(&self, feature: Feature) -> bool {