Repository navigation
[Feature]: Session-scoped notes panel — agent-shared and user-private regions #2397
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I am describing a concrete problem or use case, not just a vague idea.
Area
apps/web
Problem or use case
In long-running threads, instructions and conventions that are specific to the session (not the project) are lost to compaction. A common example: 30-40 messages into a session I tell the agent the exact way to invoke a script, or the specific shape of a task list I want it to follow. After compaction, that intent is gone, and the agent runs the script the "default" way — not the way I asked.
These instructions don't belong in AGENTS.md — they're not project-wide, they're tied to one feature or session. There's currently no place to put them where they survive compaction without polluting the project context for every future thread.
A second, related need: I often want a place to jot notes for myself during a session — a command I'm about to run, an open question, a TODO — without sending it to the agent or cluttering the chat.
Proposed solution
A right-panel "Session Notes" surface (registered through the panel host proposed in #1377) with two regions:
- Shared region — markdown, read/write by both user and agent. Auto-injected into the agent's system context on every turn from durable host state, so it survives compaction by construction. Soft size cap (e.g., 2 KB) with a UI warning past the threshold.
- Private region — markdown, user-only. Never sent to the model. Pure UI scratchpad.
Behavior:
- Scoped to the thread/session ID; persists across app restarts and session resume.
- Shared region is delimited in the system prompt with clear tags (e.g.,
<session_notes>…</session_notes>) so the model knows what it is. - Agent can append to the shared region via a tool call; a designated "current task" sub-block can be overwritten. User can edit either region freely in the panel.
- A toggle in the panel lets the user temporarily disable shared-region injection without deleting it.
Future work / sibling proposal: the same two-region pattern at project scope — personal, uncommitted notes that persist across all sessions in a single project, gitignored, distinct from AGENTS.md (which is committed and team-shared). Out of scope for this issue; would file separately if this lands.
Why this matters
It closes the gap between project-permanent context (AGENTS.md) and prompt-ephemeral context (chat messages). Today there is no session-scoped, compaction-durable surface. That's exactly the slot where session-specific operational intent lives — how to run this script in this thread, the task list for this feature, the convention I just decided on for this PR.
For users running long agentic sessions, this turns "I have to keep re-reminding the agent" into a single-write fix.
Smallest useful scope
A single-textarea right-panel, shared region only, auto-injected on every turn, persisted per thread ID. No agent-side write tool, no private region, no size cap UI. Just: "type here, model sees it every turn, it survives compaction." Everything else can follow.
Alternatives considered
- Add to
AGENTS.md— wrong granularity; commits per-session intent into version control and pollutes every future thread. - Re-paste the instruction into chat — current workaround; lost to compaction.
- External scratchpad (Apple Notes, editor markdown file) — solves "a place to write" but not auto-injection, agent write-back, or scoping. Still requires manual copy-paste every session.
- Sibling proposals: [Feature]: Saved snippets for frequently used prompts, with optional grouping #1547 (saved snippets — composer input templates, different surface) and [Feature]: Make proposed plans first-class artifacts for implementation and compaction #2304 (plan artifacts — same host-managed durable-context mechanism, different artifact type). This proposal is the personal/ephemeral slot in that family, distinct from both.
Risks or tradeoffs
- Token cost of auto-injection — every turn pays N tokens whether the notes are relevant or not. Mitigated by a soft size cap and a per-session toggle to disable injection without deleting notes.
- Conflating private and shared notes is a real footgun — the model could hallucinate instructions from a private scratch entry. The two-region split is the mitigation; clear UI labeling helps.
- Race conditions on simultaneous user and agent writes — last-write-wins with a version counter is sufficient.
- Coherent context story — worth the team thinking about how this fits alongside
AGENTS.mdand adjacent proposals ([Feature]: Make proposed plans first-class artifacts for implementation and compaction #2304, observational memory work). This proposal stays narrow on purpose so it's easy to add to or remove from that picture.
Examples or references
- Cursor's "Notepads" feature is the closest prior art (project-level scratchpads referenced via
@notepad), though it is project-scoped, not session-scoped, and lacks the user-private region. - Claude Code's
TodoWritetool covers some of the agent-side use case but isn't user-editable or panel-visible. - No current desktop CLI-wrapper ships this surface; the panel-host work in [Feature]: Internal panel host for first-party panel composition #1377 makes it cheap to land first.
Contribution
- I would be open to helping implement this.
Activity