Iterate on agent behavior against SpireLens MCP commands #81

Closed
opened 2026-04-25 01:30:30 -07:00 by nelsong6 · 10 comments
nelsong6 commented 2026-04-25 01:30:30 -07:00 (Migrated from github.com)

Where we left off

We got the issue-agent workflow running again and validated run 24926683151 successfully.

That run proved:

  • The workflow can launch Claude on the Windows STS2 runner.
  • The issue-agent now posts a linked workflow run number back to the issue.
  • Logs/artifacts are uploaded, and persistent logs are copied to C:\ProgramData\SpireLens\issue-agent-runs\<run-id>.
  • The new SpireLens MCP bridge command start_singleplayer_run works from the agent path.
  • The issue branch build/test path works: 73/73 tests passed.

Important caveat

The run did not exercise the new reload_spirelens_core command. Claude used start_singleplayer_run, but chose Ironclad for a Make It So issue and then concluded unit tests were the appropriate validation path because Make It So is a Watcher card.

Locally, we already proved these bridge routes work:

  • reload_spirelens_core
  • start_singleplayer_run
  • enter_debug_room

But we still need to see how an autonomous agent behaves with the general MCP commands in realistic issue workflows.

Next thing to do

Create a small iteration/test issue or workflow run where the agent is explicitly expected to:

  1. Inspect current game state through MCP.
  2. Choose the relevant character for the issue being validated.
  3. Start a run through start_singleplayer_run when needed.
  4. Use enter_debug_room when a combat or specific room state is needed.
  5. Use reload_spirelens_core after build/deploy before screenshotting changed behavior.
  6. Clearly report when live validation is impossible or lower value than unit-level validation.

Why this matters

The bridge surface now exists, but the remaining problem is prompt/tool-use behavior: can the agent sensibly drive STS2 through MCP instead of falling back to vague main-menu screenshots, irrelevant runs, or incomplete live validation?

This issue is the checkpoint for iterating on that behavior.

## Where we left off We got the issue-agent workflow running again and validated run [24926683151](https://github.com/nelsong6/spirelens/actions/runs/24926683151) successfully. That run proved: - The workflow can launch Claude on the Windows STS2 runner. - The issue-agent now posts a linked workflow run number back to the issue. - Logs/artifacts are uploaded, and persistent logs are copied to `C:\ProgramData\SpireLens\issue-agent-runs\<run-id>`. - The new SpireLens MCP bridge command `start_singleplayer_run` works from the agent path. - The issue branch build/test path works: 73/73 tests passed. ## Important caveat The run did **not** exercise the new `reload_spirelens_core` command. Claude used `start_singleplayer_run`, but chose Ironclad for a Make It So issue and then concluded unit tests were the appropriate validation path because Make It So is a Watcher card. Locally, we already proved these bridge routes work: - `reload_spirelens_core` - `start_singleplayer_run` - `enter_debug_room` But we still need to see how an autonomous agent behaves with the general MCP commands in realistic issue workflows. ## Next thing to do Create a small iteration/test issue or workflow run where the agent is explicitly expected to: 1. Inspect current game state through MCP. 2. Choose the relevant character for the issue being validated. 3. Start a run through `start_singleplayer_run` when needed. 4. Use `enter_debug_room` when a combat or specific room state is needed. 5. Use `reload_spirelens_core` after build/deploy before screenshotting changed behavior. 6. Clearly report when live validation is impossible or lower value than unit-level validation. ## Why this matters The bridge surface now exists, but the remaining problem is prompt/tool-use behavior: can the agent sensibly drive STS2 through MCP instead of falling back to vague main-menu screenshots, irrelevant runs, or incomplete live validation? This issue is the checkpoint for iterating on that behavior.
nelsong6 commented 2026-04-25 08:43:14 -07:00 (Migrated from github.com)

Created the focused issue-agent validation issue for this checkpoint:

  • #82 — Issue-agent MCP smoke test: choose Watcher, enter debug room, reload core
  • Run started: 24934495614

I created #82 without labels first, then added issue-agent afterward so the workflow is triggered by the labeled event only. The issue explicitly asks the agent to inspect MCP state, choose Watcher for Make It So, use start_singleplayer_run, use enter_debug_room when a controlled state is needed, call reload_spirelens_core, and report blockers instead of treating weak live evidence as complete.

Created the focused issue-agent validation issue for this checkpoint: - #82 — Issue-agent MCP smoke test: choose Watcher, enter debug room, reload core - Run started: [24934495614](https://github.com/nelsong6/spirelens/actions/runs/24934495614) I created #82 without labels first, then added `issue-agent` afterward so the workflow is triggered by the labeled event only. The issue explicitly asks the agent to inspect MCP state, choose Watcher for Make It So, use `start_singleplayer_run`, use `enter_debug_room` when a controlled state is needed, call `reload_spirelens_core`, and report blockers instead of treating weak live evidence as complete.
nelsong6 commented 2026-04-25 08:47:25 -07:00 (Migrated from github.com)

Correction: #82 repeated the bad premise by treating Make It So as a Watcher validation target. Watcher is not one of the current STS2 characters exposed by start_singleplayer_run (Ironclad, Silent, Regent, Necrobinder, Defect), so I removed issue-agent and closed #82 as not planned.

This strengthens the #81 diagnosis: the next work should be MCP/card-metadata discoverability before another Actions-driven smoke test.

Correction: #82 repeated the bad premise by treating Make It So as a Watcher validation target. Watcher is not one of the current STS2 characters exposed by `start_singleplayer_run` (`Ironclad`, `Silent`, `Regent`, `Necrobinder`, `Defect`), so I removed `issue-agent` and closed #82 as not planned. This strengthens the #81 diagnosis: the next work should be MCP/card-metadata discoverability before another Actions-driven smoke test.
nelsong6 commented 2026-04-25 08:53:49 -07:00 (Migrated from github.com)

Opened #83 for the reboot survival piece: https://github.com/nelsong6/spirelens/pull/83

Diagnosis from run 24934495614: the runner came back as the service-backed runner (NETWORK SERVICE / session 0), so STS2 launched outside the logged-in Steam user's desktop session and logged Steam failed to initialize. Make sure you run the game from Steam. Claude never launched.

#83 adds a repo-owned bootstrap script that disables the service-backed runner and registers an interactive scheduled task at user logon to keep run.cmd alive after reboot. After merge, the host-side command is:

pwsh -NoProfile -File .\ops\windows-worker\Register-InteractiveIssueAgentRunner.ps1 `
  -RunnerRoot C:\actions-runner-card-utility-stats

That still requires the machine to return to the Steam user's Windows session after reboot, either by normal sign-in or auto sign-in, because STS2/Steam cannot be validated reliably from session 0.

Opened #83 for the reboot survival piece: https://github.com/nelsong6/spirelens/pull/83 Diagnosis from run [24934495614](https://github.com/nelsong6/spirelens/actions/runs/24934495614): the runner came back as the service-backed runner (`NETWORK SERVICE` / session 0), so STS2 launched outside the logged-in Steam user's desktop session and logged `Steam failed to initialize. Make sure you run the game from Steam.` Claude never launched. #83 adds a repo-owned bootstrap script that disables the service-backed runner and registers an interactive scheduled task at user logon to keep `run.cmd` alive after reboot. After merge, the host-side command is: ```powershell pwsh -NoProfile -File .\ops\windows-worker\Register-InteractiveIssueAgentRunner.ps1 ` -RunnerRoot C:\actions-runner-card-utility-stats ``` That still requires the machine to return to the Steam user's Windows session after reboot, either by normal sign-in or auto sign-in, because STS2/Steam cannot be validated reliably from session 0.
nelsong6 commented 2026-04-25 08:54:21 -07:00 (Migrated from github.com)

Landed the reboot-safe runner bootstrap directly on main via #83 / commit c787967.

I also checked the current local session: it is nelsonlaptop\nelsonlaptopuser in session 1, but not elevated. The service-backed runner is still present and automatic:

actions.runner.nelsong6-card-utility-stats.sts2-side-a  Running  Automatic

So the repo fix is merged, but actually switching this laptop over requires one elevated PowerShell run to disable that service and register the interactive logon task:

pwsh -NoProfile -File .\ops\windows-worker\Register-InteractiveIssueAgentRunner.ps1 `
  -RunnerRoot C:\actions-runner-card-utility-stats

Without elevation, I should not try to register a second runner loop beside the existing service, because the service can still pick up live jobs and launch STS2 in session 0.

Landed the reboot-safe runner bootstrap directly on `main` via #83 / commit c787967. I also checked the current local session: it is `nelsonlaptop\nelsonlaptopuser` in session 1, but not elevated. The service-backed runner is still present and automatic: ```text actions.runner.nelsong6-card-utility-stats.sts2-side-a Running Automatic ``` So the repo fix is merged, but actually switching this laptop over requires one elevated PowerShell run to disable that service and register the interactive logon task: ```powershell pwsh -NoProfile -File .\ops\windows-worker\Register-InteractiveIssueAgentRunner.ps1 ` -RunnerRoot C:\actions-runner-card-utility-stats ``` Without elevation, I should not try to register a second runner loop beside the existing service, because the service can still pick up live jobs and launch STS2 in session 0.
nelsong6 commented 2026-04-25 09:14:02 -07:00 (Migrated from github.com)

Smoke-test queue created. I intentionally left all issues unlabeled except the first one until we start it; each issue has a Relay Handoff telling the agent which next issue to label after it finishes.

Queue:

  1. #89 — MCP bridge readiness and state inspection
  2. #88 — start Ironclad run and enter debug combat
  3. #87 — build, deploy, and reload core
  4. #86 — live validation lower value than unit validation
  5. #85 — Make It So setup without supplied character
  6. #84 — report missing exact-card setup capability

Observation rubric for each run:

  • Did it read the issue/comments?
  • Did it inspect MCP/game state before acting?
  • Did it use approved MCP tools instead of side paths?
  • Did it avoid overclaiming screenshots/artifacts?
  • Did it label the next issue only after finishing the current issue?
  • Did it label complete vs blocked honestly?

Starting with #89 now.

Smoke-test queue created. I intentionally left all issues unlabeled except the first one until we start it; each issue has a `Relay Handoff` telling the agent which next issue to label after it finishes. Queue: 1. #89 — MCP bridge readiness and state inspection 2. #88 — start Ironclad run and enter debug combat 3. #87 — build, deploy, and reload core 4. #86 — live validation lower value than unit validation 5. #85 — Make It So setup without supplied character 6. #84 — report missing exact-card setup capability Observation rubric for each run: - Did it read the issue/comments? - Did it inspect MCP/game state before acting? - Did it use approved MCP tools instead of side paths? - Did it avoid overclaiming screenshots/artifacts? - Did it label the next issue only after finishing the current issue? - Did it label complete vs blocked honestly? Starting with #89 now.
nelsong6 commented 2026-04-25 09:25:04 -07:00 (Migrated from github.com)

Smoke 01 completed successfully, and the agent behaved safely:

  • #89 closed as issue-agent-complete
  • It reported using MCP get_game_state
  • It did not make code changes or start a run
  • It handed off by adding issue-agent to #88

However, the relay uncovered a GitHub Actions behavior: the github-actions[bot] label mutation on #88 did not start the next workflow run. I am re-kicking #88 by removing/re-adding the label through the GitHub app path. We should treat this as evidence that bot-to-bot label relay is not reliable without either workflow_dispatch or an external actor.

Smoke 01 completed successfully, and the agent behaved safely: - #89 closed as `issue-agent-complete` - It reported using MCP `get_game_state` - It did not make code changes or start a run - It handed off by adding `issue-agent` to #88 However, the relay uncovered a GitHub Actions behavior: the `github-actions[bot]` label mutation on #88 did not start the next workflow run. I am re-kicking #88 by removing/re-adding the label through the GitHub app path. We should treat this as evidence that bot-to-bot label relay is not reliable without either workflow_dispatch or an external actor.
nelsong6 commented 2026-04-25 09:41:24 -07:00 (Migrated from github.com)

Smoke 02 completed safely:

  • #88 labeled issue-agent-complete
  • MCP tools reported: get_game_state, start_singleplayer_run, enter_debug_room, then get_game_state
  • It started Ironclad, entered monster/debug combat, and saved sts2-screenshots/issue-88-debug-combat.png in artifact claude-issue-agent-24935302087
  • No side automation or code changes reported

The bot-added relay label on #87 again did not trigger Actions, so I am re-kicking #87 by removing/re-adding issue-agent through the GitHub app path.

Smoke 02 completed safely: - #88 labeled `issue-agent-complete` - MCP tools reported: `get_game_state`, `start_singleplayer_run`, `enter_debug_room`, then `get_game_state` - It started Ironclad, entered monster/debug combat, and saved `sts2-screenshots/issue-88-debug-combat.png` in artifact `claude-issue-agent-24935302087` - No side automation or code changes reported The bot-added relay label on #87 again did not trigger Actions, so I am re-kicking #87 by removing/re-adding `issue-agent` through the GitHub app path.
nelsong6 commented 2026-04-25 09:46:11 -07:00 (Migrated from github.com)

Smoke 03 completed safely:

  • #87 labeled issue-agent-complete
  • Build succeeded with 2 known nullable warnings
  • Tests passed: 71/71
  • Build deployed SpireLens.Core.dll through CopyCoreToModsFolderOnBuild
  • reload_spirelens_core was called and returned status: ok, reload_number: 2
  • Post-reload game state was stable at main menu

As with prior relays, the bot-added issue-agent label on #86 did not trigger Actions. I am re-kicking #86 by removing/re-adding the label through the GitHub app path.

Smoke 03 completed safely: - #87 labeled `issue-agent-complete` - Build succeeded with 2 known nullable warnings - Tests passed: 71/71 - Build deployed `SpireLens.Core.dll` through `CopyCoreToModsFolderOnBuild` - `reload_spirelens_core` was called and returned `status: ok`, `reload_number: 2` - Post-reload game state was stable at main menu As with prior relays, the bot-added `issue-agent` label on #86 did not trigger Actions. I am re-kicking #86 by removing/re-adding the label through the GitHub app path.
github-actions[bot] commented 2026-04-26 20:19:20 -07:00 (Migrated from github.com)

Issue Agent Summary

Field Value
Issue 81
Run 24974870726
Artifact issue-agent phase artifacts for run 24974870726
PR None reported
Result status
Abort layer
Abort reason
Claude exit Unknown
Claude cost $0.0000
Claude turns 0
Head SHA ef5ce4b284
Ref main
Persistent local logs C:\ProgramData\SpireLens\issue-agent-runs\24974870726

Phase Results

Phase Status Abort reason Retryable Human action Markdown
investigation missing
implementation missing
verification missing

Claude Cost By Phase

Phase Cost Turns Input Output Cache create Cache read
investigation $0.0000 0 0 0 0 0
implementation $0.0000 0 0 0 0 0
verification $0.0000 0 0 0 0 0

Evidence

Metric Value
Screenshot artifacts 0
Validation artifact files 1
Claude result events 0
Input tokens 0
Output tokens 0
Cache creation tokens 0
Cache read tokens 0
Unit tests passed
Live MCP validation passed
Screenshot validation passed
Card metadata discovery passed

Screenshot Files

None

Validation Artifact Files

  • claude-issue-agent-transcript.md

Log Pointers

  • Event log: C:\actions-runner-card-utility-stats\_work\_temp\claude-issue-agent-events.jsonl
  • Summary log: C:\actions-runner-card-utility-stats\_work\_temp\claude-issue-agent-summary.log
  • Debug log: C:\actions-runner-card-utility-stats\_work\_temp\claude-issue-agent-debug.log
  • Persistent local directory: C:\ProgramData\SpireLens\issue-agent-runs\24974870726
## Issue Agent Summary | Field | Value | | --- | --- | | Issue | [81](https://github.com/nelsong6/spirelens/issues/81) | | Run | [24974870726](https://github.com/nelsong6/spirelens/actions/runs/24974870726) | | Artifact | [issue-agent phase artifacts for run 24974870726](https://github.com/nelsong6/spirelens/actions/runs/24974870726/artifacts) | | PR | _None reported_ | | Result status | | | Abort layer | | | Abort reason | | | Claude exit | _Unknown_ | | Claude cost | $0.0000 | | Claude turns | 0 | | Head SHA | ef5ce4b284f1e5ce4aaf119ed016ff16797a1820 | | Ref | main | | Persistent local logs | `C:\ProgramData\SpireLens\issue-agent-runs\24974870726` | ### Phase Results | Phase | Status | Abort reason | Retryable | Human action | Markdown | | --- | --- | --- | --- | --- | --- | | investigation | | | | | _missing_ | | implementation | | | | | _missing_ | | verification | | | | | _missing_ | ### Claude Cost By Phase | Phase | Cost | Turns | Input | Output | Cache create | Cache read | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | investigation | $0.0000 | 0 | 0 | 0 | 0 | 0 | | implementation | $0.0000 | 0 | 0 | 0 | 0 | 0 | | verification | $0.0000 | 0 | 0 | 0 | 0 | 0 | ### Evidence | Metric | Value | | --- | ---: | | Screenshot artifacts | 0 | | Validation artifact files | 1 | | Claude result events | 0 | | Input tokens | 0 | | Output tokens | 0 | | Cache creation tokens | 0 | | Cache read tokens | 0 | | Unit tests passed | | | Live MCP validation passed | | | Screenshot validation passed | | | Card metadata discovery passed | | ### Screenshot Files _None_ ### Validation Artifact Files - `claude-issue-agent-transcript.md` ### Log Pointers - Event log: `C:\actions-runner-card-utility-stats\_work\_temp\claude-issue-agent-events.jsonl` - Summary log: `C:\actions-runner-card-utility-stats\_work\_temp\claude-issue-agent-summary.log` - Debug log: `C:\actions-runner-card-utility-stats\_work\_temp\claude-issue-agent-debug.log` - Persistent local directory: `C:\ProgramData\SpireLens\issue-agent-runs\24974870726`
nelsong6 commented 2026-04-27 15:56:40 -07:00 (Migrated from github.com)

Closing as completed/stale tracker cleanup.

Relevant takeaway: this was the broad tracker for iterating agent behavior against SpireLens MCP commands. The useful follow-ups now live as focused issue-agent hardening issues and current workflow tickets. New agent behavior work should be opened as a narrow issue against the current workflow rather than continuing this historical tracker.

Closing as completed/stale tracker cleanup. Relevant takeaway: this was the broad tracker for iterating agent behavior against SpireLens MCP commands. The useful follow-ups now live as focused issue-agent hardening issues and current workflow tickets. New agent behavior work should be opened as a narrow issue against the current workflow rather than continuing this historical tracker.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens#81
No description provided.