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
-
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
-
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 -
Embed trackio dashboard in chat for jobs and sandboxes (#161)
Aksel Joonas ReediUnverified signature* Embed trackio dashboard in chat for jobs and sandboxes Wires `trackio_space_id` / `trackio_project` through hf_jobs and sandbox_create as optional tool args, then renders the resulting dashboard inline as an embedded iframe in the chat. The plumbing turned out to need four pieces, not two: 1. Inject TRACKIO_SPACE_ID / TRACKIO_PROJECT into job + sandbox env. 2. Surface the values in tool_state_change so the frontend can render the embed when the tool call is in flight. 3. Pre-seed the Space with our own README/requirements/app.py — without this, trackio's init() against an existing empty Space leaves the iframe stuck on the default Gradio template. We omit `hf_oauth: true` from the seeded README so the embed renders without a sign-in click; per-user privacy comes from HF namespace ownership. 4. Mount the metrics bucket on the dashboard Space at /data and set TRACKIO_DIR / TRACKIO_BUCKET_ID. trackio.init() in the job creates the bucket but o…6131fc8
-
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
-
4 steps shown
fdc5e27
-
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 message disappearing and duplicate rendering bugs (#10)
- Fix message disappearing and duplicate rendering bugs (d95f6ccfe4ac3073e3064070e9b5e7097d435d35)0b311bb -
Fix tool errors not persisting (#3)
- Bug fix + fixed a couple rendering issues (dbd4801af40df211f75b20a0ab94d3415640d08d) Co-authored-by: Elisa Klunder <elisaklunder@users.noreply.huggingface.co>4b24bd9
-
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: 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: properly close SDK message on error, show tool errorText
b22c5f3 -
replace websocket transport with SSE
564aab6
-
fix: buffer websocket events during disconnects and replay on reconnect
ca13fee
-
fix: merge consecutive assistant messages on page refresh
The live streaming transport groups all text and tool parts into one assistant UIMessage per turn (single start/finish pair). The message converter was creating separate UIMessages for each backend assistant message, splitting turns into multiple bubbles after refresh.02e4cdf
-
fix: show activity status for approval-flow tools and revert chip override
- Call onToolRunning on tool_state_change with state 'running' so the activity bar updates for approval-flow tools (hf_jobs, sandbox_create) - Revert description override in ToolCallGroup status chipd211359 -
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: reconnect WS on session switch instead of deleting dead sessions
838cd50 -
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: merge HF Space improvements
79b2fcc