Skip to content

settings: a starting session lists the saved session states - #39

Merged
lneto merged 1 commit into
masterfrom
harness-on-start
Nov 26, 2026
Merged

lneto merged 1 commit into
masterfrom
harness-on-start

Conversation

@lneto

@lneto lneto commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude Code's /clear empties a session's context, and since luainkernel/harness#14 a session past 300k tokens is asked to write its open decisions, its runs in flight and the pull requests that wait to scratch/handoff/<session id>.md before the maintainer clears it; the session that starts after the clear is not shown that file.

.claude/settings.json now runs harness/.claude/hooks/on-start.sh when a session starts or is cleared, which prints the files under scratch/handoff/ into the new session's context, newest first, the newest being the session just cleared:

Hand-offs a session left in <project>/scratch/handoff before it was cleared, newest first; the one this session continues is read before anything else:
2026-11-26 09:20  <project>/scratch/handoff/<session id>.md

The hook comes with the mount, which #38 moved to luainkernel/harness@70661b8; Claude Code reads only the project's own settings, so the project wires the hook. Each start reads one directory listing.

luainkernel/harness#6, which it does not close.

@lneto lneto added the complexity: small One line or one file, with a trivial or existing test label Nov 26, 2026
@lneto
lneto changed the base branch from harness-bump-70661b8 to master November 26, 2026 14:08
A session started or cleared runs harness/.claude/hooks/on-start.sh,
which lists the files under scratch/handoff/ that a session past 300k
tokens of context wrote before it was cleared, newest first, so the new
one reads the state it continues (luainkernel/harness#14). The mount
carries the hook; Claude Code reads only the project's own settings, so
the project wires it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lneto
lneto marked this pull request as ready for review November 26, 2026 14:09
@lneto
lneto merged commit 04b5949 into master Nov 26, 2026
2 checks passed
@lneto
lneto deleted the harness-on-start branch November 26, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity: small One line or one file, with a trivial or existing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant