Files
claude-foundations/memory/log/2026-03-25.110612.md
Paul O'Reilly e7c8214499 Add statusline scripts, context-load improvements, and prior distill updates
- Add statusline.sh and set-topic.sh for per-session status line topics
- Update context-load with improved directory walking and output format
- Update CLAUDE.md with status line docs and early-call safety note
- Update MEMORY.md and README.md with new script/skill entries
- Add memory files: script-statusline, skill-decompose, skill-orchestrate, gotchas-gitea
- Add networking.md best practice (nftables, systemd sockets, Docker forwarding, TLS)
- Update best practices from prior distill: documentation, kubernetes, scripting,
  secrets-management, skills-development
- Prune reflected session logs, add new session logs
- Update reflection state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:11:40 +13:00

1.8 KiB

Session Log — 2026-03-25

Summary

Fixed the set-topic.sh bootstrap race condition where calling it before statusline.sh had run caused an error. Implemented a pending-topic queue mechanism and added the permission rule across all three Claude profiles.

Decisions

  • Decision: Queue pending topics to /tmp/claude-pending-topic-<hash> instead of erroring — Rationale: set-topic.sh is called early in sessions (first message) before statusline.sh has written the session ID file. Erroring was noisy and unhelpful since the topic could just be deferred one response.
  • Decision: Have statusline.sh pick up and apply pending topics via mv — Rationale: Keeps the logic simple — statusline already runs after every response, so it's the natural place to consume the pending file. Using mv is atomic and avoids double-application.
  • Decision: Add Bash(~/.claude/status/set-topic.sh:*) to all three profile settings files — Rationale: The script is called every session start and is safe to auto-approve.

Gotchas Discovered

  • [statusline] Symptom: set-topic.sh always errored on first message with "No session ID found" because /tmp/claude-session-id-<hash> doesn't exist until statusline.sh runs after the first response — Fix: Write topic to a pending file; statusline.sh picks it up on its next run.

Key Context

  • Three profile settings files need to stay in sync: ~/.claude/settings.json, ~/.claude-octopus/settings.json, ~/.claude-oreillyit/settings.json
  • The statusline.sh hash uses echo -n "$CWD" | md5sum (note the -n flag — important for hash consistency with set-topic.sh)

Process Notes

  • Clean fix — two small script changes plus doc updates. Tested both the happy path (session ID exists) and the pending path (no session ID yet).