Repository navigation
feat: Phase 121 — HOTL session messaging + PreCompact auto-checkpoint - #267
Conversation
…directed msg + identity fix + auto task declaration) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QAJ4vvsW1qwgCFM6Bn2Sh
…lock (operator UX request) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rough merge) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e cards (Task 121.4) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…compaction (Task 121.6) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nc mirrors (121.4 integration) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…(Task 121.1) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ask 121.2) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… + zero-unread silence (Task 121.3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…le + CHANGELOG + rebuild 4-platform binaries (Task 121.5) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 699f7d4825
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Unread: len(entries), | ||
| Messages: entries, | ||
| InjectContext: buildLivemsgInjectContext(entries, locale), |
There was a problem hiding this comment.
Enforce the byte cap on the complete hook response
When one or more large messages are unread, only inject_context is capped: Messages still contains every body at up to 4096 bytes each, and the Stop hook emits this entire JSON object. Consequently even one message can exceed the advertised 4096-byte total, while a message flood produces unbounded hook output and context pressure. Limit or omit the raw message bodies from this delivery response so the cap covers everything written to stdout.
Useful? React with 👍 / 👎.
| entries = append(entries, sanitizeInboxCheckEntry(entry)) | ||
| if err := store.MarkRead(ctx, opts.Team, msg.ID, opts.Agent); err != nil { | ||
| return empty, nil | ||
| } |
There was a problem hiding this comment.
Leave messages unread when they are omitted by the cap
When enough unread messages exceed the 4096-byte injection budget, buildLivemsgInjectContext omits the tail, but this loop marks every fetched message read before knowing which entries were emitted. Consumers of inject_context therefore never receive the omitted messages, and the next check is silent because they are already acknowledged. Mark only emitted messages read, or paginate the inbox so overflow remains queued.
Useful? React with 👍 / 👎.
| if out, err := commitCmd.CombinedOutput(); err != nil { | ||
| resetCmd := exec.Command("git", "reset", "HEAD", "--", relPath) | ||
| resetCmd.Dir = projectRoot | ||
| _ = resetCmd.Run() |
There was a problem hiding this comment.
Restore the previous Plans.md index state on commit failure
If Plans.md already has intentionally staged changes and the automatic commit fails—for example because Git identity is missing or a commit hook rejects it—this unconditional reset removes those staged entries rather than restoring the index state from before git add. Checked git reset -h: the pathspec form operates on the selected index entries. The working-tree data remains, but the user's staging state is silently lost; snapshot the prior index entry and restore it on failure instead.
Useful? React with 👍 / 👎.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (41)
🔥 Files not summarized due to errors (2)
WalkthroughChangeslivemsg 配送と受信
セッション presence
PreCompact 自動 checkpoint
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Sender
participant InboxSend
participant LivemsgStore
participant StopHook
participant InboxCheck
Sender->>InboxSend: inbox send
InboxSend->>LivemsgStore: Send sanitized message
StopHook->>InboxCheck: inbox check
InboxCheck->>LivemsgStore: Read unread messages
LivemsgStore-->>InboxCheck: messages
InboxCheck-->>StopHook: inject_context JSON
InboxCheck->>LivemsgStore: MarkRead
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies" Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What's Changed
Named, directed session messaging with a trust contract (HOTL), session labels/task declarations with reverse lookup, runtime identity for generated delivery hooks, and PreCompact auto-checkpoint instead of blocking.
Before / After
bin/harness inbox send --team <t> --from <id> --to <agent> "..."delivers at the recipient's turn boundary (Stop hook), silent when 0 unreadinbox sentshows read flag + read_at{{TEAM}}/{{AGENT}}(de-facto no-op)inbox check --from-env; identity resolves at runtime from envsession-list.shshowed only session ids; no way to find "who is working on task X"{label, task, since};harness session declare/listgives task→session reverse lookup (liveness stays filename+mtime only)precompactAutoCommit: falseAdded
inbox check/monitor, newinbox send/inbox sent, additiveStore.Sentdeliveryidentity.Resolve()(env → breezing fallback), placeholder-free generated hooks, golden fixtures updatedharness session declare/list,session-list.shas thin wrapper, auto-declare wired into harness-work/breezing skillsChanged
Verification
cd go && go test ./... -count=1PASS on merged trunk; gofmt cleanscripts/ci/check-consistency.shall green;tests/validate-plugin.sh127 passed / 0 failed; branch-alignment ledger OKsentshows read_at;session declare 121.5→ list reverse lookup🤖 Generated with Claude Code
https://claude.ai/code/session_013QAJ4vvsW1qwgCFM6Bn2Sh
Summary by CodeRabbit