fix(workplaces): delegate file I/O on LocalWorkplaceBackend#36
Open
DeryFerd wants to merge 1 commit into
Open
Conversation
Delegate abstract file methods to the inner backend so bash and runpy work in local workplaces. Fixes anvie#34 Co-authored-by: Cursor <cursoragent@cursor.com>
jankric
pushed a commit
to jankric/evonic
that referenced
this pull request
May 16, 2026
jeffrysurya
pushed a commit
to jeffrysurya/evonic
that referenced
this pull request
May 20, 2026
…ge, enhanced backend logging, visual distinction in Chat UI
backend/agent_runtime/concurrency.py:
- Added capacity_details property to ConcurrencyGate ({active, max})
- Added get_agent_capacity_details() to ConcurrencyManager
backend/agent_runtime/runtime.py:
- Replaced vague busy-ack message with explicit concurrency limit info
(e.g. 'Agent is at maximum concurrent capacity (2/1 slots in use)...')
- Added concurrency_limited: True metadata alongside busy_ack: True
- Enhanced logger output with [CONCURRENCY_LIMITED] tag, agent name,
active/max slot counts, timestamp
- Emitted concurrency_limited event (instead of generic turn_complete)
with concurrency_active/concurrency_max fields
templates/agent_detail.html:
- renderEntries now detects busy_ack/concurrency_limited on 'final'
entries and renders them as system notifications ([SYSTEM/Concurrency])
with distinct orange warning styling instead of regular assistant bubbles
- pollForResponse now does the same for the SSE fallback path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
#34 reports that any
bashorrunpycall from an agent bound to a local workplace dies immediately with:File tools (
read_file,write_file, etc.) can still work because they often go through other backends. Shell and Python execution go throughWorkplaceManager→LocalWorkplaceBackend, so the failure is total for those tools.The class in
backend/workplaces/backends/local_workplace.pyhas looked the same since v0.2.6. What changed is thatExecutionBackendinbackend/tools/lib/exec_backend.pynow declares five file I/O methods as@abstractmethodso tools likewrite_fileandpatchtarget the same environment asbash/runpy(Docker, SSH, workplace, etc.).LocalWorkplaceBackendnever caught up, so Python refuses to construct it.What this change does
Add five one-line delegators on
LocalWorkplaceBackend, each forwarding to_get_inner():file_existsfile_statread_filewrite_file(includingcreate_dirs)make_dirs_get_inner()already returns eitherLocalBackendorDockerBackend(sandbox path). Both inner classes implement the full interface, so there is no new logic, only wiring.No change to workplace config, session routing, or sandbox defaults.
Files touched
backend/workplaces/backends/local_workplace.pyunit_tests/test_local_workplace_backend.pyTests
unit_tests/test_local_workplace_backend.py:LocalWorkplaceBackendand checks it is a concreteExecutionBackend(would have failed before on 3.12+ abstract base enforcement).How a reviewer can sanity-check
bashand/orrunpy.pwd,print(1)).Before: TypeError on first tool call. After: command runs in the workplace workspace.
I did not run a full fresh install in this PR; validation is unit tests plus the code path review above. Happy to run a manual pass if you want that noted in the PR thread.
Risk / compatibility
Low. The methods are pure delegation; behavior matches whatever
LocalBackendorDockerBackendalready does for non-workplace sessions.Sandbox workplaces (
sandbox_enabled=True) lazy-initDockerBackendon first use; file calls after that follow the same inner instance asrun_bash.Closes #34.