Code agent: tool ergonomics, parallel execution, plan/discuss modes, explorer subagent#318
Merged
Conversation
- Inject an environment block (cwd, platform, date, git snapshot) into the system prompt at engine build, saving discovery tool calls every session - Replace the toolkit's read_file with a line-numbered, windowing reader that degrades gracefully on big files instead of raising - run_shell: 120s default / 600s max timeout (was 30s), a description param surfaced in approval prompts, and truncation that keeps the tail of long output where test/build verdicts live - Background tasks: run_shell(run_in_background) + shell_task_output / shell_task_kill for dev servers and long builds - TurnEngine: low-risk tool calls in one assistant turn now execute concurrently; writes/shell stay strictly ordered
- Memory: memory_update/memory_forget tools, [#id]s in the injected known-memories block, and when-to-remember guidance in the prompt - Plan mode: propose_plan tool (plan-mode sessions only) with an out-of-band approval round-trip; approval flips the live permission mode so the same session executes the plan, rejection returns the user's feedback; a per-turn reminder rides on the latest user message - Explorer: explore tool on the Code agent spawns a read-only child TurnEngine (plan-mode permissions, no shell, no recursion) and returns only its final report, keeping the parent context small - Engine: TOOL_PROPOSED is now emitted for intercepted interactive tools (request_directory) again, plus the new propose_plan path
- Server WS: plan_approver round-trip (plan_proposed event out, plan_response in), checkpointed like other parked-on-user events - GUI: PlanCard renders the proposed plan as markdown with approve (ask-per-step or full access) and reject-with-feedback actions; resolved plans persist in the transcript Verified end-to-end in the browser GUI against a scratch repo: read-only exploration, plan proposal, feedback revision, and approve-and-run with the live mode flip.
Read-only was conflated with plan mode: picking it pushed the agent toward proposing a plan even when the user just wanted to talk safely. - Mode.DISCUSS: same read-only enforcement as plan mode, but no planning contract — the agent explores and describes changes in chat instead of proposing them - propose_plan is now always registered (the GUI flips a live session's mode via set_mode) and rejected outside plan mode, with a discuss-appropriate message - GUI mode menu: Discuss / Plan / Ask for approval / Full access / Custom, ordered by how much the agent may do
Collaborator
Author
drp8226
approved these changes
Jun 13, 2026
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.

Upgrades the Code agent's harness across four commits:
read_file;run_shellwith sane timeouts, adescriptionfor approval prompts, tail-keeping truncation, and background tasks; low-risk tool calls in one turn now execute concurrentlymemory_update/memory_forget) with when-to-remember guidance; plan mode with apropose_planapproval round-trip that flips the live session to execution; a read-onlyexploresubagent that keeps broad research out of the main contextTests: 297 passing (60+ new). Plan/discuss flows also verified end-to-end in the browser GUI against a live model.