LoadContext: Claude desktop Code-tab sessions never load the constitutional layer (fallback covers sdk-ts/sdk-py only)
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 86/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bun, typescript
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
Bắt đầu với hooks/LoadContext.hook.ts gần dòng 430 và fallback sdk-ts/sdk-py hiện có cho LIFEOS_SYSTEM_PROMPT.md. Tái hiện vấn đề bằng lệnh Bun CLAUDE_CODE_ENTRYPOINT=claude-desktop trong issue, rồi thêm điểm vào desktop vào fallback đó trong khi vẫn giữ nguyên việc loại trừ trường hợp resume. Chạy các kiểm tra khởi động cho claude-desktop, sdk-ts, cli và một lần resume trên desktop; hoàn tất nghĩa là chỉ các host được hỗ trợ không resume mới phát ra lời nhắc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
LifeOS 8.761.0 · attestation: not run
What is broken
Sessions started from the Claude desktop app's Code tab (CLAUDE_CODE_ENTRYPOINT=claude-desktop) run without the LifeOS constitutional layer. The desktop app starts the CLI itself, never through the lifeos launcher, so --append-system-prompt-file is never passed. The fallback in hooks/LoadContext.hook.ts (public PR #2240) tells the session to Read LIFEOS_SYSTEM_PROMPT.md, but only for sdk-ts and sdk-py. claude-desktop passes the channel gate (notification-channel maps it to desktop, public PR #2105), so it reaches that check and gets nothing.
The session-start banner still says "Constitutional rules are in the system prompt", so the session believes the rules are loaded. In practice rules such as flag-ambiguity-first and the response format never reach the model.
Where (file:line)
hooks/LoadContext.hook.ts:430
Repro on a clean tree
On a clean 8.761.0 install:
```bash
echo '{"source":"startup"}' | CLAUDE_CODE_ENTRYPOINT=claude-desktop bun ~/.claude/hooks/LoadContext.hook.ts 2>/dev/null | grep -c 'constitutional layer is not loaded'
Prints 0. With CLAUDE_CODE_ENTRYPOINT=sdk-ts (and a TERM set) it prints 1. Opening a Code-tab session in the desktop app shows the same: no Read of the system prompt and no reminder to do it.
### Negative control
Probe: `echo '{"source":"startup"}' | CLAUDE_CODE_ENTRYPOINT=claude-desktop bun /tmp/claude-1000/-home-<name>-ai-projects-tools-LifeOS/ec2673f7-837d-4c31-ba00-839575e86289/scratchpad/up/LifeOS/install/hooks/LoadContext.hook.ts 2>/dev/null | grep -q 'constitutional layer is not loaded'` · exit 1 · captured 2026-12-01T22:46:05.094Z
(no output)
### Suggested fix
Add `claude-desktop` to the entrypoints that get the reminder, and word the reminder so it fits a host that skipped the flag, not only one that replaced it:
```ts
const noPromptFileHosts = ['sdk-ts', 'sdk-py', 'claude-desktop'];
if (noPromptFileHosts.includes(entrypoint) && startSource !== 'resume' && existsSync(systemPromptFile)) {
Tested locally: claude-desktop and sdk-ts startups get the reminder, cli and a claude-desktop resume do not.
Environment
- OS: Ubuntu 26.04.1 LTS (x64)
- Harness: claude-code
- bun: 1.4.5 · git: 2.53.0
- Doctor broken: none
- Ngôn ngữ chính
- TypeScript
- Star
- 20k
- Fork
- 2.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của danielmiessler/LifeOS
-
[bug] Socrates launchd-path adapter throws EISDIR when an import names a folder beside its .ts fileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
danielmiessler/LifeOS#3123 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
danielmiessler/LifeOS#3122 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
danielmiessler/LifeOS#3120 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
LifeOSHooks stamp ages out in a live session: native hooks run beside the plugin again after 7 daysĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
danielmiessler/LifeOS#3080 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#3055 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của danielmiessler/LifeOS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
eliasstravik/herdr-projects#1700 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[SNZB-02DR2 / SONOFF] ???Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Koenkk/zigbee2mqtt#33890 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Skill Workshop skill diet should use the configured utility model, not always the primaryĐang mởclawsweeper:fix-shape-clear clawsweeper:needs-live-repro clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:auth-provider issue-rating: 🐚 platinum hermit P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
openclaw/openclaw#210348 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
can1357/oh-my-pi#21349 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày