Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a31fec4fc5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
taking a look now |
Signed-off-by: Adrian Cole <[email protected]>
codefromthecrypt
left a comment
There was a problem hiding this comment.
I filled some tiny gaps on this, based on what other agents do: pass cwd, outputByteLimit, and timeout to ACP terminal.
Then, I updated the PR desc with manual instructions that I ran and it works.
Testing the terminal with integration tests will be more thinking than can be done in this PR.
Thanks a lot!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6b5836e56
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let exit_code = output_res | ||
| .exit_status | ||
| .and_then(|s| s.exit_code) | ||
| .unwrap_or_default(); |
There was a problem hiding this comment.
Treat unknown terminal exit status as failure
This path maps a missing ACP terminal exit_code to 0, so commands that do not report an explicit code (for example, timeout/kill paths or signal-terminated commands) are marked successful. In those cases the tool call returns CallToolResult::success(...), which can make the agent continue after a failed shell execution instead of handling it as an error.
Useful? React with 👍 / 👎.
| let ctx = crate::agents::ToolCallContext::new( | ||
| session_id, | ||
| None, | ||
| Some("tool-request-id".to_string()), |
There was a problem hiding this comment.
Remove hard-coded tool call id from callback context
The callback context always sets tool_call_request_id to the literal "tool-request-id"; when this callback invokes ACP-aware tools, they emit ToolCallUpdate events keyed to that id. This callback dispatch path does not create a matching tool-call record, so updates are associated with an unknown id and cannot be reliably attached/rendered by ACP clients.
Useful? React with 👍 / 👎.
* origin/main: fix: tool confirmation handling for multiple requests (#7856) Remove dead OllamaSetup onboarding flow (#7861) fix: resolve tokio::sync::Mutex deadlock in recipe retry path (#7832) Upgrade Electron 40.6.0 → 41.0.0 (#7851) Only show up to 50 lines of source code (#7578) fix: stop writing without error when hitting broken pipe for goose session list (#7858) feat(acp): add session/set_mode handler (#7801) Keep messages in sync (#7850) More acp tools (#7843)
* main: (191 commits) fix: add tool_choice and parallel_tool_calls to chatgpt_codex provider (#7867) fix: tool confirmation handling for multiple requests (#7856) Remove dead OllamaSetup onboarding flow (#7861) fix: resolve tokio::sync::Mutex deadlock in recipe retry path (#7832) Upgrade Electron 40.6.0 → 41.0.0 (#7851) Only show up to 50 lines of source code (#7578) fix: stop writing without error when hitting broken pipe for goose session list (#7858) feat(acp): add session/set_mode handler (#7801) Keep messages in sync (#7850) More acp tools (#7843) fix: skip upgrade-insecure-requests CSP for external HTTP backends (#7714) fix(shell): prevent hang when command backgrounds a child process (#7689) Remove include from Cargo.toml in goose-mcp (#7838) Exit agent loop when tool call JSON fails to parse (#7840) chore: remove redundant husky prepare script (#7829) Add github actions workflow for unused deps (#7681) fix: prevent SSE connection drops from silently truncating responses (#7831) doc: Added notes in contribution guide for pnpm (#7833) add prefer-offline to pnpm config to skip unnecessary registry lookups (#7828) fix: remove dead read handler from DeveloperClient (#7821) ...
|
#7923 polish and acp tests for shell |
* main: (65 commits) feat(otel): propagate session.id to spans and log records (#7490) fix(test): add env_lock to is_openai_reasoning_model tests (#7917) fix(acp): pass session_id when loading extensions so skills are discovered (#7868) updated canonical models (#7920) feat(autovisualiser): Migrate the autovisualiser extension to MCP Apps (#7852) fix: add tool_choice and parallel_tool_calls to chatgpt_codex provider (#7867) fix: tool confirmation handling for multiple requests (#7856) Remove dead OllamaSetup onboarding flow (#7861) fix: resolve tokio::sync::Mutex deadlock in recipe retry path (#7832) Upgrade Electron 40.6.0 → 41.0.0 (#7851) Only show up to 50 lines of source code (#7578) fix: stop writing without error when hitting broken pipe for goose session list (#7858) feat(acp): add session/set_mode handler (#7801) Keep messages in sync (#7850) More acp tools (#7843) fix: skip upgrade-insecure-requests CSP for external HTTP backends (#7714) fix(shell): prevent hang when command backgrounds a child process (#7689) Remove include from Cargo.toml in goose-mcp (#7838) Exit agent loop when tool call JSON fails to parse (#7840) chore: remove redundant husky prepare script (#7829) ...
…oken-retry * origin/main: (21 commits) Remove java/.ai-usage-marker directory (#7925) test(acp): add terminal delegation fixtures and fix shell singleton (#7923) fix: bump pctx_code_mode to 0.3.0 for iterator type checking fix (#7892) feat: persist GooseMode per-session via session DB (#7854) feat(otel): propagate session.id to spans and log records (#7490) fix(test): add env_lock to is_openai_reasoning_model tests (#7917) fix(acp): pass session_id when loading extensions so skills are discovered (#7868) updated canonical models (#7920) feat(autovisualiser): Migrate the autovisualiser extension to MCP Apps (#7852) fix: add tool_choice and parallel_tool_calls to chatgpt_codex provider (#7867) fix: tool confirmation handling for multiple requests (#7856) Remove dead OllamaSetup onboarding flow (#7861) fix: resolve tokio::sync::Mutex deadlock in recipe retry path (#7832) Upgrade Electron 40.6.0 → 41.0.0 (#7851) Only show up to 50 lines of source code (#7578) fix: stop writing without error when hitting broken pipe for goose session list (#7858) feat(acp): add session/set_mode handler (#7801) Keep messages in sync (#7850) More acp tools (#7843) fix: skip upgrade-insecure-requests CSP for external HTTP backends (#7714) ...
Summary
Continuation of #7668 with changes from (un-merged) #7388 and feedback from @rabi.
This PR:
Type of Change
AI Assistance
Testing
No ACP:
No ACP client, so
DeveloperClienthandles shell directly via subprocess.Zed
Clear logs and session/thread state:
Build the release binary:
Add to
~/.config/zed/settings.json:Terminal delegation:
Prompt in Zed:
Verify the terminal appears embedded in the tool call UI (not just text output).
Verify the ACP interactions in Goose. Zed has no telemetry or logs about ACP:
Non-zero exit:
Prompt in Zed:
Verify the tool call shows as failed (exit code 1).
Related Issues
Continuation of #7668
Uses design from #7388
Screenshots