Commit History
-
Enforce YOLO cap across session usage (#313)
Unverified signature* Enforce YOLO cap across session usage Co-authored-by: OpenAI Codex <codex@openai.com> * Address YOLO budget review feedback Co-authored-by: OpenAI Codex <codex@openai.com> * Switch YOLO LLM cap checks to post-call warnings Co-authored-by: OpenAI Codex <codex@openai.com> * Improve YOLO cap reached CTA Co-authored-by: OpenAI Codex <codex@openai.com> * Fix YOLO blocked approval flow Show cap extension controls for pre-execution budget blocks and preserve approved tool parts during approval continuation streams. Co-authored-by: OpenAI Codex <codex@openai.com> * Sync usage meter with YOLO ledger Co-authored-by: OpenAI Codex <codex@openai.com> * Fix YOLO usage accounting drift Co-authored-by: OpenAI Codex <codex@openai.com> * Emit YOLO updates for observed spend Co-authored-by: OpenAI Codex <codex@openai.com> * Handle YOLO updates in active chat stream Co-authored-by: OpenAI Codex <codex@openai.com> * Reconcile YOLO ledger from usage fetches Co-authored-by: OpenAI Codex…d76b37c -
Use session billing endpoint for inference usage (#314)
Unverified signature* Use session billing endpoint for inference usage Replace current-session inference billing estimates with the Hugging Face session usage endpoint and ensure HF Router requests carry session IDs across providers. Co-authored-by: OpenAI Codex <codex@openai.com> * Rotate inference billing session IDs Co-authored-by: OpenAI Codex <codex@openai.com> * Address session billing review feedback Co-authored-by: OpenAI Codex <codex@openai.com> * Send Router billing session ID header Co-authored-by: OpenAI Codex <codex@openai.com> * Fix duplicate streamed assistant text Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>9e28f0f
-
Add sandbox costs to usage meter (#311)
Unverified signature* Add sandbox costs to usage meter Co-authored-by: OpenAI Codex <codex@openai.com> * Remove usage rollup buckets Co-authored-by: OpenAI Codex <codex@openai.com> * Remove obsolete usage rollup assertions Co-authored-by: OpenAI Codex <codex@openai.com> * Remove unused usage window aggregation Co-authored-by: OpenAI Codex <codex@openai.com> * Update usage event sort test Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>1b98491
-
Add session usage threshold approvals (#310)
Unverified signature* Add session usage threshold approvals Co-authored-by: OpenAI Codex <codex@openai.com> * Address usage threshold review feedback Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>18716c3
-
Recover chat sends after fetch failures (#308)
Unverified signature* Recover chat sends after fetch failures Co-authored-by: OpenAI Codex <codex@openai.com> * Address chat send recovery review Co-authored-by: OpenAI Codex <codex@openai.com> * Avoid redundant recovery session fetch Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>65c14d1
-
Add app-attributed usage display (#292)
Unverified signature* Add app-attributed usage display Co-authored-by: OpenAI Codex <codex@openai.com> * Fix usage windows for local timestamps Co-authored-by: OpenAI Codex <codex@openai.com> * Add HF billing usage to usage display Co-authored-by: OpenAI Codex <codex@openai.com> * Simplify usage popover Co-authored-by: OpenAI Codex <codex@openai.com> * Remove token row from usage popover Co-authored-by: OpenAI Codex <codex@openai.com> * Move session billing note to usage header Co-authored-by: OpenAI Codex <codex@openai.com> * Optimize usage popover rollup loading Co-authored-by: OpenAI Codex <codex@openai.com> * Round usage costs to cents Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>7d506e1
-
Implement user-billed model policy (#289)
Unverified signature* Implement user-billed model policy - bill hosted inference to user tokens and remove subsidy quota state - switch web and CLI defaults and remove Sonnet from model lists - add plan-aware inference credit CTAs Co-authored-by: OpenAI Codex <codex@openai.com> * Recommend Opus in model picker Co-authored-by: OpenAI Codex <codex@openai.com> * Remove minimum plan from model config Co-authored-by: OpenAI Codex <codex@openai.com> * Link message failures to Space discussions Co-authored-by: OpenAI Codex <codex@openai.com> * Remove compatibility quota endpoint Co-authored-by: OpenAI Codex <codex@openai.com> * Remove obsolete bill_to_user argument Co-authored-by: OpenAI Codex <codex@openai.com> * Remove model tier metadata Co-authored-by: OpenAI Codex <codex@openai.com> * Remove model picker provider subtitles Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>ded9881
-
Fix endpoint for free calls (#279)
Unverified signature* Recover endpoint for subsidized callsf247952 -
Enable FAL endpoint to lift limits (#278)
Unverified signature* Bill premium models through the HF router on the user's HF account Route Claude Opus 4.6 and GPT-5.5 off Bedrock/native APIs onto the HF Inference Router (huggingface/anthropic/claude-opus-4.6:fal-ai and huggingface/openai/gpt-5.5:fal-ai). The same daily allowance as before (free=1, pro=20) stays company-subsidized via INFERENCE_TOKEN; once a user is past it, the session's premium_user_billed flag flips and the call bills the user's own HF OAuth token (no X-HF-Bill-To) instead of returning the old 429 cap. - llm_params: bill_to_user routes premium (anthropic/ + openai/) router calls to the user's token; free models stay subsidized. - premium_user_billed is persisted/restored and threaded through the main loop, context compaction, the research sub-agent (now downgraded to router Sonnet 4.6), and effort probes. - Frontend: per-session BillingBanner (dismissible daily); remove the now unreachable ClaudeCapDialog + 429 quota-exhausted plumbing; the model chip shows "Billed" p…c9a83ae -
Reclaim idle sessions to fix session-capacity overshoot (#277)
Unverified signature* Reclaim idle sessions and fix session-capacity overshoot Users hit "Server is at capacity (379/200)" and couldn't create sessions: idle/forgotten runtimes never left the global pool, the frontend reactivated every historical session on load, and concurrent creates could overshoot the cap. Backend: - Idle-session reaper (2h): releases the sandbox + RAM of inactive sessions and evicts them from the live pool, leaving them resumable from Mongo (persisted resumable, never "ended"). Teardown uses asyncio.wait so a shutdown cancel can't be swallowed; submit() enqueues under the lock and refuses sessions being reaped. Reaping is skipped when persistence is disabled and aborts if the resumable snapshot (incl. the message bulk_write, via save_snapshot strict mode) can't be durably written. - Global create-slot reservation closes the check-then-create race that let concurrent creates exceed MAX_SESSIONS. - last_active_at drives the reaper, stamped on genuine activity only. - Re…6cf406a
-
Add dataset uploads to Hub (#255)
Unverified signature* Add dataset uploads to Hub Co-authored-by: OpenAI Codex <codex@openai.com> * Address dataset upload review items Co-authored-by: OpenAI Codex <codex@openai.com> * Show dataset upload progress Co-authored-by: OpenAI Codex <codex@openai.com> * Move dataset upload button to composer corner Co-authored-by: OpenAI Codex <codex@openai.com> * Fix dataset upload file handoff Co-authored-by: OpenAI Codex <codex@openai.com> * Show upload alerts below composer Co-authored-by: OpenAI Codex <codex@openai.com> * Improve dataset upload errors and chips Co-authored-by: OpenAI Codex <codex@openai.com> * Link dataset chips to repo Co-authored-by: OpenAI Codex <codex@openai.com> * Expose dataset uploads as configs Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>2b4c539
-
Fix Pro entitlement checks (#239)
Unverified signature* Fix Pro entitlement checks Normalize HF Pro and paid org plan detection, allow premium model selection with quota enforcement, and clarify HF Jobs credit billing copy. Co-authored-by: OpenAI Codex <codex@openai.com> * Limit premium quota to personal Pro Ignore org membership for premium-model quota so users need personal HF Pro for the higher cap, while dev mode uses the Pro tier for local testing. Co-authored-by: OpenAI Codex <codex@openai.com> * Scope model switch errors to model picker Show model switch failures through local ChatInput state instead of rendering the shared agent error field globally. Co-authored-by: OpenAI Codex <codex@openai.com> * Restrict premium quota detection to Pro accounts Co-authored-by: OpenAI Codex <codex@openai.com> * Use boolean Pro signal for premium quota Co-authored-by: OpenAI Codex <codex@openai.com> * Use documented isPro field for quota tier Co-authored-by: OpenAI Codex <codex@openai.com> * Remove dead global chat error state Co-…d7637ba
-
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
-
Expose OpenAI models in the UI & make Claude model picker configurable (#183)
Unverified signature* Add agent dev server notes * Make frontend model configurable * Support env-selected frontend models * Use Claude-specific model env var * Add GPT-5.5 to web model picker * Gate GPT-5.5 as a premium model * Avoid duplicate session model fetch * Remove legacy Claude quota aliases * Document GitHub CLI PR body workflow * Gate only deployed paid model IDs * Nits5db99fa
-
Bill HF Jobs by namespace credits, drop Pro and org-join gating (#172)
Aksel Joonas ReediUnverified signature* Bill HF Jobs by namespace credits, drop Pro and org-join gating - Drop the Pro/Team subscription pre-check on hf_jobs. Any namespace the caller belongs to is eligible; HF returns a billing error at job creation time if the wallet is empty, which the agent surfaces as a "top up to launch" dialog pointing at /settings/billing. - Remove the "Join ML Agent Explorers" onboarding step. The org-join hook, /auth/org-membership endpoint, and the OAuth orgIds suggestion are gone. - Rework JobsUpgradeDialog: namespace picker shows all eligible accounts/orgs with avatars + select rings; billing mode opens the HF billing page; "Skip this tool call" stays available for both. - Backend pre-flight only forces the picker when the caller has multiple eligible namespaces; single-namespace users default to their personal account silently. - jobs_tool now catches HfHubHTTPError, detects billing failures by pattern + 402 status, emits a tool_state_change(state=billing_required) so t…bed4e38 -
Persist Space sessions in MongoDB (#170)
Aksel Joonas ReediUnverified signature* Persist Space sessions across backend restarts The hosted Space lost active conversations because sessions, approval state, event streams, and Claude quotas only lived in process memory. This adds a shared optional Mongo store for frontend sessions while keeping local and CLI runs on the no-op/local path when Mongo is absent. Constraint: Space deployment needs durable state without making PyPI/local CLI users configure Mongo. Constraint: Frontend deletes must hide sessions with a visibility tag, not erase traces needed for recovery or SFT export. Rejected: Restore every active session at startup | large user counts would create a thundering herd after deploys. Rejected: Store one giant session document | Mongo document limits make per-message snapshot docs safer. Confidence: medium Scope-risk: broad Directive: Keep session_messages as compactable runtime snapshots and session_trace_messages/session_events as append-only raw traces; do not collapse them into one collection wit…d9d9785
-
Remember the chosen jobs namespace and clean up the picker dialog (#162)
Aksel Joonas ReediUnverified signatureWhen a user has paid orgs but no Pro subscription, hf_jobs needs an explicit namespace. The picker fired on every tool call — even after the user already chose one. Persist the selection in localStorage and auto-attach it to subsequent hf_jobs approvals; if the saved namespace becomes invalid (e.g. left the org), backend 400 surfaces a typed error that clears the preference and reopens the picker. UI is rewritten to match ClaudeCapDialog: tighter copy, single dropdown without the redundant "Eligible namespaces" panel, "Continue" + "Skip this tool call" actions.25d8236
-
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
-
feat(quota): daily Opus cap + HF-org gate + cap dialog (#72)
Aksel Joonas ReediUnverified signature540437a
-
Restore expired sessions via summary-based catch-up (#52)
Aksel Joonas ReediUnverified signatureWhen the backend loses a session (typically: HF Space restarted), the chat now shows a small inline banner instead of silently erroring: Where were we? Let me skim the conversation so far and pick up right where we left off — or we can start something new. [ Catch me up ] [ Start fresh ] Flow, in one pass: * Frontend stashes the raw backend messages in localStorage on every mount-hydrate and turn_complete. When the backend 404s for the session id, the SSE transport and the mount effect both fire onSessionDead → the session is flagged `expired` in sessionStore; the sidebar marks it "needs a catch-up". * Catch me up → POST /api/session/restore-summary with the cached messages. Backend creates a fresh session, runs the existing summarizer (factored into summarize_messages() and shared with in-session compaction) with a restore-specific prompt that preserves the tool-call trail, and seeds the new session with that summary wrapped in a [SYS…962191f -
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
-
Fix stuck 'Waiting for approval' spinner and improve table rendering
Clear waiting-approval activity status immediately when user approves, instead of waiting for the backend's tool_state_change event over SSE. Improve markdown table styles: horizontal overflow scroll, header background, better padding, and alternating row striping.70d2074
-
Persist research subtool steps across page refresh
Save research steps and stats to localStorage on every update, restore atomically with isProcessing on mount so the rolling display survives page refresh during active research.ccfb504 -
Fix stale approval dialog reappearing after page refresh
The message persist effect only triggered on message count changes, so approval state updates (which modify tool state within existing messages) were never saved to localStorage. On refresh, stale approval-requested state was restored. Now saves messages immediately after approval submission.9b1773a -
Fix message disappearing and duplicate rendering bugs (#10)
- Fix message disappearing and duplicate rendering bugs (d95f6ccfe4ac3073e3064070e9b5e7097d435d35)0b311bb -
Replace multi-screen onboarding with single checklist view
Replaces the 4 separate onboarding screens with a unified checklist showing all steps (sign in, join org, start session) with live status. Adds org membership polling via new GET /auth/org-membership endpoint that reuses existing check_org_membership(). Join link opens as popup and auto-closes when membership is detected.6d7f53f -
Add message edit and regenerate from any point in conversation
Backend: add truncate_to_user_message() on ContextManager, POST /api/truncate/{session_id} endpoint, and session_manager.truncate() helper to slice conversation history to before a given user message. Frontend: add editAndRegenerate callback in useAgentChat that truncates backend + frontend messages then resubmits via existing chat flow. UserMessage gains an inline edit mode with pencil icon on hover, TextField for editing, Enter/Escape to confirm/cancel.0611031 -
Redesign research subagent display with live stats and rolling steps
- Add researchStats (toolCount, tokenCount, elapsed) to session state - Parse tokens:/tools: log events into stats instead of step list - Show live stats in chip (running · N tools · Xk tokens · Ys) - Rolling 2-line window of sub-tool calls, hidden on completion - Format step labels with specifics (dataset name, paper query, etc.) - Handle truncated JSON args from backend via regex fallback - Fix stale tool spinners on page reload (coerce to completed) - Clean activity status bar labels for research tool logs901a405
-
feat: beautiful research sub-agent UI with inline progress steps
- ToolCallGroup: renders research sub-steps inline below the tool row with contextual icons (📂 finding examples, 📄 reading file, 📚 docs) and a spinner on the active step - ActivityStatusBar: shows current research step in the shimmer bar ("Exploring docs(trl)..." instead of generic "Running research...") - Store: tracks researchSteps per-session, cleared on each new research call - useAgentChat: routes research tool_log events to both the step list and activity statusfff300b
-
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
-
fix: use backend is_processing as source of truth on refresh
Replace message-based state inference with the backend's is_processing flag. Message inference is fundamentally broken — completed tool results make tools look "done" even when the agent is mid-turn. Also add resume: true to useChat so the SDK calls reconnectToStream() on mount, re-subscribing to live events if the agent is still running. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e229826 -
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 -
feat: SSE keepalive, reconnection, and is_processing flag
Prevents SSE streams from being killed by reverse proxies during long operations and lets the frontend recover gracefully after sleep/disconnect. Backend: - SSE keepalive pings every 15s via `: keepalive` comments - New GET /api/events/{session_id} subscribe-only endpoint for reconnection - is_processing flag on AgentSession, exposed in session info API Frontend: - reconnectToStream() re-attaches to a running session via /api/events - Visibility change re-hydrates ALL sessions from backend on wake - Background sessions also re-sync (removed isActive guard on listener) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d7f2a7c -
fix: disable chat input during processing after page refresh
After hydrating messages from the backend, scan the last assistant message for in-progress tools (input-available state) or pending approvals and set the correct isProcessing/activityStatus. Previously the store defaults (idle) would briefly enable the chat input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0e75fdd -
fix: per-session state management for smooth task switching
Background sessions now maintain their own state snapshots in agentStore so streaming, tool calls, and panel updates are not lost when switching tasks or backgrounding the browser tab. - Add sessionStates map + updateSession/switchActiveSession/syncSnapshot - Side-channel callbacks always update per-session state (no isActiveRef guard) - Global setters (setPanel, setPanelView, etc.) sync to active snapshot - Re-sync state on browser tab visibility change - Fix direct state mutation in switchActiveSession Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f56fa2e
-
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: wire sandbox bash streaming to frontend panel
- Accept 'bash' in onToolLog filter (was only 'hf_jobs'|'sandbox') - Initialize panel on tool_call for bash with command in script tab - Handle null panelData in setPanelOutput (create panel instead of dropping) - Auto-open right panel and switch to output view for streaming logs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6c9f1f6
-
stream sandbox creation logs to tool output, fix hf_jobs final status race
9d1a532 -
replace websocket transport with SSE
564aab6
-
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: approval UI not updating after approve click
7b34ae7 -
feat: per-session WebSocket architecture for parallel chat sessions
Each session now owns its own useAgentChat + WebSocket transport instead of sharing a single instance. Background sessions process all events (including approval_required) continuously, fixing the bug where approvals from non-active sessions were silently dropped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>27da720
-
feat: cooperative cancellation, session persistence, background generation
7d17616 -
feat: implement cooperative agent cancellation with cancel button
ecbfd3c
-
feat: merge HF Space improvements
79b2fcc
-
frontend update
463e470 -
Improve job approval UX with tabs, job URL, and message ordering
- Add tabbed panel for switching between Script and Logs views - Show specific job URL from tool output (not generic jobs page link) - Fix message ordering so final assistant response appears below approval box - Persist logs in approval messages so users can access previous job logs - Add View Script/View Logs buttons on completed approval cards - Show job status and failure indicators in approval flow - Panel tabs only clear on new job, not during approval continuation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>ac3d272
-
making docker run build work
73b1ed7
-
improved tool calling, push to hub, etc.
Henri Bonamy72af187