Commit History
-
Create Hub artifact collections lazily (#245)
Unverified signature* Create Hub artifact collections lazily Co-authored-by: OpenAI Codex <codex@openai.com> * Cache lazy Hub collection slugs in child hooks Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>60474c1 -
Implement `/resume` command for CLI (#233)
Unverified signature* Add /resume command to CLI * Refine /resume feature * Refine /resume implementation * Address review comments --------- Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>0321690
-
Add ML Intern Hub artifact metadata (#225)
Unverified signature* Add ML Intern Hub artifact metadata Co-authored-by: OpenAI Codex <codex@openai.com> * Extend Hub artifact hooks to sandbox bash Co-authored-by: OpenAI Codex <codex@openai.com> * Create Hub artifact collections at session start Co-authored-by: OpenAI Codex <codex@openai.com> * Address Hub artifact PR review comments Co-authored-by: OpenAI Codex <codex@openai.com> * Respect Hub collection title limits Co-authored-by: OpenAI Codex <codex@openai.com> * Shorten collection session UUID fragments Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>4fc6e96
-
Add CI for tests and Ruff (#217)
Unverified signature* Add CI for tests and Ruff Co-authored-by: OpenAI Codex <codex@openai.com> * Enforce Ruff formatting in CI Co-authored-by: OpenAI Codex <codex@openai.com> * Document Ruff pre-commit checks Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>754345f -
fix(compaction): break infinite loop + truncate oversized messages (#213)
Guillaume SalouUnverified signature* fix(compaction): break the infinite-compaction loop, truncate oversized messages Sessions stuck in a compaction retry loop have been silently burning Bedrock budget while staying invisible in the session dataset. Pod logs from 2026-05-03 on prod-114 showed the pattern firing minute-after-minute on multiple replicas: Context compacted: 200001 -> 215566 tokens Context compacted: 215566 -> 215572 tokens ContextWindowExceededError — forcing compaction Context compacted: 200001 -> 215544 tokens ... Root cause: a single message in the "untouched" tail (typically a tool output of 80k+ tokens — bash dump, file content, CSV) keeps the post-compact context above the 90% threshold. Compaction triggers again, calls Bedrock again, gets the same 215k result, loops. ~$3 per Opus retry, indefinitely. Sessions never reach _run_session.finally → save_and_upload_detached never fires → cost is real but never lands in total_cost_usd. Cross-check: dataset Bedrock-only coverage on 2026-05-01 …d84b454
-
Auto-start CPU sandboxes for sessions (#200)
Unverified signature* Auto-start CPU sandboxes for sessions Co-authored-by: Codex <codex@openai.com> * Retry sandbox runtime visibility checks Co-authored-by: Codex <codex@openai.com> * Stabilize auto CPU sandbox creation Co-authored-by: OpenAI Codex <codex@openai.com> * Address sandbox PR review comments Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: Codex <codex@openai.com>8615c28 -
Add session YOLO auto-approval budget (#201)
Unverified signature* Add session YOLO auto-approval budget Co-authored-by: Codex <codex@openai.com> * Address YOLO approval review feedback Co-authored-by: Codex <codex@openai.com> --------- Co-authored-by: Codex <codex@openai.com>77324b8 -
Auto-share session traces to a private HF dataset (#193)
Darshan Thakare +2: lewtun, Codex Unverified signature* feat: add share_traces toggle and per-user trace repo template * feat: support Claude Code JSONL format and per-target auth * feat: dual-upload sessions to private user trace dataset * chore: retry personal trace uploads on booting * feat: add /share-traces command to flip dataset visibility * docs: document HF trace auto-share and /share-traces * Use HF token owner for local dev auth Co-authored-by: Codex <codex@openai.com> * Rename personal session trace dataset Co-authored-by: Codex <codex@openai.com> * Add session dataset card metadata Co-authored-by: Codex <codex@openai.com> * Fix session trace upload review issues Co-authored-by: OpenAI Codex <codex@openai.com> * Preserve secret scrubbing before trace uploads Co-authored-by: OpenAI Codex <codex@openai.com> * Link ML Intern demo in dataset card Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> Co-authored-by: Codex <codex@openai.com>0bd7547
-
feat(telemetry): track 5 untracked Bedrock call sites for full cost attribution (#179)
Guillaume SalouUnverified signature* feat(telemetry): track 5 untracked Bedrock call sites for full cost attribution Cost Explorer ($78,738 over 6 days) vs the session dataset's total_cost_usd (~$354/day attributed) showed the dataset captures only ~33% of real Bedrock spend. Root cause: out of 9 acompletion() call sites, only 2 (in agent_loop.py) emit the llm_call event that total_cost_usd sums. This wires telemetry into the 5 Bedrock-billing call sites that were flying blind, with a `kind` tag on each call so analytics can split spend by category: - research_tool.py × 3 → kind="research" (sub-agent loop) - context_manager.py → kind="compaction" (history summary) - effort_probe.py → kind="effort_probe" (cascade walk) Plus a fourth tag for the session-restore summary path (session_manager.py → kind="restore"). Plumbing changes: - telemetry.record_llm_call now accepts kind="..." (default "main" preserves existing behavior). - summarize_messages() and ContextManager.compact() take optional ses…7867a7a
-
Add Slack gateway (#116)
Unverified signature* Add messaging gateway and notify tool Co-authored-by: OpenAI Codex <codex@openai.com> * Handle Bedrock streaming permission denials Co-authored-by: OpenAI Codex <codex@openai.com> * Revert "Handle Bedrock streaming permission denials" Co-authored-by: OpenAI Codex <codex@openai.com> * Add automatic completion notifications Co-authored-by: OpenAI Codex <codex@openai.com> * Auto-attach CLI notification destinations Co-authored-by: OpenAI Codex <codex@openai.com> * Defer CLI completion notifications until render Co-authored-by: OpenAI Codex <codex@openai.com> * Increase completion notification summary cap Co-authored-by: OpenAI Codex <codex@openai.com> * Add Slack user notification defaults Co-authored-by: Codex <codex@openai.com> * Increase Slack turn completion summary limit Co-authored-by: Codex <codex@openai.com> * Remove legacy auto notification event upgrade Co-authored-by: Codex <codex@openai.com> * Require session config instead of hard-coded model fallback C…6155b26 -
Preserve streamed thinking metadata with live model tests (#150)
Aksel Joonas ReediUnverified signature* Add opt-in live thinking model tests Add paid integration coverage for the concrete models requested for #143: Anthropic Opus 4.7 and OpenAI's current GPT-5.2 model. The tests load an explicit env file, run only behind ML_INTERN_LIVE_LLM_TESTS=1, and keep normal CI credential-free. Constraint: Live provider calls require local credentials and should not run by default in CI. Rejected: Make live provider tests unconditional | would fail or spend tokens anywhere credentials are absent. Confidence: high Scope-risk: narrow Tested: ML_INTERN_LIVE_LLM_TESTS=1 ML_INTERN_LIVE_ENV_FILE=/Users/akseljoonas/Documents/ml-intern/.env UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/integration/test_live_thinking_models.py -q -rs Tested: UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_thinking_history.py tests/integration/test_live_thinking_models.py -q * Preserve streamed Opus thinking metadata Live Opus 4.7 exposed that LiteLLM surfaces streamed thinking bl…d408a51 -
Preserve thinking state across tool turns (#143)
Aksel Joonas ReediUnverified signature* Preserve thinking state across tool turns Anthropic thinking responses need their thinking_blocks and reasoning_content replayed with assistant tool-call messages. The loop was rebuilding assistant history from only content and tool calls, causing LiteLLM to strip thinking on continuation turns. Constraint: Non-thinking providers and responses without reasoning fields must keep the existing message shape. Rejected: Disable extended thinking for tool-using runs | avoids the warning by removing the feature that improves reasoning quality. Confidence: high Scope-risk: moderate Directive: Any future assistant-message reconstruction must preserve provider reasoning fields when present. Tested: UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_thinking_history.py tests/unit/test_dangling_tool_calls.py tests/unit/test_malformed_args_recovery.py * Replay thinking metadata only for Anthropic Review caught that reasoning_content is not safe to echo through OpenAI-co…59b2038 -
Keep repetition guard internal (#144)
Aksel Joonas ReediUnverified signature* Clarify repetition guard messaging The loop breaker is intentional recovery behavior, but the user-facing 'doom loop' phrasing reads like a crash. Rename the visible log and system hint to a repetition guard while preserving the existing detector behavior and historical SFT tag compatibility. Constraint: Existing trajectories may still contain the old wording, so the tagger must recognize both labels. Rejected: Remove the event entirely | users would lose visibility into why the agent changed strategy. Confidence: high Scope-risk: narrow Directive: Keep user-facing recovery logs operational and non-alarming; reserve internal jargon for code, not UI events. Tested: UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_doom_loop_polling.py tests/unit/test_sft_tagger.py * Hide repetition guard from user surfaces The repetition guard is an internal control-flow intervention, not a status event users need to act on. Remove the CLI/frontend tool_log emissions while …e8ed637 -
fix(cli): persist HF user id in saved sessions (#146)
Unverified signature* fix(cli): persist HF user id in saved sessions Co-authored-by: OpenAI Codex <codex@openai.com> * test: remove submission loop user id unit test Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>2083476
-
Run jobs under user or org accounts with upgrade / org-pick UX (#132)
Aksel Joonas ReediUnverified signature* agent/core/agent_loop.py: jobs access rewiring * agent/core/telemetry.py: jobs access rewiring * agent/tools/jobs_tool.py: jobs access rewiring * backend/dependencies.py: jobs access rewiring * backend/models.py: jobs access rewiring * backend/routes/agent.py: jobs access rewiring * frontend/src/components/Chat/ChatInput.tsx: jobs access rewiring * frontend/src/components/ClaudeCapDialog.tsx: jobs access rewiring * frontend/src/components/SessionChat.tsx: jobs access rewiring * frontend/src/hooks/useAgentChat.ts: jobs access rewiring * frontend/src/lib/sse-chat-transport.ts: jobs access rewiring * frontend/src/store/agentStore.ts: jobs access rewiring * frontend/src/types/agent.ts: jobs access rewiring * scripts/build_kpis.py: jobs access rewiring * tests/unit/test_build_kpis.py: jobs access rewiring * agent/core/hf_access.py: jobs access rewiring * frontend/src/components/JobsUpgradeDialog.tsx: jobs access rewiring * tests/unit/test_hf_access.py: jobs access rewirin…ff8c636
-
Fix CLI rendering corruption and split CLI/frontend model defaults (#121)
Aksel Joonas ReediUnverified signature* Stabilize CLI rendering and make surface defaults explicit The interactive CLI was interleaving live sub-agent redraws with streamed markdown output, which corrupted ANSI rendering and leaked raw control sequences into the terminal. The CLI and web app also shared one default model config even though they need different Anthropic routing defaults. Constraint: CLI default must use direct Anthropic credentials while web sessions must default to Bedrock Anthropic Constraint: Interactive terminal output must remain readable while sub-agent progress is live Rejected: Single shared config file with runtime overrides | keeps ownership of defaults implicit across surfaces Rejected: Keep background redraw ticker | concurrent terminal writers still corrupt streamed output Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep CLI and frontend default models in separate config files unless both surfaces intentionally converge again Tested: python -m compileall agent backen…3eec386
-
feat(observability)
Aksel Joonas ReediUnverified signature2a2e170
-
feat: enable Anthropic prompt caching on system prompt and tools (#69)
Unverified signature* feat: enable Anthropic prompt caching on system prompt and tools Mark the rendered system prompt and the tool block with cache_control breakpoints when calling Anthropic models. The static prefix (~4-5K tokens of system prompt + 15+ tool definitions) was being re-billed at full input rate on every turn, every retry, and every research sub-agent iteration (up to 60 per task). With ephemeral cache breakpoints, subsequent turns within the 5-minute TTL are billed at cache-read pricing (~10% of input cost). Expected savings: 40-50% input tokens on multi-turn conversations, 60-80% on research sub-agent loops. Caching is GA in the Anthropic API and natively supported by litellm 1.83+ via cache_control blocks (no beta header required). Non-Anthropic models (HF router, OpenAI) are passed through unchanged. The helper does not mutate the caller's message list or tool list, so the persisted ContextManager.items history stays in its original string-content form. * refactor: hoist prompt_cac…5d357ba
-
fix /model switcher with effort params
Aksel Joonas ReediUnverified signature* /model: probe effort combo on switch, stop passing reasoning_effort to litellm Switching to claude-opus-4-7 with /effort set would 400 with "thinking.type.enabled is not supported" because litellm 1.83.0's Anthropic adapter substring-matches "4.6" to decide which thinking API shape to send, and doesn't know about 4.7's adaptive + output_config.effort contract. Rather than maintain a per-model capability table that rots every time a new Claude family ships, this change trusts the API itself: - llm_params.py: for anthropic/*, bypass litellm's reasoning_effort -> thinking mapping and pass thinking={type: adaptive} plus output_config={effort: ...} as top-level kwargs directly. litellm forwards unknown top-level params into Anthropic request bodies (extra_body does NOT work here — Anthropic rejects it as "Extra inputs are not permitted"). One localized monkey-patch widens litellm 1.83's hardcoded _is_opus_4_6_model check so effort=max isn't rejected synchronously on 4.7 — re…e2552e8 -
Read max context from litellm + compact at 90% (#54)
Aksel Joonas ReediUnverified signature* Read max context from litellm.get_model_info + compact at 90% The local _MAX_TOKENS_MAP had Claude Opus 4.6 pinned at 200k, triggering compaction at ~20% of its real 1M window. Swap the hand-maintained table for litellm.get_model_info()['max_input_tokens'], which LiteLLM keeps in sync upstream (Opus 4.6=1M, GPT-5=272k, Sonnet 4.5=200k, etc.). HF router-only ids (MiniMax, Kimi, GLM) aren't in litellm's catalog and fall through to the 200k default — close enough to their advertised ranges and safe if the model lies. Also shifts compaction to fire at 90% of max_context instead of >100%. The old condition waited until context had already overshot, risking the next LLM call hitting ContextWindowExceededError before the compact finished. 90% gives headroom for the summary call + one more turn. * Drop the legacy -10k buffer — the 90% ratio is the headroom now ContextManager was subtracting a fixed 10k tokens from max_context on top of the new 90% compaction threshold, so a 1M-window Opu…28b8f2b -
Fix parallel-research display: per-call stats in CLI and web UI (#49)
Aksel Joonas Reedi +1: lee101 Unverified signatureWhen multiple research sub-agents ran concurrently, the CLI collapsed them into a single flickering slot and every web-UI tool card showed the aggregate across all agents — so 3 parallel calls looked like 1. CLI (agent/utils/terminal_display.py): - Replace the global SubAgentDisplay singleton with SubAgentDisplayManager that tracks each agent by agent_id and renders one block per agent with independent (tool count · tokens · elapsed). - 4 rolling tool-call lines per agent (was 2). - When 2+ agents are live, switch to a compact one-line-per-agent layout (label + stats + most-recent tool). Detailed 4-line rolling view only when a single agent is active. Keeps the live region small enough to fit on one terminal page so cursor-up/erase doesn't drift when content would otherwise scroll into scrollback. - Clip every live-region line to terminal width (ANSI-aware) so a wrapped line can't corrupt the cursor-up math on narrow terminals. - On completion, erase the live block and f…5ab7c4e -
Route HF inference through /v1 auto-router + add reasoning_effort knob
Users paste bare HF model ids (MiniMaxAI/MiniMax-M2.7, moonshotai/Kimi-K2.6) with an optional :fastest|cheapest|preferred|<provider> suffix; the router picks a provider and handles failover. /model does a live preflight against /v1/models and prints providers, pricing, context, tool support — warn-and- allow for unknowns with fuzzy suggestions. Friendly messages replace LiteLLM's raw traceback for model/provider mismatches, and the noisy 'Give Feedback' banner is suppressed. Adds a reasoning_effort config + /effort command (default high). OpenAI and Anthropic get the top-level param natively; HF router gets it via extra_body with minimal->low normalization for models like MiniMax M2 that require reasoning. Frontend + backend model selectors updated to the bare-id format.0a9e96d
-
Fall back to user HF token for router when INFERENCE_TOKEN is unset (#39)
Aksel Joonas Reedi +1: Claude Opus 4.7 (1M context)Unverified signatureThe HF router code path only read INFERENCE_TOKEN, which is the shared server-side key set on the hosted Space so inference is free for users. On the CLI / self-hosted path that env var is absent, so requests went out with no bearer token and the router returned 401 — surfaced to users as "Authentication failed" even with a valid HF_TOKEN (issue #36). Resolve api_key in this order: 1. INFERENCE_TOKEN env (unchanged Space behavior — shared billing) 2. session.hf_token (user's OAuth / CLI token) 3. HF_TOKEN env (belt-and-suspenders for CLI) Applied to _resolve_hf_router_params, research_tool._resolve_llm_params, and ContextManager.compact. Fixes #36 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>182ddee
-
Refactor approval handling and enhance markdown table styles
4501765
-
Improve agent loop, tools, and research subagent for long-running autonomous tasks
- Add --no-stream and --max-iterations CLI flags for headless operation - Simplify context manager: remove staged pruning, track actual token usage - Add doom-loop detection and context budget to research subagent - Improve file tools: better enforcement, error messages, descriptions - Improve bash tool: longer timeouts, background execution guidance - Add training logging and HP sweep guidance to system prompt - Relax Python requirement to >=3.11 - Remove unused file_content_cache73882d9
-
feat: add headless CLI mode with local filesystem tools and rich terminal rendering
- Add argparse-based headless mode: `python -m agent.main "prompt here"` - Local tool specs override sandbox /app references for CLI mode - System prompt injects CLI-specific context (working directory, no sandbox) - Extract streaming/non-streaming LLM call helpers with LLMResult dataclass - Add shimmer thinking animation (truecolor gradient sweep) - Progressive markdown rendering via rich Live display - Clean MCP shutdown sequence, suppress asyncio teardown noise - Add rich dependency to agent extras577ec48 -
feat: LLM-based pruning for complex tool outputs (hf_jobs)
Tools in _LLM_PRUNE_TOOLS get a cheap LLM call (≤600 tokens) that extracts the answer from the raw output, preserving job IDs, metrics, and error messages exactly. Falls back to deterministic truncation if the LLM call fails. Three tool lists now control pruning behavior: - _PRUNE_SKIP_TOOLS: never pruned (research, plan_tool) - _LLM_PRUNE_TOOLS: LLM-summarised (hf_jobs) - Everything else: deterministic 80-char truncation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>d4b1495 -
Add deterministic pruning of old tool outputs before LLM compaction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>64437d0 -
Add per-tool error limits and per-turn request cap
544a574 -
feat: add doom-loop detection for repeated tool call patterns
Detects when the agent is stuck calling the same tools repeatedly (identical consecutive calls or repeating sequences like A→B→A→B) and injects a corrective prompt to break the cycle.d3bb2d2
-
feat: render cancelled tool state in UI after user interrupt
Send tool_state_change(cancelled) events for in-flight tools so the frontend can flip spinners to a muted "cancelled" state. Keep SSE stream open (don't call chat.stop()) so backend events arrive. Show "What should the agent do instead?" placeholder after cancel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>887da19 -
feat: kill sandbox processes and cancel HF jobs on user interrupt
When the user clicks cancel, long-running sandbox commands and HF jobs now actually stop instead of running to completion in the background. - Sandbox server: track PIDs with Popen, add /api/kill endpoint - Sandbox client: add kill_all() method - HF jobs: track running job IDs in session, cancel on interrupt - Agent loop: cleanup on cancel in both run_agent and exec_approval - exec_approval: add cancellation support (was completely missing) - Sandbox title: set descriptive name instead of inheriting template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3c91fc8
-
fix: auto-retry on truncated tool calls + correct activity status on refresh
Agent loop: when finish_reason=length drops tool calls, inject a system hint telling the LLM to use bash heredoc or smaller edits instead, then continue the loop. Also set max_tokens=16384 and emit an error event so the truncation is visible in the UI. Frontend: extract actual tool name from in-progress message parts on hydration instead of hardcoding 'running', which rendered as "Running running" in the activity bar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8e63f40 -
fix: live event streaming after reconnection + LiteLLM timeout
Frontend: visibility change handler now re-hydrates messages, opens a live event stream via GET /api/events, and polls messages every 3s to keep the chat in sync. Terminal events trigger a final hydration and clean up both the stream and poll. Backend: add timeout=600 to litellm acompletion() call — long tool-use turns were being killed by the default timeout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>47d6895 -
fix: clear pending_approval before tool execution starts
Moves session.pending_approval = None to right after parsing approval decisions, before tool execution begins. Previously it was cleared after all tools finished, so a page refresh during execution would re-show the approval dialog. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c2a3f88
-
refactor: simplify tool call validation and make interrupts cancel tool execution
- Handle finish_reason=length by dropping truncated tool calls before they enter context - Single json.loads per tool call instead of 4 redundant parses - Parsed args flow through to approval/execution without re-parsing - Replace recover_malformed_tool_calls (90 lines) with inline validation in agent loop — bad calls get error results, good calls execute - Make tool execution cancellable: asyncio.wait races gather against cancel event so Ctrl+C/frontend interrupt stops immediately instead of waiting for all tools to finish - Keep _patch_dangling_tool_calls as the only safety net in get_messages() for any remaining edge cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f03cbf4 -
feat: CLI local mode, slash commands, interrupt support; remove lmnr; frontend fixes
CLI: - Add local tools (bash/read/write/edit) via local_tools.py for CLI mode - Add ToolRouter local_mode to use local tools instead of sandbox - Add slash commands: /help, /undo, /compact, /model, /yolo, /status - Add Ctrl+C interrupt support (single=cancel, double=exit) - Add HF token auto-loading from env/huggingface-cli - Add session_holder for interrupt/model/status access - Add Session.update_model() method Cleanup: - Remove lmnr dependency and all observe/Laminar references - Delete unused logo PNGs Frontend: - Show hardware pricing in tool approval UI - Add sandbox explanation text - Revert bash streaming to panel (caused issues) - Fix setPanelOutput to not force panel view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>82b0c13
-
fix: correct context_length init and emit tool_call events for malformed calls
- Initialize context_length to max_context (not token-estimate of system prompt) and reserve 10k token buffer to prevent overflows - Emit synthetic tool_call events before tool_output errors for malformed calls so the frontend renders matching dynamic-tool parts288473a
-
fix: handle interrupt during streaming tool calls without corrupting context
When the user clicks interrupt while the LLM is streaming a tool call, the accumulated deltas can have empty IDs and truncated arguments. Previously these got added to the context and caused litellm API errors on the next call. - Add cancellation check inside the streaming loop so we stop early - Drop tool_calls with empty IDs when building from stream deltas - recover_malformed_tool_calls() now strips empty-ID tool_calls from assistant messages as a safety net Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4eb958e -
fix: recover malformed tool calls instead of crashing session
When the LLM produces malformed JSON in tool call arguments (common with large write calls), the session would crash. Now ContextManager.recover_malformed_tool_calls() sanitizes the JSON, injects an error result telling the agent to retry with smaller content, and the agent loop skips execution of those tools. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c7899fc
-
fix: properly close SDK message on error, show tool errorText
b22c5f3 -
fix: patch dangling tool calls on error, move undo to context manager
a1ce5bc
-
feat: resolve sandbox file paths and show tool description in status
- Extract resolve_sandbox_script utility in sandbox_tool.py to detect file paths and read content from sandbox via cat - Resolve script paths before sending approval_required event so the frontend receives actual file content for display and editing - Show tool description arg in status chip and activity bar instead of generic "running" / "Running bash" textae24efc -
fix: route all HF token usage through session.hf_token from OAuth
Remove all os.environ.get("HF_TOKEN") fallbacks. Token now flows exclusively through OAuth -> session.hf_token -> tools. - Pass hf_token through Session -> ContextManager -> _get_hf_username - Add session param to docs, repo_files, repo_git handlers - Jobs use HF_ADMIN_TOKEN for creation, user token for job secrets - Remove HF_TOKEN env setup from backend/main.py - Remove module-level username cache (broken for multi-user)33f29a8
-
feat: implement cooperative agent cancellation with cancel button
ecbfd3c
-
feat: restore sandbox tools and proactive compaction
a644598 -
feat: merge HF Space improvements
79b2fcc
-
adding compaction
369d828 -
sandbox working and agent can use it
786b8bc
-
add create sandbox tool
2464c2e