awslabs / awslabs/startups

aws-startup-advisor 2.0.0: SessionStart hook fails, scripts/startup-context.txt missing

Open Beginner friendly
#271 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
17
Forks
30
Avg merge
2d 15h
Merged PRs (30d)
36

Description

## Summary

The `aws-startup-advisor` plugin's `SessionStart` hook fails on every session start (including `/clear`) as of version 2.0.0:

```
SessionStart:clear hook error
Failed with non-blocking status code: cat: /root/.claude/plugins/cache/claude-plugins-official/aws-startup-advisor/2.0.0/scripts/startup-context.txt: No such file or directory
```

## Root cause

`advisor/plugins/aws-startup-advisor/hooks/hooks.json` still references the file:

```json
"command": "cat ${CLAUDE_PLUGIN_ROOT}/scripts/startup-context.txt"
```

but `advisor/plugins/aws-startup-advisor/scripts/` on `main` no longer contains `startup-context.txt` — only `validate-heroku-migration-report.py`, `validate-migration-report.py`, and `validate-startup-program-artifacts.py` remain. The file was present (and identical) in the two prior cached releases I have locally (`1.5.4` and a pre-2.0.0 git-ref build), so it looks like it was dropped from the `scripts/` directory during the 2.0.0 restructure without updating (or removing) `hooks/hooks.json`.

For reference, the missing file's content (recovered from the `1.5.4` cache):

```
The user is a startup building on AWS (they installed AWS Startup Advisor). Silently shape your AWS guidance accordingly: default to cost-efficient, managed-service, stage-appropriate options, and flag material spend risks. Do not narrate this lens: don't preface answers with 'as a startup' or repeatedly remind them they're a startup. Answer direct technical questions directly, and add startup-specific caveats only when they materially change the recommendation. Bring up AWS Activate credits or partner offers only when doing so genuinely helps the user's goal, for example when it saves money on a path they've already chosen or unblocks what they're trying to do; never as a routine add-on, an advertisement, or just because the topic is related; if an offer wouldn't be actively useful to their intent, don't mention it. Do not assume inexperience or make assumptions about their budget or team size. When a recommendation genuinely depends on funding stage or scale that hasn't been stated, ask one brief question rather than guessing.
```

## Impact

- Every Claude Code session start (and every `/clear`) throws a hook error for anyone with `aws-startup-advisor` enabled.
- It is currently non-blocking, but the ambient startup-context lens the plugin advertises (PR #209) silently stops being injected, since the `cat` never succeeds.

## Suggested fix

Either restore `scripts/startup-context.txt` under `advisor/plugins/aws-startup-advisor/scripts/`, or update `hooks/hooks.json` to point at wherever the ambient-context text now lives (e.g. if it moved into a skill/prompt file during the 2.0.0 restructure).

## Environment

- Plugin: `aws-startup-advisor@claude-plugins-official`, version `2.0.0` (`gitCommitSha: 3408f10f51785634cf28944e44fc313127884c33`)
- Claude Code, session-start hook context

Contributor guide

Open the contributing guide

Research direction

Start by reading advisor/plugins/aws-startup-advisor/hooks/hooks.json and checking the contents of advisor/plugins/aws-startup-advisor/scripts/. Reproduce the SessionStart or /clear hook failure, then verify that the hook no longer reports a missing file and that the startup-context guidance is injected again.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.