Skip to content

App title-generation helper threads lack an originating-thread relationship in native OTel logs and traces #32708

Open

Description

@J-H99

What variant of Codex are you using?

App (Windows)

What feature would you like to see?

The Codex App should expose a stable relationship between an automatic title-generation helper thread and the visible thread for which the title is being generated.

Problem

The current App flow appears to start title generation as a separate ephemeral root thread.

The helper receives its own conversation.id, but native OTel logs and traces do not expose a stable field that identifies the visible originating thread or session:

  • OTel logs and trace-safe events contain the helper's own conversation.id.
  • Trace spans may expose session_init.ephemeral = true, but do not include the originating thread ID, shared session-tree ID, forked_from_id, or a title-generation purpose.
  • The thread/name/set request span records the RPC method and request ID, but not the target thread ID.
  • OTel metrics contain aggregate tags such as session_source, model, and originator, but no per-thread identifier that could restore the relationship. This request does not require adding high-cardinality IDs to metrics.

As a result, an observability consumer can detect that an ephemeral helper-like thread ran, but cannot deterministically determine that it generated the title for a particular visible thread.

Downstream observability systems must currently count the helper as an independent root session or classify it as unattributed activity. Dropping every parentless or ephemeral thread is not safe because valid user-created root threads and other legitimate ephemeral workflows can have the same shape.

Timestamp or model-based correlation is not reliable because users may rename a thread manually while automatic title generation is running, and other internal helper calls may use the same model.

Desired behavior

When the App creates a title-generation helper, it should provide both:

  1. An explicit purpose, such as thread_source = "title_generation".
  2. A stable relationship to the originating thread, such as:
    • originating_thread_id,
    • related_thread_id,
    • or membership in the same session_id tree.

That relationship should be available in native OTel logs and traces.

The exact field names are flexible. The important requirements are:

  • The helper keeps its own thread/conversation ID.
  • The visible originating thread can be identified deterministically.
  • Title generation can be distinguished from other internal or ephemeral calls.
  • The relationship remains available when otel.log_user_prompt = false.
  • No prompt content or generated title content needs to be exported.

Why enabling more OTel signals does not solve this

Enabling logs, traces, and metrics together provides more execution detail, but none of the three signals currently supplies the missing originating-thread relationship.

Optional W3C trace-context propagation could represent request causality if the App explicitly supplied it, but it would still be a transient tracing relationship rather than a stable session/thread ownership contract.

Additional information

Observed with:

  • Codex App: 26.707.8168.0
  • Bundled codex-app-server: 0.144.0-alpha.4
  • Platform: Windows

Relevant public code:

Related but distinct issues

This request is specifically about the relationship between a visible App thread and the internal helper used to generate its title.

Activity

  1. added
    enhancement
    app
    app-server
    on Jul 13, 2026
  2. J-H99 commented on Aug 12, 2026

    @J-H99
    Author

    I took another look through the related issues and PRs to see whether this omission was intentional, but I could not find any maintainer explanation.

    A few related changes make the gap more concerning:

    • store and expose parent_thread_id on Threads #25113 established that parent_thread_id and forked_from_id represent different relationships. A title-generation helper is not necessarily a subagent, so a dedicated originating_thread_id or related_thread_id may be more accurate than reusing either field.
    • core: add tool-free thread mode #31922 proposes running lightweight helpers without MCP servers or tools, specifically mentioning thread-title generation. That suggests these helpers currently inherit capabilities they do not need.
    • Add conversation ID to OTEL metrics #15905 was closed because it did not receive enough upvotes, but that request was about adding high-cardinality conversation IDs to metrics. This issue only needs the relationship in logs and traces.

    I am not claiming that this is a demonstrated security vulnerability. My concern is that it creates an audit and least-privilege gap.

    A title-generation helper processes user-derived input, but native OTel currently presents it as an unrelated root conversation. If the helper unexpectedly initializes an MCP server or performs tool-related activity, an operator cannot reliably determine which visible thread caused it. Timestamp, model, and prompt-based correlation are not dependable enough for incident investigation or policy enforcement.

    The relationship could be exposed without collecting additional user content. A minimal contract might be:

    1. identify the helper as title_generation;
    2. attach an originating_thread_id or equivalent relationship to its conversation-start logs and traces;
    3. keep thread IDs out of metrics;
    4. export neither the prompt nor the generated title;
    5. run the helper without MCP servers or model-visible tools.

    Is this omission intentional—for example, because of privacy or cardinality concerns, or because the title-generation caller lives outside public codex-rs?

    If there is an intended attribution model for these helper conversations, I would appreciate any clarification. I can provide a smaller reproduction or additional sanitized OTel evidence if useful.

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

    appapp-serverenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions