Skip to content

chore: remove stale docs, gitignore, and Makefile entries#329

Merged
joycel-github merged 1 commit into
mainfrom
cleanup-docs-config
Jul 17, 2026
Merged

chore: remove stale docs, gitignore, and Makefile entries#329
joycel-github merged 1 commit into
mainfrom
cleanup-docs-config

Conversation

@joycel-github

Copy link
Copy Markdown
Collaborator

Summary

Housekeeping for references to code/targets that no longer exist.

  • CONTRIBUTING.md: drop the make run-remote section — no such Makefile target.
  • .gitignore: remove orphaned entries with no matching files (local_agent, remote_agent, sandbox-router, examples/sandbox_agent/cloudbuild.yaml, tasklog/*, /axepp, google-cloud-sdk/, google-cloud-cli-darwin-arm.tar.gz, test-sandbox-config.yaml).
  • Makefile: add missing deps and clean-logs to .PHONY.

No functional/build changes; go build ./... passes.

- CONTRIBUTING.md: drop 'make run-remote' (no such Makefile target)
- .gitignore: remove orphaned entries (local/remote_agent, sandbox-router,
  tasklog, axepp, google-cloud-sdk, test-sandbox-config.yaml)
- Makefile: add missing deps, clean-logs to .PHONY
@joycel-github
joycel-github marked this pull request as ready for review July 17, 2026 03:17
@joycel-github
joycel-github merged commit e2fdc26 into main Jul 17, 2026
9 checks passed
@joycel-github
joycel-github deleted the cleanup-docs-config branch July 17, 2026 03:56
feifeigood added a commit to feifeigood/ax that referenced this pull request Jul 20, 2026
feifeigood added a commit to feifeigood/ax that referenced this pull request Jul 20, 2026
…oogle#329

Upstream google#329 ('remove stale docs, gitignore, Makefile') accidentally checked in
a 30MB linux/amd64 e2e ELF binary. Keep it out of the AgentFleet fork.
Removal-neutral: re-added automatically on the next upstream merge if reverted.
feifeigood added a commit to feifeigood/ax that referenced this pull request Jul 20, 2026
rakyll pushed a commit that referenced this pull request Jul 21, 2026
## Summary

Introduces `agentExecutor`, a lightweight executor for nested sub-agent
calls. Fixes the infinite loop when a sub-agent emits a confirmation,
and eliminates a wasted Gemini API call on every sub-agent delegation.

## Changes

### `internal/controller/executor/agent_executor.go` (new)

`agentExecutor` implements `agent.Executor` for sub-agent invocations:
- Does NOT load history from event log (caller passes messages)
- Does NOT short-circuit on `WaitsForConfirmation` or `COMPLETED` cache
- Writes execution-level logs for observability
- Returns `STATE_PENDING` when sub-agent emits a confirmation

### `internal/controller/executor/executor.go`

Child executor in `defaultExecutor.exec` changed from `defaultExecutor`
to `agentExecutor`. Also renames receiver `tm` → `de`/`ae` for clarity.

### `internal/gemini/gemini_planner.go`

After `e.Exec` returns in `loop`:
- Appends sub-agent outputs to `start.Messages` immediately (eliminates
  wasted Gemini call — was 3, now 2)
- Respects `STATE_PENDING` (stops the infinite loop, surfaces
  confirmation to user)
- Handles nil Gemini content gracefully (preserves `FinishReasonStop`
  check, reports other reasons as errors)

## Confirmation resume routing

On Turn 2 (user sends approval), `tryResuming` finds the planner
PENDING and resumes it normally. The planner calls Gemini, which
re-delegates to the sub-agent. The sub-agent sees the approval in
`start.Messages` and completes. **This costs 1 extra Gemini call on
the resume turn.**

Direct routing (skipping Gemini on resume) is deferred to a follow-up.
Options explored include controller-side routing, ToolCallContent
pairing, and `pending_agent_id` on execution events — see branches
`agent-executor-confirmation`, `agent-executor-toolcall`, and
`agent-executor-two-layer` for prototypes.

## Before/After

| Scenario | Before | After |
|---|---|---|
| Plain delegation | 3 Gemini calls | 2 |
| Delegation + confirmation | ∞ (hangs) | Works (1 extra Gemini call on
resume) |
| Bash tool | No change | No change |

## Testing

6 new tests in `agent_executor_test.go`. E2e tested with `ax serve` +
`ax exec` across no-confirmation, confirmation (3x stress), and bash
tool scenarios.

## Sample logs (real `ax serve` + `ax exec`, gemini-3-flash-preview)

### Scenario 1: No confirmation

Commands:
```bash
go run ./examples/remote_agent                     # Terminal 1: lowercase agent on :50051
ax serve --config ax.yaml                          # Terminal 2
ax exec --server localhost:8494 --input "Please lowercase HELLO WORLD"  # Terminal 3
```

Output: `please lowercase hello world`

<details>
<summary>Raw conversation log (2 events)</summary>

```json
{
  "conversationId": "raw-no-confirm",
  "seq": 1,
  "execId": "6abb8d1c-2d0e-4aa2-9550-6c18c51b91a4",
  "messages": [
    {
      "role": "user",
      "content": {
        "text": {
          "text": "Please lowercase HELLO WORLD"
        }
      }
    }
  ],
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-no-confirm",
  "seq": 2,
  "execId": "6abb8d1c-2d0e-4aa2-9550-6c18c51b91a4",
  "messages": [
    {
      "role": "assistant",
      "content": {
        "text": {
          "text": "please lowercase hello world"
        }
      }
    }
  ],
  "state": "STATE_PENDING"
}
```
</details>

<details>
<summary>Raw execution log — lowercase (3 events)</summary>

```json
{
  "execId": "6abb8d1c-2d0e-4aa2-9550-6c18c51b91a4-lowercase",
  "agentId": "lowercase",
  "inputs": [
    {
      "role": "user",
      "content": {
        "text": {
          "text": "Please lowercase HELLO WORLD"
        }
      }
    }
  ],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:47.532433859Z"
}
{
  "execId": "6abb8d1c-2d0e-4aa2-9550-6c18c51b91a4-lowercase",
  "agentId": "lowercase",
  "outputs": [
    {
      "role": "assistant",
      "content": {
        "text": {
          "text": "please lowercase hello world"
        }
      }
    }
  ],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:47.540714804Z"
}
{
  "execId": "6abb8d1c-2d0e-4aa2-9550-6c18c51b91a4-lowercase",
  "agentId": "lowercase",
  "state": "STATE_COMPLETED",
  "timestamp": "2026-05-10T23:20:47.541394315Z"
}
```
</details>

### Scenario 2: With confirmation

Commands (uses a confirm-enabled remote agent variant):
```bash
go run ./examples/remote_agent                     # modified to ask for confirmation
ax serve --config ax.yaml
ax exec --server localhost:8494 --input "Please lowercase HELLO WORLD"  # Turn 1
# User approves the confirmation prompt                                  # Turn 2
```

Turn 1: agent asks confirmation, planner stops with `STATE_PENDING`.
Turn 2: user approves, planner re-delegates to sub-agent (1 extra Gemini
call), sub-agent completes.

Agent log:
```
[agent] asking confirmation for: "Please lowercase HELLO WORLD"
[agent] user approved, lowercasing: "Please lowercase HELLO WORLD"
```

<details>
<summary>Raw conversation log (7 events)</summary>

```json
{
  "conversationId": "raw-with-confirm",
  "seq": 1,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "messages": [{"role": "user", "content": {"text": {"text": "Please lowercase HELLO WORLD"}}}],
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-with-confirm",
  "seq": 2,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "messages": [{"role": "assistant", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "question": "Can I lowercase \"Please lowercase HELLO WORLD\" for you?"}}}],
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-with-confirm",
  "seq": 3,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-with-confirm",
  "seq": 4,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "messages": [{"role": "user", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "approval": {"approved": true}}}}],
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-with-confirm",
  "seq": 5,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "messages": [{"role": "assistant", "content": {"text": {"text": "please lowercase hello world"}}}],
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-with-confirm",
  "seq": 6,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "messages": [{"role": "model", "content": {"text": {"text": "please lowercase hello world"}}}],
  "state": "STATE_PENDING"
}
{
  "conversationId": "raw-with-confirm",
  "seq": 7,
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "state": "STATE_COMPLETED"
}
```
</details>

<details>
<summary>Raw execution log — __planner (5 events)</summary>

```json
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "agentId": "__planner",
  "inputs": [{"role": "user", "content": {"text": {"text": "Please lowercase HELLO WORLD"}}}],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:54.629227521Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "agentId": "__planner",
  "outputs": [{"role": "assistant", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "question": "Can I lowercase \"Please lowercase HELLO WORLD\" for you?"}}}],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:55.966125441Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "agentId": "__planner",
  "inputs": [
    {"role": "user", "content": {"text": {"text": "Please lowercase HELLO WORLD"}}},
    {"role": "assistant", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "question": "Can I lowercase \"Please lowercase HELLO WORLD\" for you?"}}},
    {"role": "user", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "approval": {"approved": true}}}}
  ],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:55.994507633Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "agentId": "__planner",
  "outputs": [
    {"role": "assistant", "content": {"text": {"text": "please lowercase hello world"}}},
    {"role": "model", "content": {"text": {"text": "please lowercase hello world"}}}
  ],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:57.672836311Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d",
  "agentId": "__planner",
  "state": "STATE_COMPLETED",
  "timestamp": "2026-05-10T23:20:57.673539482Z"
}
```
</details>

<details>
<summary>Raw execution log — lowercase (5 events)</summary>

```json
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d-lowercase",
  "agentId": "lowercase",
  "inputs": [{"role": "user", "content": {"text": {"text": "Please lowercase HELLO WORLD"}}}],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:55.956365514Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d-lowercase",
  "agentId": "lowercase",
  "outputs": [{"role": "assistant", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "question": "Can I lowercase \"Please lowercase HELLO WORLD\" for you?"}}}],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:55.965184294Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d-lowercase",
  "agentId": "lowercase",
  "inputs": [
    {"role": "user", "content": {"text": {"text": "Please lowercase HELLO WORLD"}}},
    {"role": "assistant", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "question": "Can I lowercase \"Please lowercase HELLO WORLD\" for you?"}}},
    {"role": "user", "content": {"text": {"text": "Please lowercase HELLO WORLD"}}},
    {"role": "assistant", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "question": "Can I lowercase \"Please lowercase HELLO WORLD\" for you?"}}},
    {"role": "user", "content": {"confirmation": {"id": "dc65756b-d450-49e7-bf08-93b4b492363e", "approval": {"approved": true}}}}
  ],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:56.876585877Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d-lowercase",
  "agentId": "lowercase",
  "outputs": [{"role": "assistant", "content": {"text": {"text": "please lowercase hello world"}}}],
  "state": "STATE_PENDING",
  "timestamp": "2026-05-10T23:20:56.886341400Z"
}
{
  "execId": "d2271679-8812-4d13-967c-2401b94a761d-lowercase",
  "agentId": "lowercase",
  "state": "STATE_COMPLETED",
  "timestamp": "2026-05-10T23:20:56.887095309Z"
}
```
</details>
rakyll pushed a commit that referenced this pull request Jul 21, 2026
google-antigravity 0.1.7's _connect_websocket retries both "localhost"
and "127.0.0.1" when dialing localharness (local_connection.py:993), so
the sidecar no longer needs to patch /etc/hosts for substrate/gVisor
environments where localhost may not resolve.

Ref #325

antigravity: guard conversation_id for safe save_dir use (#312)

harness_server uses the caller-supplied conversation_id directly as a
per-conversation storage directory name (save_dir = state_dir /
conversation_id) before the Antigravity harness ever sees it, so a value
like "../escape" could traverse outside state_dir. Reject an empty id or
one containing a path separator or a "." / ".." component at the boundary
in _run_turn, returning an INVALID_ARGUMENT end frame.

This is intentionally only a path-safety guard, not the id-format
contract. The Antigravity harness owns that: it validates the forwarded
cascade_id (length and character set) per cl/948016352. Keeping the
format rule in one place avoids the two layers drifting.

chore: remove stale docs, gitignore, and Makefile entries (#329)

- CONTRIBUTING.md: drop 'make run-remote' (no such Makefile target)
- .gitignore: remove orphaned entries (local/remote_agent, sandbox-router,
  tasklog, axepp, google-cloud-sdk, test-sandbox-config.yaml)
- Makefile: add missing deps, clean-logs to .PHONY

antigravity: remove vertex env-var override (superseded by AGY 0.1.7) (#331)

* antigravity: remove vertex env-var override (superseded by AGY 0.1.7)

google-antigravity 0.1.7 reads GOOGLE_GENAI_USE_VERTEXAI /
GOOGLE_GENAI_USE_ENTERPRISE + GOOGLE_CLOUD_{PROJECT,LOCATION} natively,
so the sidecar no longer needs _vertex_kwargs_from_env to thread them
into LocalAgentConfig.

- Delete _vertex_kwargs_from_env + VertexKwargs.
- _build_default_config: bare LocalAgentConfig(system_instructions=...).
- _has_credentials: read project/location from env (SDK hydrates them
  onto VertexEndpoint, not LocalAgentConfig).
- Update tests accordingly.

Requires the 0.1.7 bump. Credential resolution is startup-only and
does not touch the save_dir/state_dir resume path.

Ref #325

* antigravity: drop stale _has_credentials docstring note about vertex env override

Interactions: persist interactions harness with durable dir and resume from it (#327)

interactions: make WorkDir authoritative for run_command (#335)

The interactions harness executed run_command relative to the process's
ambient working directory, which is not reliably the agent's workspace: with
no Cwd argument the command ran wherever the process cwd happened to be, and a
model-supplied Cwd (including "/") was honored blindly. As a result tool calls
often ran from "/" instead of the configured workspace (#332).

Make the workspace directory authoritative in the executor rather than relying
on ambient process state:

- Add AntigravityInteractionsConfig.WorkDir (defaults from AX_HARNESS_WORKDIR).
- run_command now resolves its directory via resolveRunDir: no Cwd -> WorkDir;
  relative Cwd -> joined under WorkDir; absolute Cwd -> honored as-is. Empty
  WorkDir preserves the previous process-cwd behavior.
- Add WorkspaceSystemInstruction to orient the agent about its working
  directory so it emits workspace-relative paths, and wire it in cmd/ax.

Fixes #332

Remove the binary (#334)

* Remove the binary

* chore: add e2e directory to .gitignore

* refactor: migrate binary file check to a dedicated workflow file

* fix: restrict binary file check to added, copied, or modified files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants