Skip to content

[feature] Context: deliver pinned files to coding turns and show what was included #324

Description

@AetherAI3

Problem and result

/pin and /drop maintain and synchronize context registry metadata. In the inspected local coding paths, there is no proven assembly step delivering pinned file bytes into the actual task brief. Users cannot verify whether a selected file was sent, omitted, or changed.

Add one bounded selected-file block to the existing RunSession composition and a proposed /context inspector that reports the same assembled context. Prove hosted behavior rather than assuming registry synchronization already includes bytes.

Acceptance checks

  • Read explicit pins fresh within the admitted execution workspace, with resolved-path confinement and clear unsupported/missing/binary-file outcomes. Derive project-relative identity from the registry origin and explicitly bind it to the execution root; an original-checkout pin must not silently read that checkout when the task runs in a worktree. Show the binding or an explicit omission. Never scan neighboring files.
  • Enforce finite per-file limits and one aggregate budget across pins, rules, skills, and other composed context, respecting the existing context-packet ceiling and transport limits. Make overflow omission/refusal deterministic. Report digest, included range/bytes, and every omission; never describe a truncated file as fully included.
  • Local and supported hosted request fixtures prove the selected content is present exactly once. If the hosted path already includes it, avoid a second copy; expose unsupported transport behavior honestly.
  • Freeze the bounded payload at turn admission. If files change after a preview, identify the admitted digest; queued turns and model continuation retain their admitted payload rather than silently adopting a later registry state.
  • /context defaults to metadata-only inspection with an explicit local content preview. Label last admitted turn versus next-draft preview distinctly. Show files, mode, and resolved rules/skill ID/digest from the same composed descriptor; do not retain a completed one-turn skill as current or resolve an empty prompt as the next task. No second resolver, model call, invented context-window percentage, or server-enforcement claim.
  • Treat file contents as data, safely separated from host instructions. Keep bodies out of registry snapshots, generic logs, and RC metadata; respect existing account/backend sharing boundaries.
  • Fixtures cover empty pins, pins+rules+skill aggregate overflow, large/changed/missing files, original-checkout/worktree binding, outside-workspace/symlink cases, local/hosted parity, single inclusion, and preview-versus-admission drift. /drop excludes automatic context only; it does not claim to revoke explicit file-reading tools.

Landing boundary

This improves existing pin/drop behavior and observability, not session replay/export or a new memory layer. No dependency on the aether-context package upgrade in PR #259, and no assumption that server context is visible to the local inspector. Reuse an in-memory admitted-turn descriptor, not a new persistent schema.

Evidence and planning

Package: Run control and context. Priority: P1. Rough engineering estimate: 1–2 days, including focused fixtures; this is a planning estimate, not a measured benchmark.

Reviewed against v4.20.0 at 4f1717bc120917e1b04d0baa939855417ef866a4: src/commands/slash_context.ts, src/core/context_registry.ts, src/core/skills/run_session.ts, src/core/skills/skill_session.ts, src/commands/chat.ts, src/commands/code.ts.

Comparator: Codex CLI commands exposes file mentions and session status. Aether already has explicit pinning; this issue makes the delivered payload inspectable.

Created from the LOOP-19 review of the README, all 23 open issues, four open PRs, and recent shipped work on 2026-10-09. These are proposed changes; the acceptance checks below have not been executed.

Activity

  1. added
    featureNew product capability or integration work
    on Oct 9, 2026
  2. AetherAI3 commented on Oct 9, 2026

    @AetherAI3
    OwnerAuthor

    Landed in PR #332 (squash commit 4b520f89f3800adac869f72284523b16c3585156).

    Evidence: npm run build and npm run docs:check passed. All 88 scoped tests passed across selected-context, skill host loop/policy, command manifest, slash registry, and registry scope. New fixtures cover local Ollama and hosted dev-session single inclusion, worktree binding and post-admission drift, size/UTF-8/binary/symlink failures, aggregate budget, metadata-only /context, and /drop behavior.

    GitHub Actions could not start jobs: its annotations say the repository account is locked due to a billing issue. No CI test step ran; the passing evidence above is from the local checkout.

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

    featureNew product capability or integration work

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions