Skip to content

fix: parent icon not reflecting child approval#163

Closed
rschmukler wants to merge 1 commit intoeditor-code-assistant:masterfrom
rschmukler:rs/fix-parent-tool-icons
Closed

fix: parent icon not reflecting child approval#163
rschmukler wants to merge 1 commit intoeditor-code-assistant:masterfrom
rschmukler:rs/fix-parent-tool-icons

Conversation

@rschmukler
Copy link
Contributor

Issue

When a child tool call event fired (e.g. toolCalled, toolCallRunning, toolCallRejected), eca-chat--update-parent-subagent-status was called with the loading symbol (⏳), unconditionally overwriting the parent's status. If a sibling child was still pending approval, the parent would incorrectly show ⏳ instead of 🚧.

Fix

Before applying the loading symbol to a parent, check all child segment overlays. If any child still has eca-chat--tool-call-status set to the pending-approval symbol, preserve 🚧 on the parent instead of downgrading to ⏳. This mirrors the existing guard in
eca-chat--tool-call-subagent-details but applies it consistently in the parent status update path.

When a child tool call event fired (e.g. `toolCalled`, `toolCallRunning`,
`toolCallRejected`), `eca-chat--update-parent-subagent-status` was called
with the loading symbol (⏳), unconditionally overwriting the parent's
status. If a sibling child was still pending approval, the parent would
incorrectly show ⏳ instead of 🚧.

Before applying the loading symbol to a parent, check all child segment
overlays. If any child still has `eca-chat--tool-call-status` set to the
pending-approval symbol, preserve 🚧 on the parent instead of downgrading
to ⏳. This mirrors the existing guard in
`eca-chat--tool-call-subagent-details` but applies it consistently in
the parent status update path.
ericdallo added a commit that referenced this pull request Feb 25, 2026
@ericdallo
Copy link
Member

ericdallo commented Feb 25, 2026

@rschmukler I did a simpler fix, related to your last PR.

Let's please avoid letting LLM change everything and just trust in it. This affects code maintainability, review carefully what it's being changed so we evolve eca safely :)

You would see this error in the new eca-emacs-errors buffer: [2026-02-25 09:21:19] handle-message: Symbol’s value as variable is void: eca-chat--tool-call-run-received, which makes me wonder if we should add to there but also mention in emacs messages like before, as this can pass unnoticed

@ericdallo ericdallo closed this Feb 25, 2026
@rschmukler
Copy link
Contributor Author

@ericdallo I agree we should probably message in addition to log it.

The bug that you fixed was actually related to the commit we deleted, where unfortunately, neither one of us tested it after I deleted that commit. I don' think it had to do with LLM generated code.

I don't believe that this bug is related to that bug so it might be worth looking at this to see whether there is a more to it.

@rschmukler
Copy link
Contributor Author

@ericdallo I have hit this again. See the screenshot below:

image image

There is private info in the content of the UI so I had to crop - but as you can see, the tester shows the hour glass while the inner agent is awaiting a tool prompt.

There are no errors in the emacs-errors buffer nor is there anything in the messages.

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