Skip to content

Pick up 5 low-risk upstream fixes (post-1e92490)#18

Merged
prcdslnc13 merged 5 commits into
mainfrom
upstream-fixes-pickup
May 9, 2026
Merged

Pick up 5 low-risk upstream fixes (post-1e92490)#18
prcdslnc13 merged 5 commits into
mainfrom
upstream-fixes-pickup

Conversation

@prcdslnc13
Copy link
Copy Markdown
Owner

Summary

Cherry-picks 5 low-risk upstream commits from ultraworkers/claw-code against the merge-base a389f8d. Selected for clean conflict-free merging and value to this fork; avoided the moderate-risk 6db68a2 (worker_boot.rs +319 lines) which deserves an isolated diff review first.

SHA Subject
6cc5f32 fix(permissions): return guidance for multi-word forms instead of falling through to LLM (ultraworkers#2994)
39a2d40 Prune heavy directories during glob searches
9885d72 Cap OpenAI default output tokens using model metadata
a88d864 Handle OpenAI token-limit errors as context-window failures
601d04d fix: REPL display, /compact panic, identity leak, DeepSeek reasoning, thinking blocks (+1099 lines)

The OpenAI pair (9885d72 + a88d864) is particularly relevant to this fork's LMStudio / OpenAI-compat backend usage. The +1099-line REPL bundle (601d04d) auto-merged cleanly across 15 files including runtime/src/lib.rs, tools/src/lib.rs, and rusty-claude-cli/src/main.rs. None of the picks touched the fork's hardening surface (.claw.json files at root and rust/, runtime/src/permissions/, crates/runtime/src/oauth/).

Test plan

  • cargo check --workspace --all-targets — clean in 26s.
  • cargo test --workspace — all crates pass except 9 pre-existing failures in rusty-claude-cli arg-parsing tests. Verified those same 9 failures reproduce on main without any picks applied — picks introduce zero regressions. The pre-existing failures are about the parser walking up to the hardened .claw.json (defaultMode: "default") and resolving to WorkspaceWrite instead of the expected ReadOnly — unrelated to this work, will be filed separately.
  • Manual REPL smoke after merge to confirm /compact no longer panics on Thinking blocks.
  • LMStudio interaction smoke (verify the OpenAI token-cap + token-limit-as-context-window paths) on the GPU host once available.

🤖 Generated with Claude Code

code-yeongyu and others added 5 commits May 8, 2026 18:11
…ling through to LLM (ultraworkers#2994)

claw permissions list / claw permissions allow <tool> / claw permissions deny <tool>
all fell through to the prompt/LLM path because parse_subcommand had no
arm for "permissions". The single-word bare form was already intercepted
by bare_slash_command_guidance, but any form with rest.len() > 1 bypassed
the single-word guard and landed in the _other => CliAction::Prompt branch.

Fix: add a "permissions" arm in parse_subcommand that returns a structured
guidance Err so all multi-word forms get the same exit:1 + JSON error as
the bare single-word form, without any LLM call or session creation.

Verified: all invocation forms (bare, list, read-only, workspace-write,
allow/deny <tool>) exit 1 with kind:unknown guidance JSON. Zero sessions.
… thinking blocks

Five interrelated fixes from parallel Hephaestus sessions:

1. fix(repl): display assistant text after spinner (ultraworkers#2981, ultraworkers#2982, ultraworkers#2937)
   - Added final_assistant_text() call after run_turn spinner completes
   - REPL now shows response text like run_prompt_json does

2. fix(compact): handle Thinking content blocks (ultraworkers#2985)
   - Added ContentBlock::Thinking variant throughout compact summarizer
   - Prevents panic when /compact encounters thinking blocks

3. fix(prompt): provider-aware model identity (ultraworkers#2822)
   - New ModelFamilyIdentity enum (Claude vs Generic)
   - Non-Anthropic models no longer say 'I am Claude'
   - model_family_identity_for() detects provider and sets identity

4. fix(openai): preserve DeepSeek reasoning_content (ultraworkers#2821)
   - Stream parser now captures reasoning_content from OpenAI-compat
   - Emits ThinkingDelta/SignatureDelta events for reasoning models
   - Thinking blocks included in conversation history for re-send

5. feat(runtime): Thinking block support across codebase
   - AssistantEvent::Thinking variant in conversation.rs
   - ContentBlock::Thinking in session serialization
   - Thinking-aware compact summarization
   - Tests for thinking block ordering and content

Closes ultraworkers#2981, ultraworkers#2982, ultraworkers#2937, ultraworkers#2985, ultraworkers#2822, ultraworkers#2821
@prcdslnc13 prcdslnc13 merged commit 5bd2620 into main May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants