/skills now enumerates bundled_skills.BUNDLED_SKILLS (matching the npm
SkillsMenu component, which lists skills — not slash commands).
Previously it mislabeled the slash-command catalog as "Available Skills".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Wires clear_session_env_vars() into LocalCodingAgent.clear_runtime_state so the
/clear slash command now drops session-scoped env vars alongside the rest of the
ephemeral runtime state, matching commands/clear/caches.ts:127.
Wires session_env_vars.py into agent_tools._build_subprocess_env so that
variables set via the session registry now reach spawned children, matching
utils/shell/bashProvider.ts:249. Per-call extra_env still wins so explicit
tool overrides take precedence over session defaults.
Adds /theme, /voice, /sandbox-toggle (alias /sandbox), /keybindings,
and /btw ported from npm src/commands/. Settings-touching commands
write through the existing ConfigRuntime to .claude/settings.local.json
(theme, voiceEnabled, sandbox.excludedCommands). /keybindings creates
a JSON template on first invocation. /btw flips into a prompt-style
result that asks the model to answer the side question without
mutating workspace state.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds 15 commands ported from npm src/commands/: /output-style,
/release-notes, /feedback (alias /bug), /upgrade, /stickers,
/mobile (aliases /ios, /android), /desktop (alias /app),
/install-github-app, /install-slack-app, /privacy-settings,
/extra-usage, /passes, /rate-limit-options, /chrome, and
/reload-plugins. Browser launches honor CI / CLAUDE_CODE_NO_BROWSER
and fall back to a printed link when a browser is unavailable.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Core changes:
- Added claw-code/src/token_budget.py for projected prompt size, chat-framing overhead, output reserve, and soft/hard input limits.
- Wired preflight prompt-length validation and auto-compact/context collapse into claw-code/src/agent_runtime.py.
- Extended claw-code/src/compact.py so compaction reports usage back to the runtime.
- Added inspection surfaces in claw-code/src/agent_slash_commands.py and claw-code/src/main.py:
- /token-budget and /budget
- token-budget
- Hardened claw-code/src/tokenizer_runtime.py so arbitrary simple model names fall back cleanly instead of trying a slow Transformers
lookup.
- Exported the new helpers in claw-code/src/__init__.py.
Docs and tracking:
- Updated claw-code/PARITY_CHECKLIST.md to mark prompt-length validation, token-budget calculation, and auto-compact/context collapse as
done.
- Updated claw-code/README.md and claw-code/TESTING_GUIDE.md with the new commands and behavior.
Tests:
- Added claw-code/tests/test_token_budget.py.
- Updated claw-code/tests/test_agent_runtime.py, claw-code/tests/test_agent_slash_commands.py, claw-code/tests/test_main.py, and claw-code/
tests/test_agent_context_usage.py.
- Verified with:
- /data/fs201059/aa17626/miniconda3/bin/python3 -m compileall src tests
- /data/fs201059/aa17626/miniconda3/bin/python3 -m unittest -v tests.test_token_budget
tests.test_agent_runtime.AgentRuntimeTests.test_agent_rejects_prompt_before_backend_when_preflight_input_budget_is_exceeded
tests.test_agent_runtime.AgentRuntimeTests.test_agent_auto_compacts_context_before_next_model_call tests.test_agent_slash_commands
tests.test_main tests.test_compact tests.test_tokenizer_runtime tests.test_agent_context_usage
- Result: 71 tests, OK
persistent plan runtime with update_plan, plan_get, and plan_clear, plus plan-to-task sync wired through claw-code-agent/src/
agent_tools.py, claw-code-agent/src/agent_runtime.py, claw-code-agent/src/agent_context.py, claw-code-agent/src/agent_prompting.py, and claw-code-agent/src/
agent_slash_commands.py. New local plan slash commands are /plan and /planner.