Skip to content

Agent Mode: deliver a current-source summary to ongoing sessions after a project config change #2663

Description

@Emt-lin

Follow-up from PR #2658 (Codex round-7 finding, comment 3524303110).

Gap: when an ongoing project session's context config changes (adding a web URL, a binary source like a PDF, or an out-of-cwd folder), the <project_context_updates> block only renders a generic "declared sources changed — re-check them" nudge. The session's first-turn <project_context> manifest is stale and project.md is internal, so the agent has no in-session path to discover the newly added source. In-cwd folder additions are ls-discoverable; new URLs/off-cwd folders/snapshots are not adopted until a new or resumed session re-emits the manifest. No stale content is ever mis-cited — the gap is "new source not yet adopted".

Direction (per triage in PR #2658): render a current declared-source summary in the config-change branch of contextUpdatesBlockBuilder, computed at delivery time from the live project record (never carried in epoch entries). Needs the materializer's source resolution extracted into a reusable helper (vault-path → absolute path, off-vault snapshot pointers) WITHOUT making the lightweight non-blocking Case-1 delivery wait on URL/PDF conversion. A URL list without snapshot pointers would be a partial mitigation only.

DESIGN NOTE anchor: AgentSessionManager.ts handleProjectRecordsChanged config-change branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions