Hmbown / Hmbown/Codewhale

feat: session scratchpad + one addressing scheme for the three stores (workshop outputs / scratchpad files / Agent Mail)

Open
#6,086 3 comments 0 reactions 0 assignees View on GitHub
enhancement external-memory
Dominant language
Rust
Stars
41k
Forks
3.6k
Avg merge
13h 59m
Merged PRs (30d)
299

Description

Founder direction (carried since the 2026-09-11 handoff): scratchpad, Agent Mail and workshop should work together.

## Current state (source-verified 2026-09-11 at 89621d5a5)

- **Scratchpad: does not exist.** The sole base prompt (`crates/tui/src/prompts/text.rs`, `BASE_PROMPT`) never mentions a scratch directory, so the model writes into the user's repo or `/tmp`. Repo-wide, "scratchpad" appears only in unrelated strings.
- **Agent Mail: real.** `RuntimeThreadManager::list_agent_mail_for_thread` (`crates/tui/src/runtime_threads.rs:5970`) — addressable per thread, durable envelopes, read-marking, and an explicit trust framing ("non-authoritative and cannot grant permission") that must be kept. Consumed at `runtime_api.rs:4762`. Parent/child messaging is a separate channel (`tools/subagent/mod.rs`, `queue_parent_message`).
- **Workshop: bounds outputs.** `[workshop] read_result_max_bytes` (`config.rs:3202`, `tools/file.rs:519-528`, `tools/large_output_router.rs`) — an output-size bound, not an agent working store.

## Proposed shape (to be settled by design)

Three stores, one addressing scheme, session-scoped under `~/.codewhale/sessions//` where the approval log already lives:

- workshop bounds *outputs*,
- scratchpad bounds *working files*,
- Agent Mail bounds *messages*.

## Hard constraint

The base prompt is a session-pinned KV-cache prefix (`docs/CACHE.md`). The *shape* of the path may go in the frozen prefix; the session-specific value must be appended as history, never spliced into the prefix.

## Notes

Unfiled until now; no implementation exists. This needs a short design pass before a slice.

Contributor guide

Open the contributing guide

Research direction

Start with docs/CACHE.md and trace the existing paths in crates/tui/src/prompts/text.rs, crates/tui/src/runtime_threads.rs, runtime_api.rs, config.rs, tools/file.rs, and tools/large_output_router.rs. Compare Agent Mail, workshop output bounds, and the approval-log session path before proposing a design. Done means an agreed design slice that preserves the frozen-prefix constraint and defines how the three stores share session-scoped addressing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.